Re: [SLUG] trouble getting started with procmail

From: kwan@digitalhermit.com
Date: Thu Jan 30 2003 - 10:17:55 EST


On Thu, 30 Jan 2003, Patrick Grantham (at work) wrote:

> Near as I can procmail is installed and running on my suse7.3 mail server.
> I am not certain which files to put rules in. I was expecting to fine a
> .conf or .rc file. Am I on the right track? Where are rules stored in.
> Where would I store a rule to filter email attachments ending in .exe or
> .scr to any user, but forward a copy of the email unfiltered to root?
>
Depends on if you want to filter all mail to the server or just to your
inbox. For local, single user filtering you need a ~/.forward and a
~/.procmailrc file. The .forward should be:
---snip---
  |/usr/bin/procmail
---snip---

Your .procmailrc will contain your rulesets. E.g.:
--snip--
PATH= /usr/local/bin:/bin:/usr/bin
MAILDIR=$HOME/mail
LOGFILE=$HOME/tmp/procmail.log
VERBOSE=no
COMSAT=no
SENDMAIL=/usr/sbin/sendmail

:0:
* ^To.*flux-core@flux.org
flux

:0:
* ^Subject.*SLUG.*
SLUG

--snip--

To use procmail server-wide depends somewhat on your MTA. You'd add an
/etc/procmailrc file containing something like:

--snip--
ORGMAIL /var/spool/mail/$LOGNAME
MAILDIR $HOME/
SENDMAIL /usr/sbin/sendmail

:0fw
| /usr/bin/spamc
--snip

Depending on whether you're using Postfix/Sendmail/Qmail you may need to
do some other minor configs.

BTW, have you looked at SpamAssassin?



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 14:00:22 EDT