procmail
[Top] [All Lists]

Re: sendmail & procmail - recipients

1996-09-17 21:21:09
From the keyboard of Stephane Bortzmeyer :

On Monday 16 September 96, at 18 h 30, the keyboard of "Dan T." 
<dragon(_at_)dragon(_dot_)cyberhighway(_dot_)net> wrote:

with no X-Envelope-To header.  I've seen in another post and in the
sendmail docs, that if you remove the "F=m" flag from your Mailer, it will
deliver the message once for each recipient, instead of just once for the
local user delivered too.

No, this is not how I understand it. According to the "Sendmail 
operations guide" (doc/op.me), "m : This mailer can send to multiple 
users on the same host  in  one transaction.  When a $u macro occurs in 
the _a_r_g_v part of the  mailer  definition,  that field will be 
repeated as necessary for all qualifying users.". So, you can call 
programs like uux (for UUCP) only once, saving system resources. 

But omitting the "m" flag doesn't prevent sendmail to "suppress 
duplicates". This is done long before calling the "local" mailer, in 
recipient.c (I checked source code only in sendmail 8.8beta, your mileage 
may vary, see function "recipient"). Run sendmail with debug 26.something 
and you'll see the duplicates suppressed from the queue. 

Eg:
cat testmessage | /usr/lib/sendmail -d11,52.100  an-alias-name
 
Without F=m, 
        procmail (local mailer) will be called once for each local recipient.

        eg procmail -f sender -Y -a -d user1 
           procmail -f sender -Y -a -d user2 

With F=m, 
        procmail will be called once for multiple local recipients.

        eg procmail -f sender -Y -a -d user1 user2

-- 
Ann-Kian Yeo   Internet: yeoak(_at_)iscs(_dot_)nus(_dot_)sg   772-2780
Dept. of Information Systems and Computer Science (DISCS), NUS, Singapore