On Mon, 2007-04-30 at 18:56 +0200, Jarry wrote:
> Michael Sullivan wrote:
> > Can anyone tell me how to integrate sendmail and spamassassin? All my
> > efforts till now have failed. Here's my info:
> >
> > baby ~ # emerge -pv sendmail spamassassin procmail
>
> I think you should emerge mail-filter/spamass-milter, then look
> into doc, and edit /etc/mail/sendmail.mc.
>
> I think you must add these lines before any "mailer" line:
> INPUT_MAIL_FILTER(`spamassassin', `S=local:/var/run/spamass-milter.sock,
> F=, T=C:15m;S:4m;R:4m;E:10m')dnl
> define(`confMILTER_MACROS_CONNECT',`b, j, _, {daemon_name}, {if_name},
> {if_addr}')dnl
>
> Finally create sendmail.cf
> m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
>
> Jarry
> --
> _______________________________________________________________
> This mailbox accepts e-mails only from selected mailing-lists!
> Everything else is considered to be spam and therefore deleted.
I did the above and I followed everything in the README.gentoo for
spamass-milter, but still it doesn't work.
Here's /etc/mail/sendmail.mc:
baby ~ # cat /etc/mail/sendmail.mc
divert(-1)
divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`$Id: sendmail.mc,v 1.2 2004/12/07 01:59:31 g2boojum Exp
$')dnl
OSTYPE(linux)dnl
DOMAIN(generic)dnl
#define(`confTO_IDENT',`0s')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`local_lmtp',`/usr/sbin/mail.local')dnl
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
FEATURE(local_procmail)dnl
MASQUERADE_AS(`espersunited.com')dnl
MASQUERADE_DOMAIN(`espersunited.com')dnl
FEATURE(`masquerade_entire_domain')dnl
INPUT_MAIL_FILTER(`spamassassin', `S=local:/var/run/spamass-milter.sock,
F=, T=C:15m;S:4m;R:4m;E:10m')dnl
define(`confMILTER_MACROS_CONNECT',`b, j, _, {daemon_name}, {if_name},
{if_addr}')dnl
define(`confMILTER_MACROS_ENVRCPT',`r, v, Z')
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(pop)dnl
MAILER(procmail)dnl
Here's /etc/mail/spamassassin/local.cf:
baby ~ # cat /etc/mail/spamassassin/local.cf
# This is the right place to customize your installation of
SpamAssassin.
#
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
# Only a small subset of options are listed below
#
###########################################################################
# Add *****SPAM***** to the Subject header of spam e-mails
#
# rewrite_header Subject *****SPAM*****
# Save spam messages as a message/rfc822 MIME attachment instead of
# modifying the original message (0: off, 2: use text/plain instead)
#
report_safe 0
# Set which networks or hosts are considered 'trusted' by your mail
# server (i.e. not spammers)
#
#trusted_networks 70.234.122.
# Set file-locking method (flock is not safe over NFS, but is faster)
#
lock_method flock
# Set the threshold at which a message is considered spam (default:
5.0)
#
required_score 5.0
# Use Bayesian classifier (default: 1)
#
use_bayes 1
# Bayesian classifier auto-learning (default: 1)
#
bayes_auto_learn 1
# Set headers which may provide inappropriate cues to the Bayesian
# classifier
#
# bayes_ignore_header X-Bogosity
# bayes_ignore_header X-Spam-Flag
# bayes_ignore_header X-Spam-Status
#
rewrite_header Subject *****SPAM*****
header DOCTORS Subject =~ /Doctors/
score 2.5
header CELEBRITY Subject =~ /.elebrity/
score CELEBRITY 15.0
header ANATRIM Subject =~ /Anatrim/
score 2.5
header ANATRIM-B Body =~ /.natrim/
score 2.5
header OEM_SOFTWARE Subject =~ /OEM/
score OEM_SOFTWARE 15.0
header ENLARGEMENT Subject =~ /large/
score ENLARGMENT 15.0
header ENHANCEMENT Body =~ /.nhancment/
score ENHANCEMENT 15.0
header PAYPALADDRESS From =~ /paypal.com/
score PAYPALADDRESS 15.0
header GENTOO Subject =~ /gentoo/
score GENTOO 150.0
header SULLIVANFAMILY Subject =~ /Sullivanfamily/
score SULLIVANFAMILY -100.0
But still mail from gentoo-user gets through unmarked. This was my
test. What am I doing wrong?
--
[EMAIL PROTECTED] mailing list