procmail
[Top] [All Lists]

Re: bug in ^TO_ macro: character '+' *is* allowed in emails

2004-11-26 04:34:21
On Thu, Nov 25, 2004 at 07:25:36PM -0800, Tristan Savatier wrote:
Then ^TO_ should use something like:

[^-a-zA-Z0-9_.+'=]

Also, in the same category, i noticed that the ^FROM_DAEMON macro is very
dangerous, as it catches email with sender's name (not just email address)
containing the word "system".

It caught a mail with the (questionable) header line:

From: "ACCA Recording Products" <acca(_at_)accaproducts(_dot_)com>(through 
Yahoo! Store
Order System)

(this was a confirmation of an on-line order with a yahoo-associate store).

Not sur why this was caught by ^FROM_DAEMON, but that's definitely another
problem with a macro reg-exp...


I'm not entirely sure what to make of your choice of the word "dangerous."
If you mean "likely to pick up things wholly unexpected when one
contemplates what the word 'daemon' means to oneself," well, maybe.
But otoh, it's very hard to code something that's supposed to be all-
inclusive and yet have it not ever surprise anybody with an overly
generous catch.  Nigh on impossible, I would say.  And the ^FROM_DAEMON
macro tries very hard to be all-inclusive.  You have to admit that
there are going to be daemon messages identifiable by the term "system."
The coder made a judgment call at the time of the coding about the
usefulness of including the term versus the lost utility in leaving
it out -- or versus the irritation of overbroad matches.   These
judgment calls clearly have to have some kind of murky fudge-factor
involved in their making.

Remember --as I said in my other posting of a few minutes ago -- to
keep this all in the context of what a macros is: it's nothing more
than a convenient shortcut that's hard-coded for you to use, if you
find it useful to do so.  

-- 
dman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail