Procmail never seems be invoked by Sendmail the to forward spam tagged
email to the other account.
I just join this mailing list. Any help will be greatly appreciated.
Recently I have worked with the anti-spam project. What I have achieved
is:
I have successfully installed and configured spamassassin and sendmail
in my Linux Redhat Enterprise 4.0. I have this Linux box configured as a
smtp relay with relays all the mail destined to the next MS Exchange
Server. The spamassassin works perfectly with sendmail, it simply
changes subjects for almost all spam mails with !***SPAM ***!. The next
thing I want to do is to forward all spam tagged email to a specific
email account in Ms exchange Server ( ex:
spam_monitor(_at_)companydomain(_dot_)com).
So what I did was I put a procmailrc under /etc/mail, and configured the
sendmail.mc to invoke the procmail to forward spam emails. It is simple
like this. But I can never achieve it. It takes me 2 weeks without
success. Please help. I put my configuration files as below, please feel
free to advise me.
/etc/mail/procmailrc:
# SpamAssassin sample procmailrc
# ==============================
SHELL=/bin/sh
DROPPRIVS=no
VERBOSE=yes
LOGFILE=/var/log/procmail.log
:0fw: spamassassin.lock
* < 256000
| spamassassin
#
:0:
* ^X-Spam-Status: Yes
! spam_monitor(_at_)company(_dot_)net
:0
* ^^rom[ ]
{
LOG="*** Dropped F off From_ header! Fixing up. "
:0 fhw
| sed -e '1s/^/F/'
}
:0 w
! -oi -f "$@"
/etc/mail/sendmail.mc
divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for Red Hat Linux')dnl
OSTYPE(`linux')dnl
define(`SMART_HOST',`exchange-bridge.london.autodata.net')dnl
define(`confDEF_USER_ID',``8:12'')dnl
dnl define(`confAUTO_REBUILD')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define('confSEPARATE_PROC', 'True')dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
FEATURE(local_procmail)
define(`PROCMAIL_MAILER_ARGS', `procmail -m $h $g $u')dnl
define(`PROCMAIL_MAILER_FLAGS', `mSDFMhun')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS',
`authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
define(`confTO_IDENT', `0')dnl
dnl FEATURE(delay_checks)dnl
FEATURE(`no_default_msa',`dnl')dnl
dnl # FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(relay_entire_domain)dnl
dnl #
define(`confMAX_DAEMON_CHILDREN', 12)dnl
dnl #
FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
dnl #
DAEMON_OPTIONS(`Port=smtp,Addr=172.16.129.15, Name=MTA')
dnl #
email sent to "localhost.localdomain" as local email.
dnl #
LOCAL_DOMAIN(`mx1')dnl
dnl #
INPUT_MAIL_FILTER(`spamassassin',
`S=local:/var/run/spammilter/spamass.sock, F=, T=C:15m;S:4m;R:4m;E:10m')
MAILER(local)
MAILER(procmail)
MAILER(smtp)
LOCAL_CONFIG
CPprocmail
LOCAL_RULESETS
LOCAL_RULE_0
R$* < @ $=w > $* $#procmail $@ /etc/mail/procmailrc $:
$1<@$2.procmail.>$3
R$* < @ $=w. > $* $#procmail $@ /etc/mail/procmailrc $:
$1<@$2.procmail.>$3
R$* < @$* .procmail. > $* $1<@$2.>$3 Already filtered, map to
original address
With these setting, Procmail is never being invoked, and procmail log
file is never being generated. I just have no clue. The exception is
that if I set .procmailrc under root folder, the procmail can be
invoked. For the system wide setting procmail seems never working for
the non system accounts.
Thanks again for your attention.
Felix Xia
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail