procmail
[Top] [All Lists]

Re: Under zealous subject & to filter

2001-06-27 00:55:46
On Tue, Jun 26, 2001 at 03:06:36PM -0700, Cyndi Norman wrote:
   From: Andrew Edelstein <andrew(_at_)pure-chaos(_dot_)com>
   Date: Tue, 26 Jun 2001 14:06:49 -0700

   On Tue, Jun 26, 2001 at 12:27:27PM -0700, Cyndi Norman wrote:
   > :0:
   > * ^TO(CO-CURE(_at_)LISTSERV(_dot_)NODAK(_dot_)EDU)
   > $HOME/Mail/posts/medical

   Why is the address in parens?

Because most of my recipes that are similar have multiple strings in them.
This one just happens to have one, so I left the parentheses.  Would that
affect how it works? or is it just an asthetic thing?

In this case merely aesthetic.
 
   * ^Subject:.*(MedPulse|CO-CURE|CFS-Owners)

Okay, it's time for me to do some serious searching for what the difference
is between (.* and .*( and the addition of _ and other fun things.  Not to
mention the colon you added.

Actually now that I think about it, it really amounts to the same thing, since
procmail is by default case-insensitive in regexps, but IMHO, it's a bit more
precise. Or at least easier to read.

   "SUBJECT" is not a procmail macro; Only TO, TO_, FROM_DAEMON and
   FROM_MAILER.

Not that I don't believe you but I have seen (and used) subject, from, and
others all the time.  They do work...so what does it mean that they aren't
"procmail macros?"

It's not uncommon to see posts on this list where people are trying to match a
header by declaring the header in all caps, expecting procmail will
automatically look for a header defined by that word and match the declared
content, without having to do a proper regexp. "^FROM 
address(_at_)domain(_dot_)tld" is a
classic example. "TO", "TO_", "FROM_DAEMON" and "FROM_MAILER" are special
however, in that they will match things other than those literal words.
Ok, I didn't explain that very well. The procmailrc man page does a much
better job of it.

   What does your log say?

It's not particularly useful.  Here's an example:

From CO-CURE(_at_)LISTSERV(_dot_)NODAK(_dot_)EDU  Tue Jun 26 11:42:51 2001
 Subject:      [CO-CURE] RES: Neuropsychological function in patients with 
CFS,
  Folder: /home/cnorman/inbox                                             3125

Turn on verbose logging and you'll get much more useful info. But turn it off
again once you solve the problem. You'll get huge log files otherwise. :)

I don't know what that final # means.  There's a different one on every
entry.  The log records the same info for every entry; the fact that it
shows from and subject above is not an indication of what it used to
filter.

The size of the message delivered, in bytes.
_______________________________________________
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>