ansible-role-dovecot/templates/90-antispam.conf.j2
2019-05-30 23:51:58 -03:00

186 lines
6.5 KiB
Django/Jinja

plugin {
##################
# GENERIC OPTIONS
# Debugging options
# Uncomment to get the desired debugging behaviour.
# Note that in some cases stderr debugging will not be as
# verbose as syslog debugging due to internal limitations.
#
# antispam_debug_target = syslog
# antispam_debug_target = stderr
# antispam_verbose_debug = 1
{%- if dovecot_antispam_debug_enable %}
antispam_debug_target = {{ dovecot_antispam_debug_target }}
antispam_verbose_debug = {{ dovecot_antispam_debug_verbosity }}
{%- endif %}
# backend selection, MUST be configured first,
# there's no default so you need to set one of
# these options:
# antispam_backend = crm114
# antispam_backend = dspam
# antispam_backend = pipe
# antispam_backend = spool2dir
antispam_backend = {{ dovecot_antispam_backend }}
# mail signature (used with any backend requiring a signature)
antispam_signature = {{ dovecot_antispam_signature }}
# action to take on mails without signature
# (used with any backend requiring a signature)
# (we recommend only setting this to 'move' after verifying that the
# whole setup is working)
# antispam_signature_missing = move # move silently without training
antispam_signature_missing = {{ dovecot_antispam_signature_missing }}
# The list of folders for trash, spam and unsure can be given
# with three options, e.g. "trash" matches the given folders
# exactly as written, "trash_pattern" accept the * wildcard at
# the end of the foldername, "trash_pattern_ignorecase"
# accepts the * wildcard at the end of the foldername _and_
# matches the name case insensitivly.
# the *-wildcard with the following meaning:
# * at the end: any folder that _start_ with the string
# e.g.:
# antispam_trash_pattern = deleted *;Gel&APY-schte *
# match any folders that start with "deleted " or "Gelöschte "
# match is _case_senstive_!
#
# antispam_trash_pattern_ignorecase = deleted *;Gel&APY-schte *
# match any folders that start with "deleted " or "gelöschte "
# match is _case_insenstive_, except the non-USASCII letters,
# "ö" in this example.
# To match the upper-case Ö, too, you need to add yet another
# pattern "gel&ANY-schte *", note the different UTF7 encoding:
# &ANY- instead of &APY-.
# semicolon-separated list of Trash folders (default unset i.e. none)
# antispam_trash =
# antispam_trash = trash;Trash;Deleted Items; Deleted Messages
# antispam_trash_pattern = trash;Trash;Deleted *
# antispam_trash_pattern_ignorecase =trash;deleted *
antispam_trash = {{ dovecot_antispam_trash }}
# semicolon-separated list of spam folders
# antispam_spam = SPAM
# antispam_spam_pattern = SPAM
# antispam_spam_pattern_ignorecase = junk*;spam*
antispam_spam = {{ dovecot_antispam_spam }}
# semicolon-separated list of unsure folders (default unset i.e. none)
# antispam_unsure =
# antispam_unsure_pattern =
# antispam_unsure_pattern_ignorecase =
# Whether to allow APPENDing to SPAM folders or not. Must be set to
# "yes" (case insensitive) to be activated. Before activating, please
# read the discussion below.
# antispam_allow_append_to_spam = no
###########################
# BACKEND SPECIFIC OPTIONS
#
#===================
# dspam plugin
# dspam binary
# antispam_dspam_binary = /usr/bin/dspam
# semicolon-separated list of extra arguments to dspam
# (default unset i.e. none)
# antispam_dspam_args =
# antispam_dspam_args = --deliver=;--user;%u # % expansion done by dovecot
# antispam_dspam_args = --mode=teft
# Ignore mails where the DSPAM result header contains any of the
# strings listed in the blacklist
# (default unset i.e. none)
# antispam_dspam_result_header = X-DSPAM-Result
# semicolon-separated list of blacklisted results, case insensitive
# antispam_dspam_result_blacklist = Virus
# semicolon-separated list of environment variables to set
# (default unset i.e. none)
# antispam_dspam_env =
# antispam_dspam_env = HOME=%h;USER=%u
#=====================
# pipe plugin
#
# This plug can be used to train via an arbitrary program that
# receives the message on standard input. Since sendmail can be
# such a program, it can be used to send the message to another
# email address for training there.
#
# For example:
# antispam_pipe_program = /path/to/mailtrain
# (defaults to /usr/sbin/sendmail)
# antispam_pipe_program_args = --for;%u
# antispam_pipe_program_spam_arg = --spam
# antispam_pipe_program_notspam_arg = --ham
# antispam_pipe_tmpdir = /tmp
# will call it, for example, like this:
# /path/to/mailtrain --for jberg --spam
#
# The old configuration options from when this plugin was called
# "mailtrain" are still valid, these are, in the same order as
# above: antispam_mail_sendmail, antispam_mail_sendmail_args,
# antispam_mail_spam, antispam_mail_notspam and antispam_mail_tmpdir.
#
# Alternatively, if you need to give multiple options, you can use
# the spam_args/notspam_args parameters (which are used in preference
# of the singular form):
# antispam_pipe_program_spam_args = --spam;--my-other-param1
# antispam_pipe_program_notspam_args = --ham;--my-other-param2
# which will then call
# /path/to/mailtrain --for jberg --spam --my-other-param1
# temporary directory
antispam_pipe_tmpdir = {{ dovecot_antispam_pipe_tmpdir }}
# spam/not-spam argument (default unset which will is not what you want)
antispam_pipe_program_spam_arg = {{ dovecot_antispam_pipe_program_spam_arg }}
antispam_pipe_program_notspam_arg = {{ dovecot_antispam_pipe_program_notspam_arg }}
# binary to pipe mail to
antispam_pipe_program = {{ dovecot_antispam_pipe_program }}
#antispam_pipe_program_args = -f;%u@example.com # % expansion done by dovecot
antispam_pipe_program_args = {{ dovecot_antispam_pipe_program_args }}
#===================
# crm114 plugin
# mailreaver binary
# antispam_crm_binary = /bin/false
# antispam_crm_binary = /usr/share/crm114/mailreaver.crm
# semicolon-separated list of extra arguments to crm114
# (default unset i.e. none)
# antispam_crm_args =
# antispam_crm_args = --config=/path/to/config
# semicolon-separated list of environment variables to set
# (default unset i.e. none)
# antispam_crm_env =
# antispam_crm_env = HOME=%h;USER=%u
# NOTE: you need to set the signature for this backend
# antispam_signature = X-CRM114-CacheID
#===================
# spool2dir plugin
# spam/not-spam spool2dir drop (default unset which will give errors)
# The first %%lu is replaced by the current time.
# The second %%lu is replaced by a counter to generate unique names.
# These two tokens MUST be present in the template! However
# you can insert any C-style modifier as shown.
# antispam_spool2dir_spam = /tmp/spamspool/%%020lu-%u-%%05lus
# antispam_spool2dir_notspam = /tmp/spamspool/%%020lu-%u-%%05luh
}