I'm rolling my own sendmail, and I'm trying to modify a sendmail init script set up for RH.
I want to add daemon sendmail �Ac �q5m to the already inserted daemon /usr/sbin/sendmail -L sm-mta -bd -q1h
So I modified the sendmail startup with: start() { # Start daemons. daemon /usr/sbin/sendmail -L sm-mta -bd -q1h echo -n $"Starting $prog: " RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sendmail # return $RETVAL daemon /usr/sbin/sendmail -Ac -q5m echo -n $"Starting $prog: " RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sendmail return $RETVAL
}
But of course, when I use the same script to stop the process, it only stops the /usr/sbin/sendmail -L sm-mta -bd -q1h process.
I figure the cleanest way to make this work is to get both processes in /var/run/sendmail.pid
The comments inside the /etc/rc.d/init.d/functions seem to imply that you can have 2 processes inside sendmail.pid for killproc to act on.
Suggestions? === Al
Am Mo, den 29.03.2004 schrieb Al Sparks um 08:19:
I'm rolling my own sendmail, and I'm trying to modify a sendmail init script set up for RH.
I want to add daemon sendmail Ac q5m to the already inserted daemon /usr/sbin/sendmail -L sm-mta -bd -q1h
Suggestions? === Al
Can you explain why you want to do so? Do you have any problems with your queue processing inside Sendmail? Maybe there is a better solution.
Alexander
Well, first, I can make this work w/o my question being answered. I saw this as an opportunity to learn more about the standard initd scripts RH/Fedora uses.
But, if it gives you the warm and fuzzies to know, I'm trying to install MIMEDefang, and that's one of the things it calls for. === Al
--- Alexander Dalloz alexander.dalloz@uni-bielefeld.de wrote:
Am Mo, den 29.03.2004 schrieb Al Sparks um 08:19:
Can you explain why you want to do so? Do you have any problems with your queue processing inside Sendmail? Maybe there is a better solution.
Alexander
Am Mo, den 29.03.2004 schrieb Al Sparks um 18:54:
Well, first, I can make this work w/o my question being answered. I saw this as an opportunity to learn more about the standard initd scripts RH/Fedora uses.
But, if it gives you the warm and fuzzies to know, I'm trying to install MIMEDefang, and that's one of the things it calls for. === Al
Ok :)
You might wonder but I am running Sendmail with MimeDefang too. In my opinion it is the best way to integrate SPAM fighting using SpamAssassin too and to run anti virus checking using one or more anti virus tools too.
Well, if you check /etc/init.d/sendmail on your Fedora machine you can quickly find out, that this script already does what you want to achieve: it runs the mail queue every $MQUEUE. This is by default 1 hour. But you can change that easily in /etc/sysconfig/sendmail by setting QUEUE to 5m. The Sendmail init script sets at top QUEUE = MQUEUE. If you want the submission queue runner not run that often (every 5 minutes, which is normaly no problem, I do that myself), then change /etc/sysconfig/sendmail to contain a line MQUEUE=5m. This will result in a submission queue runner running every hour and a mail queue running every 5 minutes. How Sendmail runs already on your Fedora you can easily see with these commands:
cat /var/run/sendmail.pid --> prints out the porcess ID of the sendmail main process and the parameters for the main queue runner
cat /var/run/sm-client.pid --> prints out the process ID of the submission queue runner and it's parameters
Certainly /etc/init.d/functions looks confusing for the first time. The main functions it generates you are interested in are daemon() and killproc(). Both are working with pid files created in /var/run.
This will fairly not answer all your questions, but you are welcome to ask more. For MimeDefang specific things you better subscribe it's mailing list and/or search it's mailing list archive. It contains already a lot of helpful tips and tricks.
Regards
Alexander