procmail
[Top] [All Lists]

questions about ^TO_ and MATCH

1999-12-03 19:16:24
When I updated my Procmail Quick Start, I read a lot about the
^TO_ expression and thought that I understood that it only tries
to match on an email address, e.g., the part inside the angle
brackets in this example To header:

 To: "Framers (E-mail)" <framers(_at_)FrameUsers(_dot_)com>

But today I got inspired by the speed-up discussion and decided
to try a recipe like this:

 :0:
 * 
^TO_\/(procmail|pine-info|vim|copyediting-l|techwr-l|cygwin|framers|veg-nyc|faq-maintainers|pine-alpha)
 in-l-$MATCH

And discovered that a msg with the above To header was put into a
folder named:

 in-l-Framers

which means that ^TO_ is looking at a comment (the part inside
the quotation marks). Shouldn't it just be looking at the part in
the angle brackets? I know I could go read the web pages about
the ^TO_ expression *again* but maybe someone here has any easy
explanation?

And here are some questions about my recipe above.

I'm thinking about adding an @ sign at the end of the condition
so it would look like this:

 :0:
 * 
^TO_\/(procmail|pine-info|vim|copyediting-l|techwr-l|cygwin|framers|veg-nyc|faq-maintainers|pine-alpha)@
 in-l-$MATCH

so that it's more likely that it will actually match on an email
address rather than a comment. But I don't really want my file
names to end with an @ so I'm wondering what's the best way to
truncate the last letter of the $MATCH and does that defeat some
of the speed-saving I'm getting by processing all my mailing
lists with this one recipe.

Another problem with the above recipe is that some of the mailing
lists use ALL CAPS, e.g., COPYEDITING-L and TECHWR-L, and the
framers mailing list uses whatever the sender of the message used
(i.e., the mailing list software does not rewrite the header) so
it shows up sometimes as "framers" and sometimes as "Framers" and
I suppose that if someone addressed it to "FrAmErS" it would show
up that way. So I'd like to convert the MATCH to all lower case
and I'm wondering 1) what's the best way to do this and 2) does
this defeat a lot of the speed up? Probably I will separate the
troublesome lists into a separate recipe so that all the nicely
behaved lists (like the procmail list :-) are handled by the
efficient recipe.

Thanks for any tips about all this,
Nancy

-- 
For Procmail info, see www.ii.com/internet/robots/procmail/qs/
 
©Nancy McGough         http://www.ii.com/         Infinite Ink
--= Sent via PINE 4.21: Internet News & Email for Win/Unix =--


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