Lookin to Speed Up MailScanner ifor Outgoing Messages

lloyd_tennison

Well-Known Member
Mar 12, 2004
698
1
168
Lookin to Speed Up MailScanner for Outgoing Messages

I am having a problem when sending mailing lists that MailScanner "hiccups" while someone is popping their mail or when it is restarting itself. The restarting I can change the time up on, but when someone is popping their mail the incoming (unprocessed) queue from mailman can just jump by 1500 to 4000 additional unprocessed messages in less than a minute. I already have the sending domains not being scanned when going out, but I can quickly get a queue of 50,000 which is then a problem.

The problem seems to be the scanning of MailScanner when someone is popping. I will be converting all mailboxes to maildir, but I do not think that will be enough. Before MailScanner I did not have that problem, but I would like to keep MailScanner for some of its other features.
 
Last edited:

lloyd_tennison

Well-Known Member
Mar 12, 2004
698
1
168
In case anyone else is looking, I found that if I change the port Mailman uses and add that port an an auxiliary port for exim_outgoing.conf - then MailScanner will not scan it as it is going directly into that queue.
 

RickG

Well-Known Member
Feb 28, 2005
238
2
168
North Carolina
That sounds like a neat trick.

If using ConfigServer's MailScanner install, it should contain a ruleset file that overrides both mail and virus scan settings:

/usr/mailscanner/etc/rules/scan.messages.rules

The default file might contain:

# Example: (scan all email)
FromOrTo: default yes

For mailing lists, I usually edit the file so it looks like the following (example only):

From: [email protected] no #bypass mailing list
FromOrTo: default yes

Scanning large outbound lists can bring things to a crawl. This makes a huge difference (on my server).
 
Last edited:

lloyd_tennison

Well-Known Member
Mar 12, 2004
698
1
168
That really does not make a huge difference, as even though it is not scanning the message it is processing it and moving it from one queue to another. The simple act of someone checking their email from IMAP with a lot of messages can bring MailScanner to a crawl and then I have hundreds of additional (or thousands) of messages that have to first be processed by MailScanner - as unprocessed - and then moved into the sending queue.

My way actually bypasses the sending queue, and the recording by Mailwatch, and places them directly in the outgoing queue. There 80% or so are delivered immediately, whereas using the message scan rules I can end up with ten thousand or so messages waiting to be processed in 20 minutes. In two hours I had over a hundred thousand in the queue. This way I rarely have over 1500.
 

RickG

Well-Known Member
Feb 28, 2005
238
2
168
North Carolina
I hadn't thought about the issue of MailScanner moving the messages from one queue to another. In a much less active environment little things like adjusting rule-sets can have an impact (especially on entry level VPS').

That said, can you go into more detail as to exactly where you change the port info? Sounds like a great solution and one I'd like to better understand. Thx -
 

lloyd_tennison

Well-Known Member
Mar 12, 2004
698
1
168
In the exim startup file, /etc/rc.d/init.d/exim

I added:

Code:
 fi
                if [ ! "$ALTPORT" = "" ]; then
                        echo -n "Starting exim-$ALTPORT: "
                        TMPDIR=/tmp $DAEMONIZE /usr/sbin/exim -bd -oX $ALTPORT
                        TMPDIR=/tmp $DAEMONIZE /usr/sbin/exim -bd -C /etc/exim_outgoing.conf -oX 9999
                        echo $RESULT
with the 9999 being the new port.

Maybe someone has a better way, as exim might overwrite this file with an update.