Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Asynchronous startup for sendmail UNIX
I was really displeased with the time sendmail added to my startup. Why not just background it, I wondered? So I did, and it now starts in its own sweet time while the login screen comes up.

Is this a terrible idea? Is it dangerous? No idea. It seems to work just fine for me, and darn, it sure is faster. I would be curious to see what others have to say.

After you have successfully set up sendmail, edit /System -> Library -> StartupItems/ -> Sendmail -> Sendmail, and find these two lines:
  /usr/sbin/sendmail -bd -q1h
/usr/sbin/sendmail -C /etc/mail/submit.cf -q1h
Enclose them in parentheses, and put an ampersand immediately after:
  (
/usr/sbin/sendmail -bd -q1h
/usr/sbin/sendmail -C /etc/mail/submit.cf -q1h
) &
Restart and (hopefully) enjoy.
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[3,219 views]  

Asynchronous startup for sendmail | 4 comments | Create New Account
Click here to return to the 'Asynchronous startup for sendmail' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Mine only had one
Authored by: Anonymous on Jun 20, '02 11:33:01PM

My Sendmail file only had the first line there... I added the second.
This could be why it completely and utterly failed to work...



[ Reply to This | # ]
Mine only had one
Authored by: professor on Jun 21, '02 03:18:56AM
Apple updated Sendmail to 8.12.x with the MacOSX 10.1.5 update.
The previous version of Sendmail required only the first
line in the "Startup" file. The new version requires both lines.


I had been running 8.12.x for the past year, but others, who had
been running Apple's stock Sendmail got "burned" by the update.


It's an easy fix, but there should be a KnowledgeBase article (or
maybe a MacOSX Hint) about it.

[ Reply to This | # ]

Mine won't start up properly
Authored by: shutch on Jun 23, '02 08:58:07AM

when the & is added it gives

Jun 23 13:46:20 localhost sendmail[300]: NOQUEUE: SYSERR(root): fill_fd: before readcf: fd 2 not open: Bad file descriptor
Jun 23 13:46:20 localhost sendmail[300]: NOQUEUE: 0: fl=0x2, mode=20666: CHR: dev=2/1035380, ino=34721668, nlink=1, u/gid=0/0, size=0
Jun 23 13:46:20 localhost sendmail[300]: NOQUEUE: 1: fl=0x1, mode=20666: CHR: dev=2/1035380, ino=34721668, nlink=1, u/gid=0/0, size=0
Jun 23 13:46:20 localhost sendmail[300]: NOQUEUE: 3: fl=0x2, mode=140000: SOCK [0]->[[UNIX: /var/run/syslog]]
Jun 23 13:46:20 localhost sendmail[299]: NOQUEUE: SYSERR(root): fill_fd: before readcf: fd 2 not open: Bad file descriptor
Jun 23 13:46:20 localhost sendmail[299]: NOQUEUE: 0: fl=0x2, mode=20666: CHR: dev=2/1035380, ino=34721668, nlink=1, u/gid=0/0, size=0
Jun 23 13:46:20 localhost sendmail[299]: NOQUEUE: 1: fl=0x1, mode=20666: CHR: dev=2/1035380, ino=34721668, nlink=1, u/gid=0/0, size=0
Jun 23 13:46:20 localhost sendmail[299]: NOQUEUE: 3: fl=0x2, mode=140000: SOCK [0]->[[UNIX: /var/run/syslog]]
Jun 23 13:46:20 localhost sendmail[299]: gethostbyaddr(10.0.1.2) failed: 1
Jun 23 13:46:21 localhost sendmail[299]: gethostbyaddr(10.64.64.64) failed: 1


Something about the queue's I guess, but don't know what, so living with the delayed startup until I or someone else can work it out



[ Reply to This | # ]
Reverse DNS problem ?
Authored by: nekura on Jun 24, '02 10:05:28AM

While working on a x86 FreeBSD server, I noticed that sendmail startup was surprisingly long. It turned out that sendmail was by default trying to find the network name for each of the IP adresses of the machine.

If no DNS reverse information was available, it seemed that sendmail had some kind of timeout, waiting for a DNS reply. This gives the log lines shown in the previous comment :

Jun 23 13:46:20 localhost sendmail[299]: gethostbyaddr(10.0.1.2) failed: 1
Jun 23 13:46:21 localhost sendmail[299]: gethostbyaddr(10.64.64.64) failed: 1

On the x86 box, I solved the problem by adding a few lines in the DNS to allow reverse name resolution on my IP addresses.
However, I don't know if the booting delay of sendmail on OS X has the same origin, and if it can be treated in the same way...



[ Reply to This | # ]