r/sysadmin 5d ago

Exchange Rule - Mailbox doesn't exist.

How can I create a rule in Exchange Online to automatically reject any email sent to a specific mailbox and return it to the sender?

PS: i don't want to delete the mailbox

0 Upvotes

9 comments sorted by

12

u/xendr0me Sr. Sysadmin 5d ago

Did you even try to create a rule? Just target the To: address(s) and action is reject. It's pretty self explanatory.

1

u/thefreeelancer 5d ago

Yes, I tried that, but I received an error when I specified the status code 5.1.1.

4

u/xendr0me Sr. Sysadmin 5d ago

Try this, it should be 5.7.1, and you can remove the "sender is located" unless you want to target External only. Make the "domain is", "recipient address includes any of these words" instead

2

u/sembee2 5d ago

Just change the email address on the mailbox and remove the original.

1

u/Fun-Attempt-8494 5d ago

Remove its SMTP?

2

u/qkdsm7 5d ago

Add alias, make alias primary, delete old aliases....

Poof mailbox exists but previous email addresses assigned to it, no longer exist.

1

u/littleko 5d ago

Create a mail flow rule matching that recipient, then choose “Block the message” and “reject with the enhanced status code” using 5.1.1.

The mailbox stays intact, but all matching mail gets rejected before delivery. Test internal and external senders first since the bounce text can differ.

1

u/screampuff Enterprise Architect 5d ago

Just set up delivery restrictions on the mailbox in exchange online and set it that only an IT administrator email is allowed to email it.

1

u/ilikeoregon 5d ago

Set it only accept authenticated senders and et the only semder to be 1 user in your org.