I have a staging web server, and I have previously prevented any and all mail being sent out from it (I don't want my clients getting test messages from it). I've now set up postfix, but I want to restrict it so that the server only ever sends emails to recipients at one domain name. I've tried:
relay_domains = domain.com smtpd_recipient_restrictions = reject_unauth_domain
.. among other variations. I've just switched it to simply this to see if that made any difference:
smtpd_recipient_restrictions = reject
But it's still sending out mail. I think all I'm doing is changing the relay settings, and I need to be changing something else, but can't make head or tail of the documentation.
I'm running postfix reload after each change, and postfix restart. This is on Ubuntu server.