Adam Weremczuk via Postfix-users:
> Hi,
>
> Postfix 2.9.6
>
> Is it possible to only allow certain subnets (LAN and VPN in my case) to
> send to a specific email address?
Multiple criteria are probably more intuitive with postfwd
(www.postfwd.org) or with milter-regex.
Otherwise, this would take a Postfix restriction class:
main.cf:
restriction_classes = allow_certain_subnets
# Uses an inline CIDR table.
allow_certain_subnets = check_client_access cidr:{
{192.168.0.0/24 permit}
{10.0.0.0/8 permit}
# Replace 'reject' with 'discard' after you
# verify that the configuration works as intended
{0.0.0.0/0 reject}}
# Uses an inline hash table.
smtpd_recipient_restrictions =
check_recipient_access inline:{
{[email protected] allow_certain_subnets}}
permit_mynetworks
reject_unauth_destination
...DNSBLs, etc...
But this is not a nice user interface.
Typed from memory. Typos are possible.
Wietse
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]