procmail
[Top] [All Lists]

Re: Recipe Correct

2004-02-04 14:46:15
Thanks for replies!

The reason that I don't use the second colon after :0 is that when
delivering to a maildir or MH format mailbox, you do not need to use a
lock file so the first line of a recipe does not need the second colon.

I'll be testing the recipes shortly.
---
On Wed, 2004-02-04 at 12:43, Professional Software Engineering wrote:
At 12:12 2004-02-04 +1100, Marvin Pierce wrote:
I've got two short recipes and would appreciate someone telling me if
I've written them correctly. Here is recipe #1:

Filters on null subject on just the subject line "Re:" and
off to spam folder:
:0
* ^(Subject:""|^Subject:.*\$\$\$)
* ^(Subject:Re:|RE:|^Subject:.*\$\$\$)
$MAILDIR/spam


quote-quote is going to be interpreted LITERALLY, and the conditions lines 
are all *ANDED*, which means that about the only thing that'll match is a 
subject line of:
         Re:(whatever)$$$

Firthermore, as per the procmail manpage, conditions are CASE INSENSITIVE 
unless you provide a flag to make it otherwise, so there's no difference 
between Re: and RE: here, except that the OR separators in your case are 
improperly set up, and the RE: would be a *HEADER* (follow the 
parens).  MAILDIR is effectively the cwd, and therefore the default 
directory to which messages will be written, so there's no need to specify 
it in the path.  The flags line is missing a lockfile flag, which means the 
write operation in your recipe is less than safe if two messages are 
processed concurrently.


This sould catch what you're probably trying to do:

:0:
* ^Subject:(.*\$\$\$|Re:[       ]*$|$)
spam


Please review my disclaimer page.

---
  Sean B. Straw / Professional Software Engineering

  Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
  Please DO NOT carbon me on list replies.  I'll get my copy from the list.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail




_______________________________________________
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>