At 14:13 2002-10-11 +0200, Tony L. Svanstrom wrote:
let's ignore all "do the filtering pre the server where I'm doing it"-talk)
from the right Received-line.
You can't just configure your MTA to add an X-Envelope-To: header. You're
not clear in your "pre the server" blurb - is it that you can't configure
your MTA, or that you're using a kludge such as fetchmail instead of
regular MTA message receiption, or what?
The problem is that what I really want to do is to get the env-to at the
first Received-line where the for-part isn't a certain user(_at_)dom(_dot_)tld;
A sed script might be the way to go. Sorry, I don't have one written here
- my MTA is configured to provide envelope information.
solution to not wanting to extend (dom\.tld|dom2.tld) to include all possible
domains (not to mention that the number of domains is very dynamic, and I
don't want to update my procmailrc all the time).
* ^Received: from
.*\<by\<trei\.professional\.org\<.*\<for[ <]+\/[^
<]*\.(com|org|net|biz|co\.uk|whatevertld)
That's a VERY generalized regexp, intended only to put you on a track to
one possibility - including the specific mailhost that you expect to be
identifying the for portion. Technically, it should have a terminating
delimiter - whitespace, semicolon, or closing brace after the address, but
then you'd need to weed that out in a subsequent recipe operating on the
match itself. No need to get into the details of making this a perfect
parser if it isn't doing what you want to do anyway though...
The number of Received-lines between that server and where I'm doing the
filter isn't constant.
Some demonstration of what you're talking about would probably help.
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail