SpamAssassin & Exim Still doesn't work, Help!

modem

Verified User
Joined
Apr 7, 2004
Messages
355
Help!

I've spent the last week on this and I have not been able to get SpamAssassin filtering any email. I have used SA 2.55 and even upgraded to SA 2.63 to no avail.

Each time I ran the ./setup.sh script, let it download and install SpamAssassin. From there I backed up and modifed the /etc/exim.conf file. I made sure the spamcheck_director area was uncommented and that the other section of spamassassin was in place. From there I ran the command:

#spamd -d

and

#service exim restart

I really am clueless on this because I've followed the directions to the the letter from the forums on setting it up. Yet nothing. Here is sample headers from one spam i just got:

------------------------------------------------------------------------
Return-path: <[email protected]>
Envelope-to: <emailaddressremoved>
Delivery-date: Fri, 18 Jun 2004 16:22:13 -0400
Received: from mail by stargatesg1.modemnet.biz with spam-scanned (Exim 4.24)
id 1BbPs9-0002f2-4o
for <emailaddressremoved>; Fri, 18 Jun 2004 16:22:13 -0400
Received: from [216.200.145.37] (helo=omta08.mta.everyone.net)
by <emailaddressremoved> with esmtp (Exim 4.24)
id 1BbPs9-0002ez-1K
for <emailaddressremoved>; Fri, 18 Jun 2004 16:22:01 -0400
Received: from imta06.mta.everyone.net (bigip34 [216.200.145.26])
by omta08.mta.everyone.net (Postfix) with ESMTP id 80008BDD24
for <emailaddressremoved>; Fri, 18 Jun 2004 13:22:28 -0700 (PDT)
Received: by imta06.mta.everyone.net (Postfix)
id CC03AA555A; Fri, 18 Jun 2004 13:22:27 -0700 (PDT)
Delivered-To: <emailaddressremoved>
Received: from pmta06.mta.everyone.net (bigiplb-dsnat [172.16.0.19])
by imta06.mta.everyone.net (Postfix) with ESMTP id 56DCBA5546
for <emailaddressremoved>; Fri, 18 Jun 2004 13:22:27 -0700 (PDT)
Received: from fedprt14.ra.utk.edu (160.36.170.30 [160.36.170.30])
by pmta06.mta.everyone.net (EON-PMTA) with SMTP
id 63F68F86; Fri, 18 Jun 2004 13:22:27 -0700
Received: from 184.29.61.160 by 160.36.170.30; Fri, 18 Jun 2004 16:22:23 -0500
Message-ID: <[email protected]>
From: "Cecilia Boucher" <[email protected]>
Reply-To: "Cecilia Boucher" <[email protected]>
To: <emailaddressremoved>
Subject: 556 - Download UNLIMITED Movies, Music, Games, TV Shows, Software, ID: w802lz08
Date: Fri, 18 Jun 2004 16:22:23 -0500
X-Mailer:
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="--8987925118239112363"
------------------------------------------------------------------------


Help!!!!
 
Hello,

Did you run the spamd.sh script?

Also, emails are only scanned when they arrive from outside of the server. Local emails are not scanned.

John
 
Yes I did run the /usr/local/directadmin/scripts/spam.sh script to download and install the 2.55 binaries. I also followed the script that was posted on these forums to upgrade to 2.63 as well.

I have been sending email from outside the local server from domains like @hotmail.com so that I could rule out the event that the local server emails weren't being scanned. Anyway when I do check the header of an incoming email I get:

Received: from mail by stargatesg1.modemnet.biz with spam-scanned (Exim 4.24)

Which is the only item in the header that has info regarding spam or spamassassin. Also when I send an email to [email protected] which is the main admin account, the email bounces back with the following message:

***********
The address to which the message has not yet been delivered is:

[email protected]
Delay reason: transport "spamassassin_userdivert" not found in spamassassin_rp router
***********

Any ideas?





DirectAdmin Support said:
Hello,

Did you run the spamd.sh script?

Also, emails are only scanned when they arrive from outside of the server. Local emails are not scanned.

John
 
No I wasn't using your exim.conf file, but I just backed up the orginial one and installed the exim4.conf file by renaming it and saving it to /etc/exim.conf. I then killed the spamd process, restarted the exim service and restarted spamd -d.

Upon doing that and restarting the services I sent more mail to myself from a hotmail account and I checked the headers again not to find any X-Spam-Status: header information located there. Do I need to make any changes to the /etc/mail/spamassassin/local.cf file in order for it to start filtering spam, to adjust the hit levels and have it modify the spam as an attachment?

Thanks!


DirectAdmin Support said:
Hello,

Are you sure you're using our exim.conf? I've never seen spamassassin_userdivert or spamassassin_rp in our exim.conf. Get ours here: http://files.directadmin.com/services/exim4.conf

John
 
John,

Yes I did uncomment the spamassassin section in the exim.conf. So far to date just for reference I have updated to spamassassin 2.63, updated using the DA's exim4.conf file, uncommenting the sections for SA, killing and restarting spamd -d, as well as restarting the exim service.

Upon all of that I now notice this in the headers:

----------
Return-path: <REMOVED>
Envelope-to: REMOVED
Delivery-date: Mon, 21 Jun 2004 21:16:52 -0400
Received: from mail by stargatesg1.modemnet.biz with spam-scanned (Exim 4.24)
----------

I see where it shows it's being spam-scanned, but nothing shows up about SA catching spam and sending it to me as an attachment with modified subjects or any other headers in the email showing X-Spam: 4 hits, etc.

Now my question is, does this show SpamAssassin as being working fully, but me still needing to configure SA to modify emails etc?
 
Hello,

It doesn't look like it's working correctly.. it would be adding the spam headers if it was. The spam configs should work out of the box, so check your /var/log/exim/mainlog for clues.

John
 
I went through 1000 lines of my exim's log file and there wasn't anything in it about spamassassin not working. The only spam related lines I saw were ones similiar to this:

2004-06-22 07:20:08 1BcjJk-0000VU-Fg <= [email protected] U=mail P=spam-scanned S=7263 [email protected]

2004-06-22 07:20:08 1BcjJk-0000VR-AC => bawalker <removed-address> R=spamcheck_director T=spamcheck


I also upgraded to the latest Exim 4.34 Exiscan patched version of the RPMS's that ProWebUK had listed, I've tried various exim.conf files and nothing is working. Do I need to uninstall SpamAssassin and reinstall it again?
 
Hello,

My only guess is the spamd or spamc programs arn't working. Yes, I'd try installing it again, just run the spamd.sh script from the plugins directory again and watch for any errors. Also try running the spamd and spamc by themselves to see if they're choking on anything.

John
 
I re-ran the spam.sh file and this was it's output. Everything looks fine but I'll post it here for others to inspect to make sure:

[root@stargatesg1 scripts]# ./spam.sh
Writing Makefile for Mail::SpamAssassin
cp spamd/spamc blib/script/spamc
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/spamc
cp sa-learn blib/script/sa-learn
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/sa-learn
cp spamassassin blib/script/spamassassin
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/spamassassin
cp spamd/spamd blib/script/spamd
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/spamd
Manifying blib/man3/Mail::SpamAssassin::AutoWhitelist.3pm
Manifying blib/man1/sa-learn.1
Manifying blib/man3/Mail::SpamAssassin::PersistentAddrList.3pm
Manifying blib/man3/Mail::SpamAssassin.3pm
Manifying blib/man1/spamassassin.1
Manifying blib/man3/Mail::SpamAssassin::ConfSourceSQL.3pm
Manifying blib/man1/spamd.1
Manifying blib/man3/Mail::SpamAssassin::Bayes.3pm
Manifying blib/man3/Mail::SpamAssassin::Conf.3pm
Manifying blib/man3/Mail::SpamAssassin::PerMsgStatus.3pm
Manifying blib/man1/spamc.1
Manifying blib/man3/Mail::SpamAssassin::PerMsgLearner.3pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/spamcheck.pl
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/Dns.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/AutoWhitelist.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/BayesStore.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/Conf.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/Util.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/Message.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/ArchiveIterator.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/SHA1.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/CmdLearn.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/AuditMessage.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/Reporter.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/Locales.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/Bayes.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/DBBasedAddrList.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/HTML.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/TextCat.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/EncappedMessage.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/Win32Locker.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/PerMsgStatus.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/PerMsgLearner.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/EvalTests.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/NoMailAudit.pm
Installing /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/UnixLocker.pm
Installing /usr/share/man/man1/sa-learn.1
Installing /usr/share/man/man1/spamassassin.1
Installing /usr/share/man/man1/spamd.1
Installing /usr/share/man/man1/spamc.1
Installing /usr/share/man/man3/Mail::SpamAssassin::AutoWhitelist.3pm
Installing /usr/share/man/man3/Mail::SpamAssassin::PersistentAddrList.3pm
Installing /usr/share/man/man3/Mail::SpamAssassin.3pm
Installing /usr/share/man/man3/Mail::SpamAssassin::ConfSourceSQL.3pm
Installing /usr/share/man/man3/Mail::SpamAssassin::Bayes.3pm
Installing /usr/share/man/man3/Mail::SpamAssassin::Conf.3pm
Installing /usr/share/man/man3/Mail::SpamAssassin::PerMsgStatus.3pm
Installing /usr/share/man/man3/Mail::SpamAssassin::PerMsgLearner.3pm
Installing /usr/bin/spamc
Installing /usr/bin/sa-learn
Installing /usr/bin/spamassassin
Installing /usr/bin/spamd
Writing /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/Mail/SpamAssassin/.packlist
Appending installation info to /usr/lib/perl5/5.8.0/i386-linux-thread-multi/perllocal.pod
/usr/bin/perl "-MExtUtils::Command" -e mkpath /usr/share/spamassassin
rm -rf /usr/share/spamassassin/*
/usr/bin/perl build/preprocessor -Mvars -DVERSION="2.55" -DPREFIX="/usr" -DDEF_RULES_DIR="/usr/share/spamassassin" -DLOCAL_RULES_DIR="/etc/mail/spamassassin" -DINSTALLSITELIB="/usr/lib/perl5/site_perl/5.8.0" -Irules -O/usr/share/spamassassin 10_misc.cf 20_anti_ratware.cf 20_body_tests.cf 20_compensate.cf 20_head_tests.cf 20_html_tests.cf 20_meta_tests.cf 20_phrases.cf 20_porn.cf 20_ratware.cf 20_uri_tests.cf 23_bayes.cf 25_body_tests_es.cf 25_body_tests_pl.cf 25_head_tests_es.cf 25_head_tests_pl.cf 30_text_de.cf 30_text_es.cf 30_text_fr.cf 30_text_it.cf 30_text_pl.cf 50_scores.cf 60_whitelist.cf user_prefs.template triplets.txt languages
chmod 755 /usr/share/spamassassin
[root@stargatesg1 scripts]#
 
Also spamd -d starts without issue and I was able to start spamc as well. No errors were reported and all started just fine without socket errors or anything else.

I still continue to get:

Received: from mail by stargatesg1.modemnet.biz with spam-scanned (Exim 4.32)

And if I recomment the spam section in exim.conf it doesn't show the spam-scanned message above so it tells me something is trying to work. Although I haven't a clue what thought.
 
Followup: Firewall was blocking the spamd port (783) from localhost... stopped the firewall and it was opened up. (service iptables stop)

John
 
sorry to resurrect this old thread, but my spamassasin is not working. I have followed the instructions in this thread (upgraded exim.conf and stopped iptables) and still there is no spam check headers in inbound email.

Thoughts?
 
is spamd running?
are the lines in exim.conf there to make it use spamassain to check incoming mail

I recently had the problem that the exim startup script wasnt starting spamd, just had to manually edit the file to make it do it :D
 
Back
Top