enforcing sender domain in outbound mail [Was: ]
- D. Karapiperis a écrit :
> Hi Allyou can do the following: if the sender is not *@..., then do
> 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 " @..." and all the others be
> Of course this policy should be enforced only to the outgoing emails
> not in the incoming.
not allow relay.
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-mailsall mail is incoming when received and outgoing when forwarded!
> (outgoing,incoming) and simply check the RCPT TO and MAIL FROM
> statements. Correct?
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
*@.... you can do this with a restriction class based on
- for authenticated mail, require that the sender matches the login
(look for reject_sender_login_mismatch and friends).