SpamAssassin Under CentOS-6.4

Home » CentOS » SpamAssassin Under CentOS-6.4
CentOS 8 Comments

I wonder if anyone is actually running spamassassin with Postfix/Amavisd-new under CentOS-6.4 . I have followed the instructions in

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

8 thoughts on - SpamAssassin Under CentOS-6.4

  • 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.

  • John Hinton wrote:

    Thanks for your response.

    Just to add to my remark above, I realize now that I should have made the change

  • Frank Cox wrote:

    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 in various Howto’s.

    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.

    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.

  • This is a multi-part message in MIME format.
    Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable

    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.


  • Rob Kampen wrote:

    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.

  • 13.07.2013 13:36, Timothy Murphy kirjoitti:

    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.

  • 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/ can be used to). amavisd.conf rewrites common values from both.

    In [1] -> “SpamAssassin returns different score” part is interesting for testing.


    HTH, Larry