Fixes #740 hopefully.

This commit is contained in:
Andrea Dell'Amico 2020-07-12 19:28:37 +02:00
parent 57c20288c6
commit 2510a0e156
2 changed files with 57 additions and 3 deletions

View File

@ -48,12 +48,36 @@ spamassassin_use_bayes: False
spamassassin_bayes_sql_db: '{{ spamassassin_db_user_config }}' spamassassin_bayes_sql_db: '{{ spamassassin_db_user_config }}'
spamassassin_use_bayes_autolearn: '0' spamassassin_use_bayes_autolearn: '0'
spamassassin_use_bayes_auto_expire: '1' spamassassin_use_bayes_auto_expire: '1'
spamassassin_bayes_ignored_headers:
- 'X-Bogosity'
- 'X-Spam-Flag'
- 'X-Spam-Status'
spamassassin_auto_whitelist: False spamassassin_auto_whitelist: False
spamassassin_auto_whitelist_sql_db: '{{ spamassassin_db_user_config }}' spamassassin_auto_whitelist_sql_db: '{{ spamassassin_db_user_config }}'
spamassassin_disable_rbls: False spamassassin_disable_rbls: False
spamassassin_disabled_rbls_list: [] spamassassin_disabled_rbls_list: []
# - bldomain # - bldomain
# - sorbs.net # - sorbs.net
spamassassin_normalize_charset: '0'
# The following do not appear anywhere in the spamassassin code.
# Commented in local.cf for the time being
spamassassin_text_body_scan_size: '50000'
spamassassin_body_part_scan_size: '500000'
#
spamassassin_shortcircuit_plugin: False
spamassassin_shortcircuit_rules:
- { key: 'USER_IN_WHITELIST', value: 'on' }
- { key: 'USER_IN_DEF_WHITELIST', value: 'on' }
- { key: 'USER_IN_ALL_SPAM_TO', value: 'on' }
- { key: 'SUBJECT_IN_WHITELIST', value: 'on' }
- { key: 'USER_IN_BLACKLIST', value: 'on' }
- { key: 'USER_IN_BLACKLIST_TO', value: 'on' }
- { key: 'SUBJECT_IN_BLACKLIST', value: 'on' }
- { key: 'ALL_TRUSTED', value: 'on' }
spamassassin_shortcircuit_bayes_rules:
- { key: 'BAYES_99', value: 'spam' }
- { key: 'BAYES_00', value: 'ham' }
spamassassin_spamd_ssl_enabled: True spamassassin_spamd_ssl_enabled: True
spamassassin_spamd_ssl_opts: '--ssl --server-key {{ spamassassin_home }}/client-key.pem --server-cert {{ spamassassin_home }}/client-cert.pem' spamassassin_spamd_ssl_opts: '--ssl --server-key {{ spamassassin_home }}/client-key.pem --server-cert {{ spamassassin_home }}/client-cert.pem'

View File

@ -1,6 +1,3 @@
# These values can be overridden by editing ~/.spamassassin/user_prefs.cf
# (see spamassassin(1) for details)
# These should be safe assumptions and allow for simple visual sifting # These should be safe assumptions and allow for simple visual sifting
# without risking lost emails. # without risking lost emails.
@ -11,6 +8,9 @@ rewrite_header Subject {{ spamassassin_rewrite_subject }}
use_bayes 1 use_bayes 1
bayes_auto_learn {{ spamassassin_use_bayes_autolearn }} bayes_auto_learn {{ spamassassin_use_bayes_autolearn }}
bayes_auto_expire {{ spamassassin_use_bayes_auto_expire }} bayes_auto_expire {{ spamassassin_use_bayes_auto_expire }}
{% for header in spamassassin_bayes_ignored_headers %}
bayes_ignore_header {{ header }}
{% endfor %}
{% else %} {% else %}
use_bayes 0 use_bayes 0
{% endif %} {% endif %}
@ -30,3 +30,33 @@ pyzor_options --homedir {{ spamassassin_conf_dir }}/pyzor
{% else %} {% else %}
use_pyzor 0 use_pyzor 0
{% endif %} {% endif %}
#
# Whether to decode non- UTF-8 and non-ASCII textual parts and recode
# them to UTF-8 before the text is given over to rules processing.
#
normalize_charset {{ spamassassin_normalize_charset }}
# Amount of data per email text/* mimepart, that will be run through body
# rules. This enables safer and faster scanning of large messages,
# perhaps having very large textual attachments. There should be no need
# to change this well tested default.
#
#body_part_scan_size {{ spamassassin_text_body_scan_size }}
# Textual rawbody data scan limit (default: 500000)
#
# Amount of data per email text/* mimepart, that will be run through
# rawbody rules.
#
#rawbody_part_scan_size {{ spamassassin_body_part_scan_size }}
{% if spamassassin_shortcircuit_plugin %}
loadplugin Mail::SpamAssassin::Plugin::Shortcircuit
{% for rule in spamassassin_shortcircuit_rules %}
shortcircuit {{ rule.key }} {{ rule.value }}
{% endfor %}
{% if spamassassin_use_bayes %}
{% for rule in spamassassin_shortcircuit_bayes_rules %}
shortcircuit {{ rule.key }} {{ rule.value }}
{% endfor %}
{% endif %}
{% endif %}