procmail
[Top] [All Lists]

Re: bounce verses forward

1997-03-30 15:28:23
At 12:54 PM 3/30/97 -0800, kari larson wrote:

Does anyone know of a way to bounce mail with a rule verses forward it?
I need to maintain the original From and a forward changes the From to the
forwarded account.

Ummm, you can't do that (at least with procmail as non-root).  I'm
assuming you're talking about "From " (often referred to as From_ here)
rather than the "From:" (with the colon) which *should* be preserved through
the forward.

I hate saying "you can't do that" so I'll be more precise... From_ is
not a RFC822 mail headerfield.  It's generated on receipt from the
SMTP MAIL FROM information; it's not part of the mail message at all.
Non-UNIX systems may not have such information at all.  Thus, when you
bounce/forward/whatever a message, the new receiver is going to get its
own From_ inserted, pointing to the forwarding host.

What you can do as a workaround, perhaps, is grab the "From_" information
and use formail to insert it as a new headerfield, such as "Old-From_:"
(which is what I do when I'm "bouncing" spam to where I want to process it
without losing information which could aid in tracing.)  Then, at the
final destination, do the testing first on "Old-From_:" if it exists.

Some systems will also put the From_ information into Return-Path:, so if
you're lucky and your forwarding site(s) do that, and your destination
site(s) don't overwrite it, you might be able to skip the formail step.
You will lose the From_ date/time information (if you care) unless you
explicitly save it, in any event.

Thank you
Kari

Hope that helps,
Stan

<Prev in Thread] Current Thread [Next in Thread>