procmail
[Top] [All Lists]

Re: First attempt at a recipe

2003-09-27 15:44:54
On Fri 26 Sep 2003 at 03:18pm -0700, Jason Williams wrote:

Hello everyone.

Im new to procmail, and im excited to start working with it.

What im currently attempting to do is scan all incoming mail
with procmail and if it meets a certain requirement, put it in a
specific users mailbox.

My current setup is I have a mail gateway running spamassassin.
It tags all email it thinks is spam and forwards it to my mail
server. On my mail server, i'm trying to develop a recipe that
will move any email that Either has the [SPAM] in the subject,
or has X-Spam-Flag: YES some where to pass it to an account.

I should mention im working with $HOME/Maildir/ style mailboxes.

This is what I currently have:

$ cat procmailrc
# tell procmail we use Maildir style
DEFAULT="$HOME/Maildir/"
SPAM="/home/spamcop/Maildir/new"

Martin has already pointed out the problem with this line, and a
possible permissions issue.

:0:

For maildir-style mailboxes, you don't need locking, so omit the
trailing colon.

I use maildir also, and for most example recipes you see (which
tend to assume mbox-style mailboxes), you need to remember to
remove the "locking" colon and put the trailing backslash on the
delivery mailbox.

* ^X-Spam-Flag: YES

To combine your desired conditions, you could do:

* ^(X-Spam-Flag: YES|Subject:.*\[SPAM\])

-- 
John

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