I'm using Postfix 2.7.1 (can't change to a newer version for the moment) and it's running fine, with the exception that is allowing to relay mail from the internal network even if the specified sender is not from the domain served by Postfix.
In other words, if my domain is mydomain.com, any computer on my local network is allowed to send emails to any other domain using email@example.com as the sender's email address, how can I stop this?
I have this in main.cf:
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
I've tried to restrict mynetworks to only localhost or change the order in smtpd_recipient_restrictions to this:
smtpd_recipient_restrictions = reject_unauth_destination, permit_mynetworks, permit_sasl_authenticated
but the result is that none of the users on the network can send emails.
Thanks in advance for your help!