Add mail processor as filter

This commit is contained in:
Antonio J. Delgado 2023-02-09 09:03:32 +02:00
parent a7e84b668e
commit 7685918b9e

View file

@ -12,7 +12,7 @@
# ========================================================================== # ==========================================================================
# SMTP: Port 25 # SMTP: Port 25
smtp inet n - y - - smtpd smtp inet n - y - - smtpd
# -o content_filter=filter: -o content_filter=filter:
# Submission: Port 587 # Submission: Port 587
submission inet n - y - - smtpd submission inet n - y - - smtpd
-o smtpd_tls_security_level=encrypt -o smtpd_tls_security_level=encrypt
@ -42,6 +42,7 @@ flush unix n - y 1000? 0 flush
proxymap unix - - n - - proxymap proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap proxywrite unix - - n - 1 proxymap
smtp unix - - y - - smtp smtp unix - - y - - smtp
-o content_filter=filter:
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - y - - smtp relay unix - - y - - smtp
-o smtp_fallback_relay= -o smtp_fallback_relay=
@ -53,6 +54,7 @@ discard unix - - y - - discard
local unix - n n - - local local unix - n n - - local
virtual unix - n n - - virtual virtual unix - n n - - virtual
lmtp unix - - y - - lmtp lmtp unix - - y - - lmtp
-o content_filter=filter:
anvil unix - - y - 1 anvil anvil unix - - y - 1 anvil
scache unix - - y - 1 scache scache unix - - y - 1 scache
# #
@ -132,8 +134,8 @@ amavis unix y y y - 2 smtp
-o strict_rfc821_envelopes=yes -o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
filter unix - n n - - pipe filter unix - n n - - pipe
flags=Rq user=filter argv=/usr/local/bin/mail_processor.py -f ${sender} -r ${recipient}
# flags=Rq user=filter argv=/etc/postfix/scripts/disclaimer.sh -f ${sender} -- ${recipient} # flags=Rq user=filter argv=/etc/postfix/scripts/disclaimer.sh -f ${sender} -- ${recipient}
flags=Rq user=filter argv=/etc/postfix/scripts/disclaimer.sh -f ${sender} -- ${recipient}
policy-spf unix - n n - - spawn policy-spf unix - n n - - spawn
user=nobody argv=/usr/bin/policyd-spf user=nobody argv=/usr/bin/policyd-spf
greypolicy unix - n n - - spawn greypolicy unix - n n - - spawn