procmail
[Top] [All Lists]

Re: Rule not being honored. Why?

2009-02-10 15:45:35

Doesn't a dot expand to one or more characters other than newline?  Then
that would be what I want.  If I have it only accept space or tab before
the string then, as you say, 
Subject:ZL00
would not be accepted.  But if I want the rule to accept any line with
"L700 NetBackup" anywhere in it, then it should be as I wrote... Or am I
missing something?
-- 
Christopher Barnard
--------------------------------------------------------------------------
comment your code as if the maintainer will be a homicidal maniac who
knows where you live.
 

On Tue, 2009-02-10 at 21:33 +0100, Dallman Ross wrote:
On Tue, Feb 10, 2009 at 02:12:17PM -0600, Christopher L. Barnard wrote:

My golden rule:
:0:
* ^From.*<root(_at_)rudun-nbmaster00(1|2)\.cc1\.rush\.edu>
* ^Subject:.L700 NetBackup
/opt/home/cbarnard/mail/backups

Your second condition should not have a dot there.
Probably it won't come up as a problem for you, but
it has to do with the rigor I wrote about earlier.
That would match on, e.g.,

  Subject:ZL700

Or one day your server configuration whill change and the
message will come with a series of spaces instead of one,
for example.  (That is not so far-fetched: it happened
on the panix server a few years ago when people invoked
SpamAssassin.  SA converted the space after the colon in
the headernames to five spaces!  It took a bunch of people
a while of hacking around to find out what was wrong with
some procmail rules.)  That's why my advice is, just code
it right in the first place and avoid the headache later.

How about:

  * ^Subject:[        ]*L700 NetBackup

(Space and tab in the brackets.)

Dallman
____________________________________________________________
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


____________________________________________________________
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

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