2016-05-19 06:51:20 -05:00
<!DOCTYPE html>
2014-09-30 10:13:21 -05:00
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
2015-08-19 08:11:02 -05:00
< title > Amavisd + SpamAssassin not working? no mail header (X-Spam-*) inserted< / title >
2015-07-31 23:14:52 -05:00
< link rel = "stylesheet" type = "text/css" href = "./css/markdown.css" / >
2014-09-30 10:13:21 -05:00
< / head >
< body >
< div id = "navigation" >
2016-04-19 12:48:51 -05:00
< a href = "/index.html" target = "_blank" >
< img alt = "iRedMail web site"
src="./images/logo-iredmail.png"
style="vertical-align: middle; height: 30px;"
/>
< span > iRedMail< / span >
< / a >
2016-05-18 20:17:26 -05:00
// < a href = "./index.html" > Document Index< / a > < / div > < div class = "admonition note" >
2016-11-11 02:56:08 -06:00
< p class = "admonition-title" > This tutorial is available in other languages. < a href = "https://bitbucket.org/zhb/iredmail-docs/src" > Help translate more< / a > < / p >
2016-05-18 20:17:26 -05:00
< p > < a href = "./no.x-spam.headers-it_IT.html" > Italiano< / a > /< / p >
< / div >
< h1 id = "amavisd-spamassassin-not-working-no-mail-header-x-spam-inserted" > Amavisd + SpamAssassin not working? no mail header (X-Spam-*) inserted< / h1 >
2016-04-24 10:59:07 -05:00
< blockquote >
< p > Amavisd config file is different on different Linux/BSD distributions, you can
find the correct one for your server in this tutorial:
< a href = "./file.locations.html#amavisd" > Locations of configuration and log files of major components< / a > < / p >
< / blockquote >
2016-10-12 20:36:57 -05:00
< p > If you just want to know whether Amavisd + SpamAssassin are working, you can
add setting below to Amavisd config file, then restart Amavisd service. Amavisd
will log verbose message for each processed message in its log file.< / p >
2016-05-17 22:11:11 -05:00
< pre > < code > $log_templ = $log_verbose_templ;
2014-09-30 10:13:21 -05:00
< / code > < / pre >
2015-08-19 08:11:02 -05:00
2016-10-12 20:36:57 -05:00
< p > Sample log:< / p >
< pre > < code > Oct 12 21:26:34 d8 amavis[1389]: (01389-01) Passed CLEAN {RelayedInternal},
ORIGINATING/MYNETS LOCAL [172.16.100.1]:54180 ESMTP/ESMTP < postmaster@a.cn> ->
< amavis@d8.iredmail.org> , (), Queue-ID: 2F322E003E, mail_id: 47G-u3kjLkOz, b:
3tnIDXRGW, Hits: -0.428, size: 316, queued_as: 58A90DFC34, Subject: " mail subject" ,
From: < postmaster@a.cn> , helo=test.com, Tests: [ALL_TRUSTED=-1,INVALID_DATE=0.432,
MISSING_MID=0.14], autolearn=no autolearn_force=no, autolearnscore=0.572,
dkim_new=dkim:a.cn, 19162 ms
< / code > < / pre >
2016-05-17 22:11:11 -05:00
2016-10-12 20:36:57 -05:00
< p > The "Tests:" flag includes spam scanning result from SpamAssassin.< / p >
< p > If you want Amavisd to insert < code > X-Spam-*< / code > headers in each email, please decrease
Amavisd setting < code > $sa_tag_level_deflt< / code > (in Amavisd config file )to a very low
score, e.g. < code > -999< / code > , then restart Amavisd service:< / p >
< pre > < code > $sa_tag_level_deflt = -999;
2014-09-30 10:13:21 -05:00
< / code > < / pre >
2015-08-19 08:11:02 -05:00
2016-05-17 22:11:11 -05:00
< p > That means Amavisd will insert < code > X-Spam-Flag< / code > and other < code > X-Spam-*< / code > headers when
2016-05-19 06:51:20 -05:00
email score > = < code > -999< / code > .< / p > < div class = "footer" >
< p style = "text-align: center; color: grey;" > All documents are available in < a href = "https://bitbucket.org/zhb/iredmail-docs/src" > BitBucket repository< / a > , and published under < a href = "http://creativecommons.org/licenses/by-nd/3.0/us/" target = "_blank" > Creative Commons< / a > license. You can < a href = "https://bitbucket.org/zhb/iredmail-docs/get/tip.tar.bz2" > download the latest version< / a > for offline reading. If you found something wrong, please do < a href = "http://www.iredmail.org/contact.html" > contact us< / a > to fix it.< / p >
< / div >
< script type = "text/javascript" >
2015-02-05 07:02:53 -06:00
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-3293801-21', 'auto');
ga('send', 'pageview');
2014-10-13 19:28:43 -05:00
< / script >
< / body > < / html >