cat
procmailrc
# The # denotes the
original info in the file.
#DROPPRIVS=yes
#:0fwHB
#|
/usr/bin/spamassassin
#:0
#* ^X-Spam-Status:
Yes
#$HOME/spam
####################################################################
#
#
This is the new procmail
procedure.
#
####################################################################
DROPPRIVS=yes
#
SpamAssassin sample procmailrc
#
# Pipe the mail through spamassassin
(replace 'spamassassin' with 'spamc'
# if you use the spamc/spamd
combination)
#
# The condition line ensures that only messages smaller
than 250 kB
# (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most
spam
# isn't bigger than a few k and working with big messages can bring
#
SpamAssassin to its knees.
#
# The lock file ensures that only 1
spamassassin invocation happens
# at 1 time, to keep the load
down.
#
#:0fw: spamassassin.lock
:0fw: spamc.lock
* <
256000
#| spamassassin
|spamc
# Mails with a score
of 15 or higher are almost certainly spam (with 0.05%
# false positives
according to rules/STATISTICS.txt). Let's put them in a
# different mbox.
(This one is optional.)
:0:
* ^X-Spam-Level:
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
almost-certainly-spam
# All mail tagged as
spam (eg. with a score higher than the set threshold)
# is moved to
"probably-spam".
:0:
* ^X-Spam-Status:
Yes
probably-spam
# Work around procmail
bug: any output on stderr will cause the "F" in "From"
# to be dropped.
This will re-add it.
:0
* ^^rom[ ]
{
LOG="*** Dropped F off
From_ header! Fixing up. "
:0
fhw
| sed -e '1s/^/F/'
}
=====
Master.cf file
#
==========================================================================
#
service type private unpriv chroot wakeup maxproc
command +
args
#
(yes) (yes) (yes) (never) (100)
#
==========================================================================
smtp
inet n
- n
- -
smtpd -o content_filter=spamassassin
#submission inet
n -
n -
-
smtpd
# -o
smtpd_etrn_restrictions=reject
#628 inet
n -
n -
- qmqpd
pickup
fifo n
- n
60 1
pickup
cleanup unix n
- n
- 0
cleanup
qmgr fifo
n -
n 300
1 qmgr
#qmgr
fifo n
- n
300 1
oqmgr
rewrite unix -
- n
- -
trivial-rewrite
bounce unix
- -
n -
0 bounce
defer
unix -
- n
- 0
bounce
trace unix
- -
n -
0 bounce
verify
unix -
- n
- 1
verify
flush unix
n -
n 1000?
0 flush
proxymap unix
- -
n -
-
proxymap
smtp unix
- -
n -
- smtp
relay
unix -
- n
- -
smtp
# -o smtp_helo_timeout=5 -o
smtp_connect_timeout=5
showq unix
n -
n -
- showq
error
unix -
- n
- -
error
local unix
- n
n -
- local
virtual unix
- n
n -
-
virtual
lmtp unix
- -
n -
- lmtp
anvil
unix -
- n
- 1
anvil
spamassassin
unix -
n n
- -
pipe
user=nobody argv=/usr/bin/spamc -f -e
/usr/sbin/sendmail -oi -f ${sender} ${recipient}
#
# Interfaces to
non-Postfix software. Be sure to examine the manual
# pages of the
non-Postfix software to find out what options it wants.
#
# maildrop. See
the Postfix MAILDROP_README file for details.
#
maildrop unix
- n
n -
- pipe
flags=DRhu user=vmail
argv=/usr/local/bin/maildrop -d ${recipient}
#
# The Cyrus deliver program
has changed incompatibly, multiple times.
#
old-cyrus unix
- n
n -
- pipe
flags=R user=cyrus
argv=/cyrus/bin/deliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos
Gouaux)
# Also specify in main.cf:
cyrus_destination_recipient_limit=1
cyrus unix
- n
n -
- pipe
user=cyrus
argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension}
${user}
uucp unix
- n
n -
- pipe
flags=Fqhu user=uucp
argv=uux -r -n -z -a$sender - $nexthop!rmail.postfix
($recipient)
ifmail unix
- n
n -
- pipe
flags=F user=ftn
argv=/usr/lib/ifmail/ifmail -r $nexthop
($recipient)
bsmtp unix
- n
n -
- pipe
flags=Fq. user=foo
argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
=====
Thanks
Gary Manigault
Sr.
Systems Analyst
765.983.8146