procmail
[Top] [All Lists]

Re: From header?

1999-05-08 09:16:55
John Conover <conover(_at_)inow(_dot_)com> writes:
The very first record of some email contains the envelope from
address, of the form "From someone(_at_)somewhere(_dot_)com Sat May 08 05:10:31
1999"

When one does:

   :0
   * something
   ! somewhere(_at_)else(_dot_)com

it destroys this record by changing it to:

"From somewhere(_at_)else(_dot_)com Sat May 08 05:10:31 1999".

Its really a sendmail(1) issue, but is there a way of preserving this
record in the email from a procmail script?

      Thanks,

      John

BTW, I guess you know why I want this record. Its was from the "MAIL
FROM:" dialog in the sendmail chat.

Simple: just rename the "From " header to a different name, say,
From_:.  While you're at it, you might as well add and check for an
X-Loop: header to prevent loops:

        :0
        * something
        * ! ^X-Loop: conover(_at_)inow\(_dot_)com
        | formail -A"X-Loop: conover(_at_)inow(_dot_)com" -R"From " "From_:" \
            | $SENDMAIL $SENDMAILFLAGS somewhere(_at_)else(_dot_)com

Some may wonder why it's better to use a different field instead of
just having sendmail use the old "From " address in the forward.  The
reason is that the SMTP MAIL FROM: address (where the "From " address
comes from) is the envelope sender address and will receive any error
messages generated by this message.  If the "somewhere(_at_)else(_dot_)com"
address was to start bouncing, the bounce messages should go to the
address most likely to be able to do something about it.  That's going
to be this account doing the forwarding, _not_ the person who
originally sent the message.  They wouldn't even know why the original
message was being sent to the "somewhere(_at_)else(_dot_)com" address, how are
they supposed to fix it?


Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>
  • From header?, John Conover
    • Re: From header?, Philip Guenther <=