On 2022-07-28 13:17, Ivars Strazdiņš wrote:
The example for smtpd_milter_maps setting seems to be all or none approach - it seems not possible to configure postfix to apply only some milters based on client’s IP address.
If I've understood what you want, then smtpd_milter_maps can do just that. Here is my smtpd_milter_map file:
# # jd 2022-06-07 # # Milter selection for external mail # # Most client IP addresses need both milters: # amavisd-milter: inet:127.0.0.1:10029 # opendmarc: inet:127.0.0.1:10030 # # but for some mailing list IP addresses we skip # opendmarc to avoid false positives. # # Disabling all milters can be done with a # RHS of "DISABLE" here. That would disable # Amavis, including spamassassin and DKIM, # and DMARC check, so it would not be a good # idea. # # The Postfix mailing list seems to send from some # of these addresses: 168.100.1.0/28 inet:127.0.0.1:10029 # bendel.debian.org: Debian mailing lists: 82.195.75.100 inet:127.0.0.1:10029 # vger.kernel.org: Netfilter mailing list: 23.128.96.18 inet:127.0.0.1:10029 # postfix.charite.de: Amavis mailing list: 141.42.206.35 inet:127.0.0.1:10029 # lists.clamav.net: ClamAv mailing list: 192.34.61.247 inet:127.0.0.1:10029 # Catchall: use both milters for all other client addresses # (IPv6 included just in case it becomes relevant some day): 0.0.0.0/0 inet:127.0.0.1:10029,inet:127.0.0.1:10030 ::/0 inet:127.0.0.1:10029,inet:127.0.0.1:10030 -- Jesper Dybdal https://www.dybdal.dk