Alex via Postfix-users: > Hi, > I have a fedora40 system with postfix-3.8.5 and would like to configure > header checks depending on the domain. Perhaps there is some kind of > conditional that can be used based on the sending domain? > > For example: > > if recip-domain == example.com > /^From: u...@baddom.tld/ REJECT spam > fi
For multi-criteria rules use an smtpd_milters milter-regex plugin. Example: /etc/postfix/main.cf: smtpd_milters = inet:127.0.0.1:9999 /etc/mail/milter-regex.conf: reject header /From/ /^user@baddom\.tld$/i and envrcpt /@example\.com$/i Specify the "i" flag to make the pattern case-insensitive, and specify the "e" flag to enable "extended" POSIX syntax (enable "(" and ")" for grouping, "|" for alternatives, and "+" for one-or-more). [Plus some systemd or rc file syntax for milter-regex start-up] Wietse _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org