Avoid scanning local mail (& the daemon debate)

Julian Field mailscanner at ecs.soton.ac.uk
Sun Jul 28 20:14:15 IST 2002


At 19:52 28/07/2002, you wrote:
>You know the low-level details far better than I do, but it appears to me from
>watching the system performance that the daemon version loads when the server
>restarts and the command line version loads once for every message. Is
>there a way
>to tell MailScanner how many messages to handle in a batch? There
>certainly are
>plenty of messages available in the queues when the script is running.

MailScanner does *not* load the virus scanner separately for every message.
That's one of its great advantages over things like Amavis.

Using the numbers near the top of mailscanner.conf, you can configure the
maximum size of a batch. The size is otherwise determined by the number of
messages that appeared in the queue while the previous batch was being
processed.

>But it sounds like the real distinction is not command-line vs daemon, but
>that the
>current Sendmail has a different architecture.

The main difference is that, when invoked directly, new mail messages end
up in the mqueue.in, rather than the mqueue.

>  (I'd rev Sendmail again if it
>weren't for the fact that the more restrictive permissions in 8.12.4 might
>lead to
>problems I couldn't quickly solve.) As I said in my original message, the
>current
>system gracefully handles all the incoming mail and probably wouldn't start
>breathing hard with a five-fold increase in volume. But I couldn't handle
>much of
>an increase in outbound mail with the current setup.

Still sounds odd to me. I have quite a few users who ship over 100,000
messages per day without any problem.
Have you thought of using a perl script to talk SMTP to locahost rather
than invoking sendmail for every message? Probably faster as it doesn't
involve the process-startup overhead for every message. Fork is a
relatively cheap operation compared to starting a new process.

Take a look at your MailScanner logs (in maillog probably) to see how big
the message batches are. If they are always running at their maximum size
(by default it is 100), then consider increasing that value in
mailscanner.conf to 200 or even 300.

Something in your setup is hampering the performance, and I can't see it
from here, just suggest ideas. MailScanner shouldn't even notice a load of
5500 messages :-)

>Is there a change I can make? Would reving MailScanner cure any of this?
>
>MailScanner is a marvelous piece of work. It installed easily and is extremely
>flexible. Based on the way it incorporates different AV tools, blocklists, and
>SpamAssassin I have to give it high grades on what I regard as the most
>important
>measure of any software: Works and plays well with other children. I
>recommend it
>to all my friends that are running Sendmail, since they aren't publishing
>lists.
>
>I don't have an urgent problem here, but it seems that growth would
>require either
>throwing more horsepower at the system (it's a K6-2/400 now, so I could
>triple the
>speed without spending too much money) or moving back to AMaViS, probably with
>Postfix. I'd really like to hear there's a simple fix on the current system.

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