[plug] An interesting issue with Amavis

Andrew Barbara andrew at mailerdirect.net
Thu May 22 21:31:36 WST 2003


Hi All,
I use Amavisd to scan my email (Sendmail and Mcafee Uvscan).  This works
very well, except when someone sends an email to over 1000 email 
recipients
and i find that when the bounce messages start coming back in Amavisd
starts scanning and taking up all of the systems resources, the load
average goes up above 30 (therefore sendmail stops accepting
connections and Squid slows to an unacceptable speeds) until the server
clears the queue, the load average goes down then it all starts again!!!

My solution was to set amavis and uvscan to the lowest priority using
nice.  i created a script that had the following in it:

#!/bin/bash
/bin/nice -n 19 /usr/sbin/amavis $1 $2 $3 $5 $6 $7 $8 $9

(And edited the sendmailcf)
I first tried it without the $1 $2etc but nothing happened, so i guess
sendmail sends the email recipients as a command parameter.

This works a treat, (as i also set sendmail to stop accepting connections
at a load average of 50, not 10!!)
so that worked, except that when a user wants to send an email with a 
large
amount of recipients, the first 8 get through but the rest drop into a
black hole.

I tried adding $10 $11 up to $20.
This was a big mistake, when i sent an email to user at domain, it tried to
send an email to user0 at domain.com0 and email1 at email.com1 and so on and
so-forth.  I tried putting "" around the variables but this made no
difference.

Does anyone know how to fix this?  Maybe a way to pass all commands passed
to the above script to the amavis script?

Hope you all understand all this.

Thanks

Andrew


-- 




More information about the plug mailing list