Hi All

I have a question regarding postfix restrictions.

Is there a way for Postfix to enforce some kind of policy so that all
the outgoing (allowed) mails be " @business.com" and all the others be
rejected.
Of course this policy should be enforced only to the outgoing emails
not in the incoming.



- if mail comes from mynetworks, require that the sender address is
*...@example.com. you can do this with a restriction class based on
check_client_access.


Thanks for the reply

I did this

mynetworks = cidr:/etc/postfix/inside_network

smtpd_restriction_classes=
       from_inside_network

 from_inside_network =
      check_client_access cidr:/etc/postfix/inside_network


smtpd_recipient_restrictions =
    check_sender_access hash:/etc/postfix/sending-domains,
    reject_unauth_destination



/etc/postfix/inside_network
192.168.2.0/24 OK
127.0.0.0/8       OK


/etc/postfix/sending-domains
business.gr  from_inside_network

So I did a logical AND -> all clients form my network have the relay privilege and moreover they can send e-mails only from business.gr (hopefully)
I need to test it on a production server.



Reply via email to