I have configured my postfix so as users under my server shall send mails through port 587 and port 25 will only be used to receive mails from mail servers.
I am successful to the extent that on connecting to port 25 mails are not allowed outside the mail server and it is being rejected as relay-access denied. whereas on port 587 the clients are able to sent mail to outside mail servers.
To achieve this I have set in my main.cf
smtpd_recipient_restriction=permit_mynetworks, reject_unauth_destination
that is I removed permit_sasl_authenticated.
if I add this condition, the mails are allowed to be sent outside the network and if I am removing the condition, any one can connect to port 25 and since there is no authentication can sent any number of mails to local recipients.
what is way that I can use sasl authenticaton on port 25, yet prevent it from relaying mails outside my nework.