[juneau-lug] Re: sendmail & mailscanner config issues

  • From: "James Zuelow" <jamesz@xxxxxxxxxxxxxxxx>
  • To: <juneau-lug@xxxxxxxxxxxxx>
  • Date: Thu, 27 Mar 2003 13:28:05 -0800


Comments embedded:

> -----Original Message-----
> From: juneau-lug-bounce@xxxxxxxxxxxxx 
> [mailto:juneau-lug-bounce@xxxxxxxxxxxxx] On Behalf Of Kevin Miller
> Sent: Thursday, March 27, 2003 1:56 PM
> To: 'juneau-lug@xxxxxxxxxxxxx'
> Subject: [juneau-lug] sendmail & mailscanner config issues
> 
> 
> 
> 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.
> 
(snip)
> 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.
> 

I would leave the permissions the way that SuSE set them up.  SuSE set
up the users and groups during the install, and without carefully
changing everything related to Sendmail it probably isn't a good idea to
deviate.  So I think you did the right thing there.

> 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
> 

If this file exists, it is "sourced", or included verbatim, into this
script.

> test -s /etc/sysconfig/sendmail && \
>       . /etc/sysconfig/sendmail
> 

Again, this file is read into this script if it exists.

> if test -z "$SENDMAIL_ARGS" ; then

If the environment variable $SENDMAIL_ARGS is null, then the script sets
this as the default:

>         SENDMAIL_ARGS="-L sendmail -Am -bd -q30m -om"

*** I would try changing the above line to the first line in your
instructions ***

> fi
> if test -z "$SENDMAIL_CLIENT_ARGS" ; then
Similarly, it checks for a null $SENDMAIL_CLIENT_ARGS and sets a default
value for it if needed:
>         SENDMAIL_CLIENT_ARGS="-L sendmail-client -Ac -q30m"

*** This is where I would put the second line in your instructions ***

> fi
> if test "$SMTPD_LISTEN_REMOTE" != "yes" ; then
Finally, it checks $SMTPD_LISTEN_REMOTE to see if Sendmail has been told
not to listen to network traffic.  (Very unlikely in your situation,
unless SuSE does that by default.)  If so, it modifies the existing
value of $SENDMAIL_ARGS with the one below, which will listen for smtp
traffic from the localhost only.
>         SENDMAIL_ARGS="-O DaemonPortOptions=Addr=127.0.0.1
$SENDMAIL_ARGS"
> fi 
(snip)

> 
> Thanks for any help provided...
> 
> ...Kevin
> 

I think the only thing to watch out for is another script that is
setting the values of SENDMAIL_ARGS and SENDMAIL_CLIENT_ARGS before this
script is run, as this one is checking for null values.  Doing a `grep
"SENDMAIL_" /etc/*` might show any culprits if this is the case.  Or,
you could just remove the if-then loops and set the values regardless of
whether or not they have already been set.

In any case, just make a backup of the original file and try making the
changes they want.  If it doesn't work, no harm done.

Cheers,

James


------------------------------------
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.

Other related posts: