feat: allow disabling bogofilter
This commit is contained in:
parent
193eb10252
commit
a61e429d76
@ -52,6 +52,7 @@ ENV SMTPD_MILTERS=""
|
||||
ENV NON_SMTPD_MILTERS="\$smtpd_milters"
|
||||
ENV MILTER_DEFAULT_ACTION=accept
|
||||
ENV INTERNAL_MAIL_FILTER_CLASSES=bounce
|
||||
ENV BOGOFILTER_ENABLE=""
|
||||
|
||||
# TODO: template access lists
|
||||
|
||||
|
@ -12,4 +12,5 @@ keys = [
|
||||
"/postscreen/dnsbl/threshold",
|
||||
"/postscreen/dnsbl/whitelist/threshold",
|
||||
"/postscreen/greet/action",
|
||||
"/bogofilter/enable",
|
||||
]
|
||||
|
@ -52,9 +52,11 @@ postconf -F dnsblog/unix/private=- \
|
||||
dnsblog/unix/process_limit=0 \
|
||||
dnsblog/unix/command="dnsblog"
|
||||
|
||||
|
||||
{{ if eq (getv "/bogofilter/enable") "yes" }}
|
||||
postconf -P smtpd/pass/content_filter=spamfilter
|
||||
|
||||
{{ else }}
|
||||
postconf -X -P smtpd/pass/content_filter
|
||||
{{ end }}
|
||||
|
||||
# FIXME: template tables instead of creating empty files
|
||||
touch /etc/postfix/rules/postscreen_access_list.cidr
|
||||
@ -81,7 +83,13 @@ postconf -F smtp/inet/private=n \
|
||||
smtp/inet/wakeup=- \
|
||||
smtp/inet/process_limit=- \
|
||||
smtp/inet/command="smtpd"
|
||||
|
||||
{{ if eq (getv "/bogofilter/enable") "yes" }}
|
||||
postconf -P smtp/inet/content_filter=spamfilter
|
||||
{{ else }}
|
||||
postconf -X -P smtp/inet/content_filter
|
||||
{{ end }}
|
||||
|
||||
postconf -M# dnsblog/unix
|
||||
|
||||
{{ end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user