[TriLUG] order of operations (sort of) for sendmail

Aaron S. Joyner aaron at joyner.ws
Mon Feb 21 20:51:20 EST 2005


Brian Henning wrote:

> Hi!
>   Would someone mind telling me quickly if procmail processing comes 
> before sendmail rejects based on whether a mailbox exists (my instinct 
> says no...)?  

Procmail happens *after* sendmail has done everything it's ever going to 
do.  When it's finished, it washes it's hands of the message by handing 
it off to Procmail, with a note saying "put it in <suzie's> box".  
Procmail is the "local delivery agent", sendmail is the "mail transport 
agent", after the message is done being transported around, it gets 
locally delivered.

> I want to create a no-reply at mydomain.com that gets /dev/null-ed 
> (rather than causing a bounce to the sender)..  Can I do this with an 
> alias?  

Yes.  The right way to do this is in the aliases file.  Simply create an 
address, and assign it's output to a file, /dev/null.  An entry like 
this in your aliases file will do the trick:
no-reply     /dev/null

Keep in mind of course that will create that address for all mail 
domains hosted on the server in question.

> Or a procmail recipe?  Or do I absolutely have to create a new mailbox?

That will work, but it's not quite as elegant a solution.  Also don't 
forget that depending on how you're doing spam / virus scanning, the 
mail to this address may go through that processor-intensive filter.  So 
if you're throwing a lot of mail into this alias, you might want to 
whitelist it for spam and virus filtering through what ever mechanism is 
appropriate, if possible.

Aaron S. Joyner




More information about the TriLUG mailing list