procmail
[Top] [All Lists]

Re: Argh! Why is procmail doing this?

1998-12-03 13:35:50
You need one more level of parens around the subject strings (and can
afford to lose the quoting of each substring). Do you really receive these
messages with zeroes instead of letter 'O'?

Also:
1. If you mean to use the ^TO token, and not simply to match 'To' at the
   beginning of the line, the ' .*' is unnecessary, and possibly incorrect
   (because of the space -- I'm too lazy right now to test it, but don't
   let that stop you from testing it). If you don't intend the ^TO token,
   use '^To: .*' or (preferably) something tighter to prevent matching
   liamcampbell(_at_)s-1-community(_dot_)net(_dot_)
2. You may be able to use the default lock generated by procmail if you
   don't have an external program with 'vaca.lock' hardcoded and
   unchangeable.
3. The optimization of the 'Re' test is not equivalent to original (it
   allows '[Re ' or 'Re:]') however it is superior in that it does not
   allow 'Subject:  Refreshments after work, free!'
4. You may also want to check for tabs where you check for spaces. Simply
   replace each space in the regexps with [     ] (enclosing a space and a
   tab).

The end result of the subject fix and 1 throuh 3 above is:

:0:
* ^Subject: *(OOt?O|00t?0|out of (the )?(office|town)|on (planned 
)?(vacation|leave))
* ! ^TOmcampbell(_at_)s-?1\(_dot_)com\>
* ! ^Subject: *\[?Re\>
* ! ^X-Loop: ug(_at_)unixgeek(_dot_)com
vacation.spool

I am trying to filter out the numerous (and annoying) "I'm going on
vacation, please contact..." type emails which pervade my office with
the following recipie:

:0:vaca.lock
* ^Subject: (OOt?O)|(00t?0)|(out of (the )?(office|town))|(on (planned 
)?(vacation|leave))

* ! ^TO .*mcampbell@(s1|s-1).com
* ! ^Subject: *(Re|\[Re\]):?
* ! ^X-Loop: ug(_at_)unixgeek(_dot_)com
vacation.spool

Can anyone see why this particular recipie should be catching this mail?
I've grepped my .procmailrc, and there are no other occurances of
"vacation.spool", so I'm pretty sure it's coming from this one.

-- 
Rik Kabel          Old enough to be an adult              
rik(_at_)netcom(_dot_)com