[Mimedefang] Adding mimedefang to sendmail's startup script

Kimmo Jaskari kimmo.jaskari at eget.fi
Wed Aug 1 11:46:40 EDT 2007


On Tue, 2007-07-31 at 17:43 -0400, Lisa Casey wrote:
> Since installing mimedefang on this FreeBSD box, when I reboot it there's
> something screwy going on when sendmail starts up. It's got something to do
> with startup scripts and either something I've failed to do or something
> I've done incorrectly. Before installing mimedefang, sendmail started fine
> on bootup. Now when I reboot the box I get this in /var/log/maillog:
> 
> Jul 31 17:19:20 mail sm-mta[399]: NOQUEUE: SYSERR(root): opendaemonsocket:
> daemon IPv4: cannot bind: Address al
> ready in use

That does mean that something else is already listening on that port, so
you are probably right that Sendmail is trying to start itself twice.
Most likely you've done something odd. :) FreeBSD apparently (I'm pretty
FreeBSD challenged, I'm mainly a Solaris guy) has a fairly advanced
startup script system that allows services to keep track of dependencies
(though not as cool as Solaris SMF ;) but there does exist
documentation. 

If you look here:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-starting-services.html

and here:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-rcd.html

the rc.d mechanism is explained pretty well.

Since your rc.conf has sendmail enable set to yes, it does run the
sendmail script. That script, as standard, most likely doesn't have the
mimedefang start script set as a requirement, so it blithely starts, and
probably before your customisations kick in.

It seems to me that what you need to do is have a separate start script
for mimedefang (most likely a good idea on Linux, too, as long as it
runs before the sendmail script) and you also need to edit the sendmail
script on FreeBSD to have mimedefang as a requirement before sendmail
can start with the "require" keyword.

The mimedefang script should probably also have the keyword "before"
used to make sure it starts before sendmail. 

And of course you have to add a line to rc.conf to run the mimedefang
script in the first place, mimedefang_enable=yes or some such. 

Take a look at those webpages up there, as I said, it's all there. 

/Kimmo



More information about the MIMEDefang mailing list