I need some specific LAN subnets to send e-mail to only my corporate domain such as printers or kiosks. How it could be possible via Postfix?
2 Answers
Set up different instances of postfix with the listener in the subnet, set mynetworks to be that subnet, don't allow mail from elsewhere, set the corporate mail domain as a valid relay domain. This is quite simple with
check_sender_access
.Create an allowed sender group, with
check_sender_access
you can allow or disallow by IP or subnet also. Have a look at the access documentation for more information
thanks. here is the steps that worked for me:
in main.cf
smtpd_client_restrictions =
check_client_access hash:/etc/postfix/check_client_access
in check_client_access
192.168.9 OK
192.168 REJECT
and then,
postmap /etc/postfix/check_client_access
service postfix restart