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.

hmmm you have misunderstood it? for every host/IP/eange (depending on map type) you list all milters to use.

for non-matching IPs, the list in smtpd_milters is used.

On 28.07.22 17:04, Jesper Dybdal wrote:
If I've understood what you want, then smtpd_milter_maps can do just that.  Here is my smtpd_milter_map file:

# 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

note that the catchall is not needed - simply use smtpd_milters

--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
REALITY.SYS corrupted. Press any key to reboot Universe.

Reply via email to