Recently we got asked to reject inbound emails sent to a specific domain with a custom response but without touching the mailboxes themselves and leaving the functionality to email out from that domain.
Usually this isn’t normally needed, but in this instance they had closed one of their companies and wanted to retain the mailboxes in their current state and wanted a message on the bounceback stating the company is closed. On the face of it this seems like a relatively simple request, it actually took us a while to find the correct setting to do it.
Exchange 2013:
Select new transport rule, give it a name and then select the “More options”.
Change the first dropdown and select “The Recipient” then “has specific properties matching these text patterns”.
Press the Plus and change the dropdown to “Email” and put in “@domain.co.uk”. Press OK then OK.
Change the second dropdown and select “Block the message” and then “reject the message and include an explanation”. Put the custom message in that you require.
Press save and then you’re all done!
Whilst the example above is for Exchange 2013, the same applies for both Exchange 2010 and Exchange 2013. I’m sure there are plenty of other ways to reject inbound emails sent to a specific domain, but was the simplest method we could think of that applies for all versions of Exchange.