I have setup a shared mailbox to use for sending alerts from a powershell script and it works fine.
I now want to lock down the shared mailbox so that it cannot be used to send outside the org, and so I followed the instructions at,
and it works except that 365 accepts the message and it then leaves a rejection notification in the inbox of said shared mailbox.
Is there a way to drop the message at the smtp connection stage so the inbox doesnt get littered with these rejection notifications? Not a big issue, it just seems a cleaner way to do it.
Cheers.