Discussion:
Resctricting inbound and outbound domains
(too old to reply)
accessdenied
2014-03-09 20:39:57 UTC
Permalink
So far I have configured my domain to be "closed in" by using transport maps for denying outbound emails
I simply define a mapping like so:

mydomain.com :
*error: ACCESS DENIED

This works great.

For blocking all external domains (gmail, yahoo, anyone but our domain really),
I must define this line in main.cf

smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject

Isn't it a bit weird that I am using the recipient restrictions for blocking external domains? Wouldn't that be sender restrictions? I am not trying to restrict outbound here (already did that with the transport maps), I am wanting to deny all external domains and had to use the recipient restrictions. Makes no sense to me but it is working. Am I doing both the right way?

Any input is much appreciated. Thanks for your time.
accessdenied
2014-03-09 20:43:15 UTC
Permalink
To be clear, I am blocking OUTBOUND emails to all domains by using transport maps.
I am blocking all INCOMING emails using smtpd_recipient_restrictions. They both work. However, does it make sense that I am using the recipient argument? It doesn't to me but it works. I get a bounced email when I attempt to deliver a message inbound from an external domain. Finally, am I doing things proper this way?
Loading...