D. Karapiperis a écrit : > 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. >
you can do the following: if the sender is not *...@example.com, then do not allow relay. smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/outbound_sender reject_unauth_destination == outbound_sender example.com OK users will still be able to use any sender adress if they send to one of your domains (mydestination, virtual mailbox domains, relay domains, virtual alias domains). > I think that smtpd_*_restricions regard all the e-mails > (outgoing,incoming) and simply check the RCPT TO and MAIL FROM > statements. Correct? all mail is incoming when received and outgoing when forwarded! if the above isn't enough, you could do one or more of the following things: - 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. - for authenticated mail, require that the sender matches the login (look for reject_sender_login_mismatch and friends). ... etc.