Mail::MtPolicyd::Plugin::SaAwlAction(3pm) | User Contributed Perl Documentation | Mail::MtPolicyd::Plugin::SaAwlAction(3pm) |
Mail::MtPolicyd::Plugin::SaAwlAction - mtpolicyd plugin for checking spamassassin AWL reputation
version 2.05
This plugin will execute an action or score based on a previous lookup done with SaAwlLookup plugin.
The plugin in must be executed before this plugin.
Do not configure a score if you want to use the factor.
If the count in AWLs auto-whitelist table is below this count the test will be skipped.
When configured with 'lt' AWL scores less than the threshold will be matched.
Check that AWL is active in your SA/amavis configuration:
loadplugin Mail::SpamAssassin::Plugin::AWL use_auto_whitelist 1
Make sure that mtpolicyd has permissions to read the auto-whitelist db:
$ usermod -G amavis mtpolicyd $ chmod g+rx /var/lib/amavis/.spamassassin $ chmod g+r /var/lib/amavis/.spamassassin/auto-whitelist
Make sure it stays like this when its recreated in your SA local.cf:
auto_whitelist_file_mode 0770
Net::Server does not automatically set supplementary groups. You have to do that in mtpolicyd.conf:
group="mtpolicyd amavis"
Permissions may be different on your system.
To check that mtpolicyd can access the file try:
$ sudo -u mtpolicyd -- head -n0 /var/lib/amavis/.spamassassin/auto-whitelist
Now use it in mtpolicyd.conf:
<Plugin amavis-reputation> module = "SaAwlLookup" db_file = "/var/lib/amavis/.spamassassin/auto-whitelist" </Plugin>
For whitelisting you may configure it like:
<Plugin awl-whitelist> module = "SaAwlAction" result_from = "amavis-reputation" mode = "accept" match = "lt" threshold = "0" </Plugin>
Or apply a score based for bad AWL reputation (score > 5):
<Plugin awl-score-bad> module = "SaAwlAction" result_from = "amavis-reputation" mode = "passive" match = "gt" threshold = 6 score = 5 </Plugin>
Or apply the score value from AWL with an factor:
<Plugin awl-score-bad> module = "SaAwlAction" result_from = "amavis-reputation" mode = "passive" match = "gt" threshold = 5 score_factor = 0.5 </Plugin>
If the score in AWL is >5 it will apply the score with an factor of 0.5. When the score in AWL is 8 it will apply a score of 4.
Or just reject all mail with a bad reputation:
<Plugin awl-reject> module = "SaAwlAction" result_from = "amavis-reputation" mode = "reject" match = "gt" threshold = 5 reject_message = "bye bye..." </Plugin>
To check the content of the auto-whitelist database use the sa-awl command:
$ sa-awl /var/lib/amavis/.spamassassin/auto-whitelist | grep <user>
Markus Benning <ich@markusbenning.de>
This software is Copyright (c) 2014 by Markus Benning <ich@markusbenning.de>.
This is free software, licensed under:
The GNU General Public License, Version 2, June 1991
2022-10-15 | perl v5.34.0 |