.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "Mail::MtPolicyd::Plugin::SaAwlAction 3pm"
.TH Mail::MtPolicyd::Plugin::SaAwlAction 3pm "2020-06-03" "perl v5.30.2" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
Mail::MtPolicyd::Plugin::SaAwlAction \- mtpolicyd plugin for checking spamassassin AWL reputation
.SH "VERSION"
.IX Header "VERSION"
version 2.04
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This plugin will execute an action or score based on a previous lookup
done with SaAwlLookup plugin.
.SH "PARAMETERS"
.IX Header "PARAMETERS"
.IP "result_from (required)" 4
.IX Item "result_from (required)"
Take the \s-1AWL\s0 information from the result of this plugin.
.Sp
The plugin in must be executed before this plugin.
.IP "(uc_)enabled (default: on)" 4
.IX Item "(uc_)enabled (default: on)"
Enable/disable this plugin.
.IP "(uc_)mode (default: reject)" 4
.IX Item "(uc_)mode (default: reject)"
If set to 'passive' no action will be returned.
.IP "reject_message (default: 'sender address/ip has bad reputation')" 4
.IX Item "reject_message (default: 'sender address/ip has bad reputation')"
Could be used to specify an custom reject message.
.IP "score (default: empty)" 4
.IX Item "score (default: empty)"
A score to apply to the message.
.IP "score_factor (default: empty)" 4
.IX Item "score_factor (default: empty)"
A factor to apply the \s-1SA\s0 score to the message.
.Sp
Do not configure a score if you want to use the factor.
.IP "min_count (default: 10)" 4
.IX Item "min_count (default: 10)"
The minimum count of mails/scores spamassassin must have
done on this sender/ip before the \s-1AWL\s0 entry is used.
.Sp
If the count in AWLs auto-whitelist table is below this
count the test will be skipped.
.IP "threshold (default: 5)" 4
.IX Item "threshold (default: 5)"
At this threshold the action or score will be applied.
.IP "match (default: gt)" 4
.IX Item "match (default: gt)"
The default is to match values greater(\*(L"gt\*(R") than the threshold.
.Sp
When configured with 'lt' \s-1AWL\s0 scores less than the threshold will
be matched.
.SH "EXAMPLE"
.IX Header "EXAMPLE"
Check that \s-1AWL\s0 is active in your SA/amavis configuration:
.PP
.Vb 2
\& loadplugin Mail::SpamAssassin::Plugin::AWL
\& use_auto_whitelist 1
.Ve
.PP
Make sure that mtpolicyd has permissions to read the auto-whitelist db:
.PP
.Vb 3
\& $ usermod \-G amavis mtpolicyd
\& $ chmod g+rx /var/lib/amavis/.spamassassin
\& $ chmod g+r /var/lib/amavis/.spamassassin/auto\-whitelist
.Ve
.PP
Make sure it stays like this when its recreated in your \s-1SA\s0 local.cf:
.PP
.Vb 1
\& auto_whitelist_file_mode 0770
.Ve
.PP
Net::Server does not automatically set supplementary groups.
You have to do that in mtpolicyd.conf:
.PP
.Vb 1
\& group="mtpolicyd amavis"
.Ve
.PP
Permissions may be different on your system.
.PP
To check that mtpolicyd can access the file try:
.PP
.Vb 1
\& $ sudo \-u mtpolicyd \-\- head \-n0 /var/lib/amavis/.spamassassin/auto\-whitelist
.Ve
.PP
Now use it in mtpolicyd.conf:
.PP
.Vb 4
\&
\& module = "SaAwlLookup"
\& db_file = "/var/lib/amavis/.spamassassin/auto\-whitelist"
\&
.Ve
.PP
For whitelisting you may configure it like:
.PP
.Vb 7
\&
\& module = "SaAwlAction"
\& result_from = "amavis\-reputation"
\& mode = "accept"
\& match = "lt"
\& threshold = "0"
\&
.Ve
.PP
Or apply a score based for bad \s-1AWL\s0 reputation (score > 5):
.PP
.Vb 8
\&
\& module = "SaAwlAction"
\& result_from = "amavis\-reputation"
\& mode = "passive"
\& match = "gt"
\& threshold = 6
\& score = 5
\&
.Ve
.PP
Or apply the score value from \s-1AWL\s0 with an factor:
.PP
.Vb 8
\&
\& module = "SaAwlAction"
\& result_from = "amavis\-reputation"
\& mode = "passive"
\& match = "gt"
\& threshold = 5
\& score_factor = 0.5
\&
.Ve
.PP
If the score in \s-1AWL\s0 is >5 it will apply the score with an factor of 0.5.
When the score in \s-1AWL\s0 is 8 it will apply a score of 4.
.PP
Or just reject all mail with a bad reputation:
.PP
.Vb 8
\&
\& module = "SaAwlAction"
\& result_from = "amavis\-reputation"
\& mode = "reject"
\& match = "gt"
\& threshold = 5
\& reject_message = "bye bye..."
\&
.Ve
.SH "Troubleshooting"
.IX Header "Troubleshooting"
.SS "Check content of spamassassin \s-1AWL\s0 auto-whitelist"
.IX Subsection "Check content of spamassassin AWL auto-whitelist"
To check the content of the auto-whitelist database use the sa-awl command:
.PP
.Vb 1
\& $ sa\-awl /var/lib/amavis/.spamassassin/auto\-whitelist | grep
.Ve
.SH "SEE ALSO"
.IX Header "SEE ALSO"
.IP "Spamassassin AutoWhitelist manual" 4
.IX Item "Spamassassin AutoWhitelist manual"
.IP "Spamassassin \s-1AWL\s0 plugin reference" 4
.IX Item "Spamassassin AWL plugin reference"
.SH "AUTHOR"
.IX Header "AUTHOR"
Markus Benning
.SH "COPYRIGHT AND LICENSE"
.IX Header "COPYRIGHT AND LICENSE"
This software is Copyright (c) 2014 by Markus Benning .
.PP
This is free software, licensed under:
.PP
.Vb 1
\& The GNU General Public License, Version 2, June 1991
.Ve