procmail
[Top] [All Lists]

re: Envelope-to and ^TO

2002-04-29 19:01:34
spamreg(_at_)mail(_dot_)dk writes:
My MTU (exim) add the following header:
Envelope-to:
to all mails which is nice.

But do the ^TO macro catches that one?
...
and that doesn't incl "Envelope-to:"

so a mail with fake headers but correct "Envelope-to:" header will not be 
sorted correctly by my procmail filters if I have:

:0 H
* ^TO_secret(_at_)secret(_dot_)com
! echelon(_at_)topsecret(_dot_)com

If you want messages sent to a given address to be forwarded elsewhere,
use an alias, or match explicitly on the envelope information.  It sounds
like you should just be using:

        :0
        * ^X-Envelope-To:[      ]*secret(_at_)secret\(_dot_)com
        ! echelon(_at_)topsecret(_dot_)com

and not using the ^TO_ or ^TO tokens at all.  The ^TO_ and ^TO tokens
are most useful, in my view, for determining whether a message was
addressed to you, not whether you received it, i.e., it's a match on
the header recipient fields, not the envelope recipient.  This is useful
for things like vacation recipes, where you only want to send a response
if the message was addressed to you and not respond to messages sent to
aliases or mailing lists.

Virtual domain situations should be using the envelope information
appropriate for the setup, *not* ^TO_.

Perhaps X-Envelope-To: should be removed from the ^TO_ and ^TO expansions.


Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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