[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sieving with procmail



P Kirk wrote:

> At the bottom of the file?  That makes more sense.
> 
> So would this work properly or is there a gotcha I need to think of
> before pitting it at the bottom of .procmailrc?
> 
> # Put mail for that is not addressed to me or a mailinglist 
> # in its own mailbox
> :0:
> * ^(From|Cc|To).*
> $HOME/mail/junkmail

Seems reasonable, but this would be just as good, and is simpler:

:0:
$/HOME/mail/junkmail

Your second line basically says "From, to, or cc'd to anyone", which
doesn't really mean anything, so you can leave it out.

This MUST go at the bottom of .procmailrc, because otherwise the
procmail recipes following it will never be used because this recipe
matches all messages.

Another way to do this, which is arguably better, is to not bother
with this recipe at all, and instead, at the TOP of .procmailrc, set
the DEFAULT variable to $HOME/mail/junkmail, like this:

DEFAULT=$HOME/mail/junkmail

Make sure it's the only DEFAULT= line in the file. This will cause
procmail to put messages into your junkmail folder when they don't
match any of your recipes.

Craig



Reply to: