[juneau-lug] sendmail & mailscanner config issues
- From: Kevin Miller <Kevin_Miller@xxxxxxxxxxxxxxx>
- To: "'juneau-lug@xxxxxxxxxxxxx'" <juneau-lug@xxxxxxxxxxxxx>
- Date: Thu, 27 Mar 2003 12:55:46 -0900
I'm setting up sendmail and MailScanner (along w/spamassassin) on a SuSE 8.0
box, and have a question on the instructions - rather new to scripts, and
such as well as sendmail so hopefully someone will have some ideas.
In the MailScanner install page
(http://www.sng.ecs.soton.ac.uk/mailscanner/install/sendmail.shtml) it says:
-------------
Your copy of sendmail probably uses the default queue location
/var/spool/mqueue. If this directory does not exist, check your sendmail
documentation and/or sendmail.cf file for the location of the
QueueDirectory. Assuming it is /var/spool/mqueue, create a second queue
directory alongside it called mqueue.in and set it to the same ownership and
permissions as mqueue. For example,
# cd /var/spool
# ls -ld mqueue
drwxr-x--- 2 root bin 62976 Oct 23 16:18 mqueue
# mkdir mqueue.in
# chown root mqueue.in
# chgrp bin mqueue.in
# chmod u=rwx,g=rx,o-rwx mqueue.in
# ls -ld mqueue mqueue.in
drwxr-x--- 2 root bin 62976 Oct 23 16:18 mqueue
drwxr-x--- 2 root bin 41472 Oct 23 16:18 mqueue.in
This new queue mqueue.in will be used by the copy of sendmail providing the
SMTP service.
-------------
The SuSE default install has mqueue owned by root:root. I set the
permissions on the mqueue.in dir as indicated, but set the owners to match
the mqueue dir, that is root:root rather than root:bin
Any problem w/that? The MailScanner instructions aren't SuSE specific, so
I'm inclined to match what's already there but that may or may not be the
best route.
Second, the instructions say to do the following:
-------------
Currently, your copy of sendmail will be started by a script such as
/etc/init.d/mail or /etc/rc.d/init.d/sendmail. Somewhere in this script will
be the command to start sendmail itself. This should look like this:
sendmail -bd -q15m
You should change this to the following two lines:
sendmail -bd -OPrivacyOptions=noetrn -ODeliveryMode=queueonly
-OQueueDirectory=/var/spool/mqueue.in ( possible wrapped line)
sendmail -q15m
This first starts the copy of sendmail that provides SMTP service, building
the work queue for MailScanner. It then starts the copy of sendmail that
delivers the output from MailScanner.
You also might need to change the commands used to shut down sendmail as it
now needs to find 2 copies and kill them both. However, this is not critical
and the system will work without it.
-------------
In /etc/init.d/sendmail, I see the following:
snip...
test -s /etc/sysconfig/mail && \
. /etc/sysconfig/mail
test -s /etc/sysconfig/sendmail && \
. /etc/sysconfig/sendmail
if test -z "$SENDMAIL_ARGS" ; then
SENDMAIL_ARGS="-L sendmail -Am -bd -q30m -om"
fi
if test -z "$SENDMAIL_CLIENT_ARGS" ; then
SENDMAIL_CLIENT_ARGS="-L sendmail-client -Ac -q30m"
fi
if test "$SMTPD_LISTEN_REMOTE" != "yes" ; then
SENDMAIL_ARGS="-O DaemonPortOptions=Addr=127.0.0.1 $SENDMAIL_ARGS"
fi
msppid=/var/spool/clientmqueue/sm-client.pid
srvpid=/var/run/sendmail.pid
. /etc/rc.status
rc_reset
case "$1" in
start)
echo -n "Initializing SMTP port (sendmail)"
startproc -p $srvpid /usr/sbin/sendmail $SENDMAIL_ARGS
rc_status
startproc -f -p $msppid /usr/sbin/sendmail $SENDMAIL_CLIENT_ARGS
rc_status -v
;;
stop)
echo -n "Shutting down SMTP port"
killproc -p $msppid -TERM /usr/sbin/sendmail
rc_status
killproc -p $srvpid -TERM /usr/sbin/sendmail
rc_status -v
;;
snip...
So how do I want to change the script? It looks like currently it's
starting up with:
startproc -p /var/run/sendmail.pid /usr/sbin/sendmail \
-O DaemonPortOptions=Addr=127.0.0.1 -L sendmail -Am -bd -q30m -om
then starting a 2nd instance with:
startproc -f -p /var/spool/clientmqueue/sm-client.pid \
/usr/sbin/sendmail -L sendmail-client -Ac -q30m
That's a far cry from "sendmail -bd -q15m"
The kill routine looks like it kills the processes but I expect I'll have
configure that too to shut down the new processes properly.
Thanks for any help provided...
...Kevin
...Kevin
-------------------
Kevin Miller Registered Linux User No: 307357
CBJ MIS Dept. Network Systems Administrator, Mail
Administrator
155 South Seward Street ph: (907) 586-0242
Juneau, Alaska 99801 fax: (907 586-4500
------------------------------------
This is the Juneau-LUG mailing list.
To unsubscribe, send an e-mail to juneau-lug-request@xxxxxxxxxxxxx with the
word unsubscribe in the subject header.
- Follow-Ups:
- [juneau-lug] Re: sendmail & mailscanner config issues
- From: James Zuelow
Other related posts:
- » [juneau-lug] sendmail & mailscanner config issues
- » [juneau-lug] Re: sendmail & mailscanner config issues
- [juneau-lug] Re: sendmail & mailscanner config issues
- From: James Zuelow