I wonder if anyone is actually running SpamAssassin with Postfix/Amavisd-new under CentOS-6.4 . I have followed the instructions in http://wiki.centos.org/HowTos/Amavisd but as far as I can see SpamAssassin is not working.
I should say that I do not understand from this document what is meant to happen to spam. I understand that a Spam header is added, but what actually happens to email considered to be spam?
When I run spamassin --lint I get the response --------------------------------- [tim@alfred ~]$ sudo spamassassin --lint Jul 12 21:59:15.538 [19228] warn: config: failed to parse, now a plugin, skipping, in "/etc/mail/spamassassin/local.cf": ok_languages en it fr de ga --------------------------------- But this is exactly where the ok_languages line is meant to go, according to http://wiki.apache.org/spamassassin/ImproveAccuracy.
On Sat, 13 Jul 2013 00:20:51 +0200 Timothy Murphy wrote:
I wonder if anyone is actually running SpamAssassin with Postfix/Amavisd-new under CentOS-6.4 . I have followed the instructions in http://wiki.centos.org/HowTos/Amavisd but as far as I can see SpamAssassin is not working.
I run spamassassin and postfix on my mailserver, but don't run amavisd.
spamassassin adds a header to incoming email that looks something like this:
X-Spam-Status: No, score=-103.5 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,USER_IN_WHITELIST autolearn=ham version=3.3.1
If the incoming message meets the points threshold that you have set to determine that the message is spam (defaults to 5.0) then the default setting is that the word [SPAM] (including the square brackets) is prepended to the message subject like, like this:
Subject: [SPAM] Buy Viagra from a Nigerian Prince
You can then configure your mail client to trash or sort email based on the presence or absence of the [SPAM] tag in the subject line.
Frank Cox wrote:
I wonder if anyone is actually running SpamAssassin with Postfix/Amavisd-new under CentOS-6.4 . I have followed the instructions in http://wiki.centos.org/HowTos/Amavisd but as far as I can see SpamAssassin is not working.
I run spamassassin and postfix on my mailserver, but don't run amavisd.
Thanks for your response. If I can't get SpamAssassin working with amavisd I'll do that. But I assume someone must have it working since it is referred to in the CentOS wiki.centos.org in various Howto's.
spamassassin adds a header to incoming email that looks something like this:
X-Spam-Status: No, score=-103.5 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,USER_IN_WHITELIST autolearn=ham version=3.3.1
Yes, I realise that, and SpamAssassin on my system works fine if run with sample email spamassassin -D < spammail > spammail.out But as far as I can see, amavisd is not starting spamd running.
You can then configure your mail client to trash or sort email based on the presence or absence of the [SPAM] tag in the subject line.
Unfortunately, as I said, SA does not appear to be processing any email. Amavisd is setup to send any spam to ~/quarantine/ but sadly this directory remains empty.
On 07/13/2013 10:44 PM, Timothy Murphy wrote:
Frank Cox wrote:
I wonder if anyone is actually running SpamAssassin with Postfix/Amavisd-new under CentOS-6.4 . I have followed the instructions in http://wiki.centos.org/HowTos/Amavisd but as far as I can see SpamAssassin is not working.
I run spamassassin and postfix on my mailserver, but don't run amavisd.
Thanks for your response. If I can't get SpamAssassin working with amavisd I'll do that. But I assume someone must have it working since it is referred to in the CentOS wiki.centos.org in various Howto's.
I just checked on my server - no process for spam* but there are 3 for amavis and I get emails into my client with the "***SPAM*** " heading, thus spamassassin is running and doing the task, called and managed by amavisd. I have never done an autopsy on the whole mix as it just worked when I followed the recipe.
spamassassin adds a header to incoming email that looks something like this:
X-Spam-Status: No, score=-103.5 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,USER_IN_WHITELIST autolearn=ham version=3.3.1
Yes, I realise that, and SpamAssassin on my system works fine if run with sample email spamassassin -D < spammail > spammail.out But as far as I can see, amavisd is not starting spamd running.
You can then configure your mail client to trash or sort email based on the presence or absence of the [SPAM] tag in the subject line.
Unfortunately, as I said, SA does not appear to be processing any email. Amavisd is setup to send any spam to ~/quarantine/ but sadly this directory remains empty.
Rob Kampen wrote:
I just checked on my server - no process for spam* but there are 3 for amavis and I get emails into my client with the "***SPAM*** " heading, thus spamassassin is running and doing the task, called and managed by amavisd. I have never done an autopsy on the whole mix as it just worked when I followed the recipe.
Thanks for your response. I too have 3 amavis processes running: one (master) and two (virgin child).
Which recipe did you follow? Please could I see either your amavisd.conf or the diff file between your current version and the original one?
I'm wondering if email is being passed from postfix to amavisd on my system.
On 7/12/2013 6:20 PM, Timothy Murphy wrote:
I wonder if anyone is actually running SpamAssassin with Postfix/Amavisd-new under CentOS-6.4 . I have followed the instructions in http://wiki.centos.org/HowTos/Amavisd but as far as I can see SpamAssassin is not working.
I should say that I do not understand from this document what is meant to happen to spam. I understand that a Spam header is added, but what actually happens to email considered to be spam?
When I run spamassin --lint I get the response
[tim@alfred ~]$ sudo spamassassin --lint Jul 12 21:59:15.538 [19228] warn: config: failed to parse, now a plugin, skipping, in "/etc/mail/spamassassin/local.cf": ok_languages en it fr de ga
But this is exactly where the ok_languages line is meant to go, according to http://wiki.apache.org/spamassassin/ImproveAccuracy.
IIRC, SpamAssassin is run from Amavisd-new so the regular SA daemon does not run on its own.
John Hinton wrote:
I wonder if anyone is actually running SpamAssassin with Postfix/Amavisd-new under CentOS-6.4 . I have followed the instructions in http://wiki.centos.org/HowTos/Amavisd but as far as I can see SpamAssassin is not working.
I should say that I do not understand from this document what is meant to happen to spam. I understand that a Spam header is added, but what actually happens to email considered to be spam?
Thanks for your response.
Just to add to my remark above, I realize now that I should have made the change -------------------------- # $QUARANTINEDIR = undef; # -Q $QUARANTINEDIR = "$MYHOME/quarantine"; # -Q -------------------------- in /etc/amavisd/amavisd.conf , after which spam should go to this directory. However, this change did not affect the fact that email does not appear to be being processed by SpamAssassin.
IIRC, SpamAssassin is run from Amavisd-new so the regular SA daemon does not run on its own.
I realize that, but I don't see any entry in amavisd.conf that will start spamd running. The only relevant entries in amavisd.conf as far as I can see are ------------------------------------ [tim@alfred amavisd]$ grep $sa amavisd.conf $sa_tag_level_deflt = 2.0; # add spam info headers if at, or above that level $sa_tag2_level_deflt = 6.2; # add 'spam detected' headers at that level $sa_kill_level_deflt = 6.9; # triggers spam evasive actions (e.g. blocks mail) $sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent $sa_crediblefrom_dsn_cutoff_level = 18; # likewise, but for a likely valid From # $sa_quarantine_cutoff_level = 25; # spam level beyond which quarantine is off $penpals_threshold_high = $sa_kill_level_deflt; # don't waste time on hi spam $sa_mail_body_size_limit = 400*1024; # don't waste time on SA if mail is larger $sa_local_tests_only = 0; # only tests which do not require internet access? $sa_spam_subject_tag = '***Spam*** '; ------------------------------------ These seem to be the only lines in this file involving SpamAssassin.
However, stopping SpamAssassin and then re-starting amavisd does not re-start SpamAssassin: ----------------------------------- [tim@alfred amavisd]$ sudo service spamassassin stop Stopping spamd: [ OK ] [tim@alfred amavisd]$ ps aux | grep spamd tim 4706 0.0 0.0 103244 840 pts/2 S+ 11:43 0:00 grep spamd [tim@alfred amavisd]$ sudo service amavisd restart Shutting down amavisd: Daemon [4651] terminated by SIGTERM [ OK ] amavisd stopped Starting amavisd: [ OK ]
[tim@alfred amavisd]$ ps aux | grep spamd tim 4734 0.0 0.0 103244 840 pts/2 S+ 11:43 0:00 grep spamd [tim@alfred amavisd]$ -----------------------------------
13.07.2013 13:36, Timothy Murphy kirjoitti:
However, stopping SpamAssassin and then re-starting amavisd does not re-start SpamAssassin:
If you use amavis, you do not need spamassassin as service. amavis links to spamassasin code and acts as it's own service.
Just configure amavis and and you are good.
Also, if the mail is not passed to amavis in your mail flow, you must integrate amavis into your MTA somehow. That depends on the MTA used.
On 07/13/2013 01:20 AM, Timothy Murphy wrote:
I wonder if anyone is actually running SpamAssassin with Postfix/Amavisd-new under CentOS-6.4 . I have followed the instructions in http://wiki.centos.org/HowTos/Amavisd but as far as I can see SpamAssassin is not working.
I should say that I do not understand from this document what is meant to happen to spam. I understand that a Spam header is added, but what actually happens to email considered to be spam?
When I run spamassin --lint I get the response
[tim@alfred ~]$ sudo spamassassin --lint Jul 12 21:59:15.538 [19228] warn: config: failed to parse, now a plugin, skipping, in "/etc/mail/spamassassin/local.cf": ok_languages en it fr de ga
But this is exactly where the ok_languages line is meant to go, according to http://wiki.apache.org/spamassassin/ImproveAccuracy.
Hi! I have this setup working on my servers. Followed the above HowTo. Those can be useful too ( [1] , [2] ). If you have non marked spam messages, see what the headers are.
spamassassin should be off in chkconfig. Amavis starts its own plugin. (When you check status it says spamd is stopped all the time)
Your domain should be listed in @local_domains_maps.
What happens to spam:
$sa_tag2_level_deflt -> Adds $sa_spam_subject_tag to subject and passes the message (on client you can add a filter what to do with those messages) $sa_kill_level_deflt -> triggers spam evasive actions $final_spam_destiny -> says what to be the evasive action (I think :) )
It appeared amavis is chrooted in CentOS-6.4 by default so user_prefs are in /var/spool/amavisd/var/.spamassassin/, if you need more configurations (/etc/mail/spamassassin/local.cf can be used to). amavisd.conf rewrites common values from both.
In [1] -> "SpamAssassin returns different score" part is interesting for testing.
[1] http://www.ijs.si/software/amavisd/#faq-spam [2] http://wiki.apache.org/spamassassin/FrequentlyAskedQuestions
HTH, Larry