sendmail 8.12 and mailscanner
Julian Field
mailscanner at ecs.soton.ac.uk
Thu Jul 18 11:11:55 IST 2002
The sendmail that handles the incoming mail specifies the QueueDirectory on
the command-line (while starting up the daemon process). This forces it to
use mqueue.in. Also the submit.cf is not used when starting sendmail with
the "-bd" switch. This is from the "SECURITY" file in the sendmail docs:
>The .cf file is chosen based on the operation mode. For -bm (default),
>-bs, and -t it is submit.cf (if it exists) for all others it is
>sendmail.cf.
So the incoming one uses mqueue just like it always did. So input to
MailScanner should work. Once MailScanner has done its job, it moves the
message to mqueue.
"Batch" mode then tries to trigger the message delivery. If this fails,
then the message stays in mqueue (it certainly does on my system running
8.12.3). So the clientmqueue doesn't appear to be involved with this
functionality at all.
From my experiments "queue" mode basically works the same way (but without
the initial delivery attempt).
At 02:50 18/07/2002, you wrote:
> Are you **sure** nothing is sneaking thru clientmqueue? Is there
>any traffic there, according to "mailstats -c"? I had to RTFM (and the
>source code) for sendmail to figure out that sendmail statistics for
>/var/spool/clientmqueue is stored in the file
>
>/var/spool/clientmqueue/sm-client.st
>
>which is *not* created by default when you install 8.12. If you don't
>have this file, do the following on your mail servers running 8.12:
>
> cd /var/spool/clientmqueue
> touch sm-client.st
> chown smmsp:smmsp sm-client.st
> chmod 664 sm-client.st
>
>and then let things run for a while. The usual "mailstats" command
>shows the MTA traffic going thru /var/spool/mqueue, via sendmail.cf.
>The "mailstats -c" command shows the MSP traffic going thru
>clientmqueue via submit.cf. If these stats aren't zero, then it is
>time to investigate.
>
> While I haven't gotten to 8.12 on my mail server yet, my clients
>running 8.12 in null-client mode (no daemon running) show all locally
>generated email going via submit.cf, and all nothing via MTA. I'm
>hoping that any mail server running 8.12 will be zero traffic via MSP,
>everything via MTA -- so mailscanner doesn't have to worry about MSP.
>
> I hate to be a rain cloud on your horizon, but...
>
>** Jeff A. Earickson, Ph.D PHONE: 207-872-3659
>** Senior UNIX Sysadmin, Information Technology EMAIL: jaearick at colby.edu
>** Colby College, 4214 Mayflower Hill, FAX: 207-872-3076
>** Waterville ME, 04901-8842
>----------------------------------------------------------------------------
>
>On Wed, 17 Jul 2002, Julian Field wrote:
>
> > Date: Wed, 17 Jul 2002 21:40:50 +0100
> > From: Julian Field <mailscanner at ECS.SOTON.AC.UK>
> > Reply-To: MailScanner mailing list <MAILSCANNER at JISCMAIL.AC.UK>
> > To: MAILSCANNER at JISCMAIL.AC.UK
> > Subject: Re: sendmail 8.12 and mailscanner
> >
> > At 20:05 17/07/2002, you wrote:
> > > I have been upgrading my client systems to 8.12.5, and dealing
> with the
> > >MSP complications there (submit.cf and /var/spool/clientmqueue). So if
> > >I upgrade my mail server to 8.12.5, I will now have three queues.
> > >Mailscanner only seems to watch /var/spool/mqueue and not clientmqueue.
> > >I haven't figured out which queue (mqueue or clientmqueue) sendmail uses
> > >for what mail, or why. The only thing I found was "The .cf file is based
> > >on the operation mode. For -bm (default), -bs, and -t it is submit.cf
> > >(if it exists), for all others it is sendmail.cf." Hunh??? Can anbody
> > >explain the flow of email thru these two queues?
> > >
> > > With 8.12.5, will I have inbound email (via ports 25 or 587) landing
> > >in clientmqueue instead of mqueue, and thus escaping the clutches of
> > >mailscanner? How about for outbound email? Why doesn't mailscanner
> look at
> > >/var/spool/clientmqueue (or does it need to)? What is going on here?
> >
> > I am using my init.d script that briefly does
> > sendmail -bd + options to set queue directory to
> /var/spool/mqueue.in
> > sendmail -q15m
> > check_mailscanner
> > with the usual queue directory settings in mailscanner.conf (mqueue and
> > mqueue.in)...
> >
> > It all appears to work fine for me.
> >
> > telnet localhost 25 puts the mail into /var/spool/mqueue.in just as the
> > sendmail -bd command line said it should. MailScanner then picks it up,
> > processes it and puts it into /var/spool/mqueue. In batch mode the sendmail
> > -qI commands then trigger delivery from /var/spool/mqueue just as it should
> > do. In queue mode the sendmail -q15m process (started by the init.d script)
> > picks up the mail and delivers it.
> >
> > So it doesn't use the clientmqueue directory at all. As far as I can see
> > the clientmqueue directory is only used for messages submitted by invoking
> > the sendmail binary directly. MailScanner has *never* supported the
> > sendmail binary being invoked directly, and probably never will.
> >
> > As far as I can see everything should work just as it did before. If you
> > have upgraded and things have broken, then I suggest you do this to turn
> > off your new sendmail init.d script and restart MailScanner:
> >
> > /etc/rc.d/init.d/sendmail stop
> > chkconfig --level 2345 sendmail off
> > /etc/rc.d/init.d/mailscanner restart
> >
> > Fortunately my current init.d script happily works with the new version of
> > sendmail.
> > --
> > Julian Field Teaching Systems Manager
> > jkf at ecs.soton.ac.uk Dept. of Electronics & Computer Science
> > Tel. 023 8059 2817 University of Southampton
> > Southampton SO17 1BJ
> >
--
Julian Field Teaching Systems Manager
jkf at ecs.soton.ac.uk Dept. of Electronics & Computer Science
Tel. 023 8059 2817 University of Southampton
Southampton SO17 1BJ
More information about the MailScanner
mailing list