procmail
[Top] [All Lists]

Re: concurrent sendmails when forwarding

1998-08-15 10:56:16
On 15 August 1998, Walter Haidinger <walter(_dot_)haidinger(_at_)gmx(_dot_)net> 
wrote:
On Sat, 15 Aug 1998, Liviu Daia wrote:

    Different approach: pipe messages to sendmail instead of using
'!' and use the wait flag.  Something along the lines of:

    :0 w
    * <conditions>
    | $SENDMAIL $SENDMAILFLAGS <recipients>

Doesn't this rewrite the from headers?  Now every forward mail by
root's .procmailrc retains its initial from address. It would be quite
inconvenient if all forwarded mails end up with a "from: root" header.

    No.  Sendmail will rewrite the "From_" header (which you can
probably safely ignore), and it will (optionally) add a "From:" if one
doesn't exist, but it won't touch an _existing_ "From:".  Well, actually
it will encode or decode any 8-bit characters in the "From:" according
to the options in sendmail.cf, but it won't change the _meaning_ of the
"From:".  In fact, that's exactly what procmail does too in the '!'
recipes.

BTW: I not quite sure about the filter option:  As I understand it,
if 'f' is applied, then mail is "filtered" through the program and
.procmailrc is continued to be parsed.

    Yes, that's why I added the "/dev/null" fallback in the second
recipe I suggested (the one starting with ":0 fw").  The idea was to
force procmail to stop there.

     Without 'f' procmail stops and continues to check the next mail
     against .procmailrc. Right?

    Only if the recipe is "non-delivering" (see the manual).  The reason
for going through the fun with "/dev/null" is that you can change a
delivering recipe to a non-delivering one, but not the converse.

    Regards,

    Liviu

-- 
Dr. Liviu Daia                   e-mail:   daia(_at_)stoilow(_dot_)imar(_dot_)ro
Institute of Mathematics         web page: http://www.imar.ro/~daia
of the Romanian Academy          PGP key:  finger 
daia(_at_)stoilow(_dot_)imar(_dot_)ro