OS FreeBSD
DA 1.262
spamd 3.x
|?RW_HEADER_SUB=rewrite_header subject `subject_tag`|
|*if subject_tag=""|
|?RW_HEADER_SUB=|
|*endif|
|*if VERSION3="yes"|
required_score |required_hits|
|RW_HEADER_SUB|
|*else|
required_hits |required_hits|
rewrite_subject |rewrite_subject|
subject_tag |subject_tag|
|*endif|
report_safe |report_safe|
|blacklist_from|
|whitelist_from|
vi /etc/exim.conf
# Spam Assassin
#spamcheck_director:
# driver = accept
# condition = "${if and { \
# {!def:h_X-Spam-Flag:} \
# {!eq {$received_protocol}{spam-scanned}} \
# {!eq {$received_protocol}{local}} \
# {exists{/home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin/user_prefs}} \
# } {1}{0}}"
# retry_use_local_part
# transport = spamcheck
# no_verify
edit to
# Spam Assassin
spamcheck_director:
driver = accept
condition = "${if and { \
{!def:h_X-Spam-Flag:} \
{!eq {$received_protocol}{spam-scanned}} \
{!eq {$received_protocol}{local}} \
{exists{/home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin/user_prefs}} \
} {1}{0}}"
retry_use_local_part
transport = spamcheck
no_verify
#/usr/local/etc/rc.d/exim restart
vi /etc/mail/spamassassin/local.cf
transport_filter = /usr/bin/spamc -u ${lookup{$domain}lsearch*{/etc/virtual/domainowners}{$value}}
Error log
Feb 7 14:17:34 mars spamd[50716]: spamd: connection from localhost.thaipowerhost.com [127.0.0.1] at port 51725
Feb 7 14:17:34 mars spamd[50716]: spamd: setuid to thaipowerh succeeded
Feb 7 14:17:34 mars spamd[50716]: config: failed to parse line, skipping: rewrite_subject 1
Feb 7 14:17:34 mars spamd[50716]: config: failed to parse line, skipping: subject_tag *****SPAM*****
Feb 7 14:17:34 mars spamd[50716]: spamd: processing message <
[email protected]> for thaipowerh:1036
Feb 7 14:17:35 mars spamd[50716]: spamd: identified spam (29.7/10.0) for thaipowerh:1036 in 0.5 seconds, 13767 bytes.
Feb 7 14:17:35 mars spamd[50716]: spamd: result: Y 29 - DATE_IN_PAST_96_XX,FORGED_MSGID_YAHOO,HTML_IMAGE_ONLY_12,HTML_MESSAGE,HTML_SHORT_LINK_IMG_1,MIME_HTML_ONLY,RCVD_HELO_IP_MISMATCH,RCVD_IN_XBL,RCVD_NUMERIC_HELO,URIBL_AB_SURBL,URIBL_JP_SURBL,URIBL_OB_SURBL,URIBL_SBL,URIBL_SC_SURBL,URIBL_WS_SURBL scantime=0.5,size=13767,user=thaipowerh,uid=1036,required_score=10.0,rhost=localhost.thaipowerhost.com,raddr=127.0.0.1,rport=51725,mid=<
[email protected]>,autolearn=spam
Feb 7 14:17:35 mars spamd[55135]: prefork: child states: II