procmail
[Top] [All Lists]

Re: Please help with questions about Procmail as a filter...

1998-05-18 23:15:54
On Mon, 18 May 1998 18:08:22 -0700, PSE-L(_at_)mail(_dot_)professional(_dot_)org
(Professional Software Engineering) wrote:
4.  THE PURPOSE OF THE SECOND COLON (:) IN THE .PROCMAILRC RECIPES

This is not about the colon, but just a comment on a couple of the
recipes I happened to have a reaction against :-)

:0:
* ^TO(_dot_)*newnet-list(_at_)(_dot_)*eskimo(_dot_)com
nn-list

Don't use .* after ^TO. 

:1Hw:
^Subject.*\$\$
/dev/null

(This is older syntax, did you inherit this recipe? If you're
wondering about random pieces of Procmail's syntax, this one ought to
be confusing. It is equivalent to this, in newer syntax:

    :0Hw # and yes, the lock is unnecessary, like Sean pointed out
    * ^Subject.*\$\$
    /dev/null

You might want to include the colon after Subject: too.)

5.  DIRECTING MAIL THAT IS ADDRESSED TO ME GENERICALLY RATHER THAN
SPECIFICALLY
<...>
:0:
* ! ^TO:georgem(_at_)eskimo\(_dot_)com
$MAILDIR/junkfile

This is not going to work as expected -- take out the colon after ^TO
and, optionally, add a \> after "\.com" (that should prevent some
accidental matches, although perhaps that's too paranoid in this case).

6.  THE MYSTERY OF THE LEADING *ASTERISK*
Asterisks preceed ALL recipe *CONDITION* lines.  That is, the lines which
determine if the recipe *ACTION* is supposed to take place.
My ISP says this leading (*) may not be required for Procmail to
function, but that it may be required with future updated versions of
Whoever told you that is apparently not a user of procmail.

The syntax was changed a few versions ago. The asterisk is part of the
newer, more convenient syntax. 

Plug:
Some more information about many of the things you asked about are in
the FAQ at <http://www.iki.fi/~era/procmail/mini-faq.html>

Hope this helps,

/* era */

-- 
 Paparazzi of the Net: No matter what you do to protect your privacy,
  they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>