procmail
[Top] [All Lists]

Re: "TO_" expression incomplete [possible defect in procmail]

2002-10-09 20:11:18
MindFuq <mindfuq(_at_)comcast(_dot_)net> writes:
I get mail such that my address ends up in an Envelope-To field, and
can't capture the message using a TO_ expression because it only looks
for X-Envelope-To.  I'm not sure what to make of the "X-", but it
looks like I'll have to write a specific condition for Envelope-To in
cases where I need it, or perhaps, for every recipe.

Back up a step: if you're trying to match against the envelope
information, which on your system is saved in the Envelope-To: field, why
would you want to use anything *but* a direct match against that field?

To put it another way, if the Envelope-To: field says something different
from the To: and Cc: fields---which happens all the time with mailing
list messages and with Bcc:ed and resent messages---why would you try
to combine them instead of using just the one?


If you're doing any sort of mail routing, then you should only look at the
envelope information and completely ignore the To:, Cc:, and Bcc: fields.
Obviously, ^TO_ (and ^TO) are therefore inappropriate for such a test.

Contrawise, you sometimes want to see whether a message was visibly
addressed to you.  For example, you shouldn't send out a vacation
response to a message that doesn't have your address in the header.
In that case you _don't_ want to match against the envelope information.


The reason I ask is that this seems like an oversight on the part of
the developers, and TO_ should really include a (X-)?Envelope
expression.  Is this something that should be added to a wish list /
bug report?

IMNSHO, the real bug is that ^TO_ (and ^TO) conflate the two tests and
that the documentation doesn't make clear the distinction between them.
There should be another magic token "^ENVTO_" which matches the fields
that typically contain envelope recipients and the existing tokens should
stop matching against those same fields.  That's more likely to happen
than adding additional fields to ^TO_


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