New to procmail and this group.Will any one tell me how to filter out any
mail to any of my users having Subject field as "Junk" or From field as
"abc(_at_)xyz(_dot_)com"(i can do this one in sendmail but how to do this in
procmail).I do not want .procmailrc file or .procmail directory in any
individual user's home directory.I want to filter all mails using a
central file or files. (probably after defining procmail mailer in
sendmail).Is it possible to do the same arrangement for outgoing mails
(with Subject: Junk) also.
Thanks in advance.
You can use /etc/procmailrc, which will be read before any individual
.procmailrc's if they exist. Note
Mine looks like the following and invokes a pile of rules in
/usr/local/etc/spamrc for the fun filters.
It isn't as far as I know possible to do the same with outgoing mail and I'm
not sure I would want to. Local users that spam will get their accounts
deleted. It's the remote spammers that bother me.
(The 'nospam' mailer is invoked on any address of the form
username(_at_)site(_dot_)cmc(_dot_)net, instead of just
username(_at_)cmc(_dot_)net and I am a bad boy and
advertise a wildcard MX for *.cmc.net so a simple change to a news client to
post as username(_at_)news(_dot_)cmc(_dot_)net makes the filters come into
# Procmail Antispam filter rules....
# argument is 'nospam' if this is for the spam filter.
# ack! give up root now!
# nospam mailer: recipient must be a visible To or Cc, and auto-filtered
# through the spamrc.
* ? /usr/ucb/test x$ARGUMENT = xnospam
# Set up our To: and Cc:
TOADDR= "^To: (_dot_)*$LOGNAME(_at_)(_dot_)*\(_dot_)cmc\(_dot_)net"
CCADDR= "^Cc: (_dot_)*$LOGNAME(_at_)(_dot_)*\(_dot_)cmc\(_dot_)net"
# if we're not a To.... see if we're wanted it.
# if user has selected filtering, do the spamrc.
* ? /usr/local/bin/checkfilt c $LOGNAME