MythicSalt/states/email/exim4/local_check_data

44 lines
1.5 KiB
Plaintext

# From rspamd docs.
# skip scanning for authenticated users (if desired?)
accept authenticated = *
# scan the message with rspamd
warn spam = Debian-exim:true
# This will set variables as follows:
# $spam_action is the action recommended by rspamd
# $spam_score is the message score (we unlikely need it)
# $spam_score_int is spam score multiplied by 10
# $spam_report lists symbols matched & protocol messages
# $spam_bar is a visual indicator of spam/ham level
# use greylisting available in rspamd v1.3+
#defer message = Please try again later
# condition = ${if eq{$spam_action}{soft reject}}
#deny message = Message discarded as high-probability spam
# condition = ${if eq{$spam_action}{reject}}
# Mythic's rspamd will have refused any RBL failures. Leave the rest
# of the spam judgements up to our rspamd. If we think it's spam,
# remove previous spam judements.
warn remove_header = x-spam-bar : x-spam-score : x-spam-report : x-spam-status
# add spam-score and spam-report header when "add header" action is recommended by rspamd
warn
condition = ${if eq{$spam_action}{add header}}
add_header = X-Spam-Score: $spam_score ($spam_bar)
add_header = X-Spam-Report: $spam_report
# add x-spam-status header if message is not ham
warn
! condition = ${if match{$spam_action}{^no action\$|^greylist\$}}
add_header = X-Spam-Status: Yes
# add x-spam-bar header if score is positive
warn
condition = ${if >{$spam_score_int}{0}}
add_header = X-Spam-Bar: $spam_bar