Adding X_SPAM headers to passed messages

Simon B via amavis-users amavis-users at amavis.org
Tue May 13 22:54:57 CEST 2014


On 13 May 2014 22:43, "James B. Byrne via amavis-users" <
amavis-users at amavis.org> wrote:
>
> CentOS-6.5
> Postfix-2.6.6
> Amavisd-new-2.8.0
> Spamassassin-3.3.1
> OpenDKIM-2.9.0
> pypolicyd-spf-1.2
>
> I wish to have all spam assassin test hits detailed in the headers of all
> messages that pass through the filters.  At the moment messages flagged as
> spam have them and messages that pass do not.  I am informed that
Spamassassin
> does not write the headers when used with amavisd-new but that amavisd
does.
> How do I accomplish what I wish with amavisd?
>
> Note that insofar as I can determine spamassassin is being called by
amavisd
> and is working for I am seeing entries showing Hits in the amavisd.log
file:
>
> May 13 16:31:27 inet08.hamilton.harte-lyne.ca /usr/sbin/amavisd[32762]:
> (32762-15) Blocked SPAM {DiscardedInbound}, [24.237.229.37]:34005
> [24.237.229.37] <dcleve at actuate.com> -> <carter at halisp.net>, Message-ID:
> <4672.45163a.c413 at 37-229-237-24.static.gci.net>, mail_id: 63VIyh92Bktb,
Hits:
> 27.553, size: 3581, 1413 ms
>
> I have the following settings in /etc/amavisd/amavisd.conf:
>
> $sa_tag_level_deflt  = -9999; # add spam info headers if at, or above
that level
> $sa_tag2_level_deflt = 2.5;   # add 'spam detected' headers at that level
> $sa_kill_level_deflt = 3.5;   # triggers spam evasive actions (e.g. blocks
> mail)
> $sa_dsn_cutoff_level = 5.0;   # 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 = 20; # spam level beyond which quarantine is
off
> $penpals_bonus_score = 8;    # (no effect without a @storage_sql_dsn
database)
> $penpals_threshold_high = $sa_kill_level_deflt;  # don't waste time on hi
spam
> $bounce_killer_score = 100;  # spam score points to add for joe-jobbed
bounces
>
> I have the following settings in /etc/mail/spamassassin/local.cf
>
> # Headers to show
> add_header all DCC _DCCB_: _DCCR_
> add_header all Level _STARS(*)_
> add_header all Pyzor _PYZOR_
> add_header all Report _REPORT_
>
> # Detail causes for spam classification - Used with BAYES_99 etc.
> # _HAMMYTOKENS(N)_  the N most significant hammy tokens (default, 5)
> # _SPAMMYTOKENS(N)_ the N most significant spammy tokens (default, 5)
> report Report        _SPAMMYTOKENS(25)_
> report Report        _HAMMYTOKENS(25)_
>
>
> I desire to see all Spamassassin hits in each message, whether it passes
of
> not and regardless of the Score.  How is this done?

This link
http://blog.dmitryleskov.com/small-hacks/forcing-spamassassin-to-add-the-x-spam-status-header-to-ham-for-debugging/has
3 solutions - one of which I'm sure will work for you.

Incidentally it was the first result from this search query...
https://www.google.com/m?hl=en-US&ie=UTF-8&pws=0#hl=en&pws=0&q=amavisd-new+spamassassin+headers

Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.amavis.org/pipermail/amavis-users/attachments/20140513/d1071a0a/attachment.html>


More information about the amavis-users mailing list