[Mimedefang] Spam with more than one recipient - reject or not?

Jim McCullars jim at info.uah.edu
Wed Sep 7 14:35:45 EDT 2005

On Wed, 7 Sep 2005, Les Mikesell wrote:

> This does bring up a performance-related issue though.  Is there some
> way for sendmail to learn about repeated delivery failures for bounces
> and cut down on the retries so when you do bounce real spam with
> bad sender addresses it doesn't clutter up the outgoing queue for
> so long?

   We do it with a cron job:

# This will move old messages in the sendmail queue to a slower queue
# Do this once per hour.
20 * * * * /usr/local/sysadm/move-old-messages.sh

The script itself looks like this:

# Move messages with more than 10 retransmission attempts to slow queue
# This is run from cron once an hour.  Another cron entry will cause
# sendmail to process this queue once every eight hours.
/usr/local/bin/qtool.pl -e '$msg{num_delivery_attempts} >= 10' $SLOWQUEUE $QUEUE

Note that qtool.pl is distributed with sendmail.  We put it in
/usr/local/bin for convenience.

Then to process the messages, we have this in cron (all these are root,

# This will process the messages moved to the above queue once every eight
# hours (as opposed to once every 15 minutes).
30 0,8,16 * * * /usr/lib/sendmail -q -OQueueDirectory=/var/spool/slow-mqueue


Jim McCullars
University of Alabama in Huntsville

More information about the MIMEDefang mailing list