MercuryS (the SMTP server module) can be instructed to never deliver mail to non-local addresses by selecting strict local relaying restrictions in the Connection control tab in settings. See Mercury help for more details.
To prevent non-local senders from submitting any messages you could enable transaction level filtering in the Compliance tab, and create a rule similar to this one:
M, "@mydomain.com", R-N, "554 Sender address not permitted"
That should cause messages from anyone with a MAIL FROM: address other than those belonging to your domain to be rejected.
MercuryS (the SMTP server module) can be instructed to never deliver mail to non-local addresses by selecting strict local relaying restrictions in the Connection control tab in settings. See Mercury help for more details.
To prevent non-local senders from submitting any messages you could enable transaction level filtering in the Compliance tab, and create a rule similar to this one:
M, "*@mydomain.com*", R-N, "554 Sender address not permitted"
That should cause messages from anyone with a MAIL FROM: address other than those belonging to your domain to be rejected.
edited Mar 13 '23 at 5:05 pm