Hello,
I configured sapmassassin with postfix.
Sapmassassin version is spamassassin-3.0.3-4.fc4
Here is my spam filter script..
******************************************************
[EMAIL PROTECTED] log]# cat /usr/local/bin/spamfilter
#variables
SENDMAIL="/usr/sbin/sendmail.postfix -i"
EGREP=/bin/egrep
# Exit codes from <sysexits.h>
EX_UNAVAILABLE=69
# Number of *'s in X-Spam-level header needed to sideline message:
# (Eg. Score of 5.5 = "*****" )
SPAMLIMIT=5
# Clean up when done or when aborting.
trap "rm -f /var/tempfs/out.$$" 0 1 2 3 15
# Pipe message to spamc
cat | /usr/bin/spamc -u spamfilter > /var/tempfs/out.$$
if $EGREP -q "^X-Spam-Level: \*{$SPAMLIMIT,}" < /var/tempfs/out.$$
then
## Change the Email address where you want your spam to get fwd to
$SENDMAIL -f [EMAIL PROTECTED] < /var/tempfs/out.$$
else
###$SENDMAIL "$@" < /var/tempfs/out.$$
$SENDMAIL $@ < /var/tempfs/out.$$
fi
# Postfix returns the exit status of the Postfix sendmail command.
exit $? *
******************************
I made these changes in master.cf file..
Changed this line by adding "-o content_filter=spamfilter:dummy" to the
default
*smtp inet n - n - - smtpd -o
content_filter=spamfilter:dummy *
Added next two lines..
*spamfilter unix - n n - - pipe
flags=Rq user=spamfilter argv=/usr/local/bin/spamfilter -f ${sender}
-- ${recipient} *
Once postfix reloaded I can see that mails are being processed by
spamfilter.
But for some mails I get these kind of error in the log file and user
receives mail from MAILER-DAEMON
Can some please tell me why we get these only for some mail and how to
get rid of this problem.
Jun 7 10:51:44 localmail spamd[14011]: spamd: identified spam
(17.8/6.8) for spamfilter:7715 in 2.3 seconds, 1753 bytes.
Jun 7 10:51:44 localmail spamd[14011]: spamd: result: Y 17 -
MSGID_FROM_MTA_HEADER,MSGID_FROM_MTA_ID,RCVD_IN_BL_SPAMCOP_NET,UNPARSEABLE_RELAY,URIBL_AB_SURBL,URIBL_JP_SURBL,URIBL_OB_SURBL,URIBL_SBL,URIBL_SC_SURBL,URIBL_WS_SURBL
scantime=2.3,size=1753,user=spamfilter,uid=7715,required_score=6.8,rhost=localhost.localdomain,raddr=127.0.0.1,rport=33304,mid=<[EMAIL PROTECTED]>,autolearn=no
Jun 7 10:51:44 localmail postfix/sendmail[14909]: fatal: Recipient
addresses must be specified on the command line or via the -t option
Jun 7 10:51:44 localmail spamd[14009]: prefork: child states: II
Jun 7 17:51:45 localmail postfix/postdrop[14910]: warning: stdin:
unexpected EOF in data, record type 78 length 85
Jun 7 10:51:45 localmail postfix/postdrop[14910]: fatal: uid=7715:
malformed input
Jun 7 10:51:46 localmail postfix/pipe[13865]: DA97E60EB2:
to=<[EMAIL PROTECTED]>, relay=spamfilter, delay=5,
status=bounced (command line usage error. Command output:
sendmail.postfix: fatal: Recipient addresses must be specified on the
command line or via the -t option postdrop: warning: stdin: unexpected
EOF in data, record type 78 length 85 postdrop: fatal: uid=7715:
malformed input )
Jun 7 10:51:46 localmail postfix/cleanup[13864]: 6AF4562F46:
message-id=<[EMAIL PROTECTED]>
Jun 7 10:51:46 localmail postfix/qmgr[13851]: 6AF4562F46: from=<>,
size=3990, nrcpt=1 (queue active)
Jun 7 10:51:46 localmail postfix/qmgr[13851]: DA97E60EB2: removed
Jun 7 10:51:46 localmail postfix/smtp[14867]: 6AF4562F46:
to=<[EMAIL PROTECTED]>, relay=mail.aleks.com[216.34.240.136],
delay=0, status=sent (250 2.0.0 k57HpkM18899 Message accepted for delivery)
Jun 7 10:51:46 localmail postfix/qmgr[13851]: 6AF4562F46: removed
Jun 7 10:51:48 localmail postfix/smtpd[13861]: connect from
ip26.aleks.com[216.34.240.160]
Jun 7 10:51:48 localmail postfix/smtpd[13861]: 5F35C60EB2:
client=ip26.aleks.com[216.34.240.160]
Jun 7 10:51:48 localmail postfix/cleanup[13913]: 5F35C60EB2:
message-id=<[EMAIL PROTECTED]>