Question on reducing load on MailScanner machine
steve.freegard at fsl.com
Thu Jun 25 19:59:25 IST 2009
Christopher Fisk wrote:
> I saw a similar post in the archives recently, but the discussion didn't go very far.
> I'd like to expand the question a bit.
> Lets assume I have a single server handling MailScanner (& SA & ClamAV) and the postfix/courier servers.
> The MailScanner queue is reaching 300+ at times, giving a short delay between the server receiving the message and MailScanner scanning it.
> If I were to NFS/SMB mount both the MailScanner install directory and the hold queue directory from another machine and startup another MailScanner process, will I run into issues where both MailScanners are trying to scan the same messages and cause problems? Or would MailScanner be smart enough to know that another MailScanner process is scanning a given message?
> This is on Linux 2.6 and ext3. Filesystems and kernel versions can be changed as needed.
> I have a few extra servers I can quickly put in place and would rather do that than purchasing an entire new server for this.
> The MailScanner book doesn't have any information on this type of configuration unfortunately.
The previous thread about this didn't go very far because I suspect
no-one is brave enough to actually try this. Most of us just either
optimise our installations to prevent the queue build-up in the first
place or just add another box - it's the far less dangerous and the most
travelled path. That's also the reason it's not covered in the book.
E-mail isn't instant messaging; a queue of 300 would impose nothing more
than a few minutes delay at most which is perfectly acceptable to most
You're welcome to try NFS mounting your 'hold' directory and running
another box on it at the same time; but you get to keep all the pieces
if it breaks and to answer the phone to your users when it goes wrong
and they get duplicate messages delivered to them or if their important
mail get nuked.
So my recommendation would be to avoid this; but if you are going to try
it - do it on virtual machines and test it thoroughly (and document it
for others too if it works!).
More information about the MailScanner