Something I did.

John B. Hanks john.hanks at USU.EDU
Wed Feb 12 19:06:27 GMT 2003


This is probably old news to most of you, but I am pretty pleased with how
well it solved my problem so I thought I'd share it and see if it were
useful or if someone has a better way.

I have two MailScanner/SpamAssassin machines which act as gateways for our
campus. Lately, as our mail load has increased (more people are diverting
incoming mail through us) I have seen a slow rise in the size of the
outgoing mail queue. Recently when one of our major mailservers was
experiencing problems, my queues grew to > 8,000 messages and the boxes
became heavily loaded with sendmail attempting to deliver from this large
queue directory, to the point where sendmail stopped accepting mail on one
of the machines. 

I wanted to make our setup more robust and meet the following goals:

1. I must queue mail for 5 days before rejecting it, I promised the users
that I would do so.
2. I did not want to manage multiple queues for different domains or run
multiple sendmails on different IP addresses to split the load among
directories.
3. I wanted to keep the queues on the mailscanner machines as small as
possible but not have to manually move messages to alternate queues.
4. I wanted the solution to be as simple as possible.

I found my solution in the FallbackMXhost option. This option basically
tells sendmail if all else fails when delivering, use this host. I set up a
third machine which acts as a pretty standard RedHat/sendmail relay box,
accepting messages and relaying for or to any campus machine (*.usu.edu).

Then on each mailscanner machine I added this to sendmail.mc:

define(`confFALLBACK_MX',`queued.usu.edu')

Then with sendmail.cf regenerated as per the instructions in the sendmail.mc
file, I restarted MailScanner and watched with great joy as roughly 5,000
undeliverable SPAM NDRs flowed off the machines and onto the new box. The
queued.usu.edu machine can be much more patient with retries since once mail
is there I'm not in any particular hurry to get it delivered.

YMMV, but it worked for me.

jbh




More information about the MailScanner mailing list