procmail
[Top] [All Lists]

Re: keeping To: and From_ when forwarding?

1999-01-10 01:55:13
On Sun, 10 Jan 1999, Christopher Lindsey wrote:

} First off, you should probably upgrade to procmail 3.11pre7. It's
} been available for about 2 years now and is quite stable (although
} it'll soon be supplanted by 3.11pre8 (if all goes as planned)).

I know...I use 3.11pre7 on all my ISP accounts, but at work, I ain't root.
:( I may go ahead and install it for my own accounts, as well as the ones
I'm working with though. 

} I would follow it up with a catchall address in case there is no
} envelope address (as is the case with bounce messages).  This
} changes it to
} 
}    TARGET="erosters(_at_)mydomain(_dot_)com"
} 
}    :0 
}    * ^From \/[^ ]+[ ]+
}    | $SENDMAIL -f$MATCH $TARGET
} 
}    :0
}    ! $TARGET

Thanks, Chris for the tips, but the above doesn't mess with the To:
header, I'm afraid. :( The messages must get forwarded, body and subject
intact, with the same From_ and To: headers as they were originally. I've
been able to keep the From_ header by rewriting it (in both egrades' and
erosters' .procmailrcs) using:

: 0fhw
| formail -I "From " -a "From "
 
The program that the erosters .procmailrc forwards mail to looks at the
message to make sure that it is To: erosters (not egrades, as it was
originally addressed by the sender) and it is From_ the sender (the From:
doesn't matter, unfortunately). 

I would think that rewriting the To: header would be easy (since it is
always going to be the same address), but I seem to have hit a mental
block/wall all of the sudden..

/Vince/

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