On 11/8/2016 1:25 μμ, Richard Klingler wrote:
Is there an easy way to block a list of prefixes from accessing postfix?
...
Preferably I would like to combine prefix and domain filtering
as plain helo_checks won't allow regular expression for hostnames.
I think you can use:
smtpd_recipient_restrictions =
...
check_sender_access hash:/etc/postfix/blacklisted_senders
check_client_access cidr:/etc/postfix/blacklisted_prefixes
reject_unverified_recipient
reject_unauth_destination
...
where /etc/postfix/blacklisted_senders:
[email protected] REJECT
example.net REJECT
subd.example.org REJECT
...
and /etc/postfix/blacklisted_prefixes:
192.168.1.1 REJECT
192.168.0.0/16 REJECT
2001:db8::1 REJECT
2001:db8::/32 REJECT
Nick