Microsoft Exchange Server 2007 – 530 5.7.1 Client was not authenticated – Solution

If you install Microsoft Exchange Server out of the box and you get the following error message when trying to receive an email:

This message was created automatically by mail delivery software.
A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:
SMTP error from remote mail server after MAIL FROM:<> SIZE=6841:
host []: 530 5.7.1 Client was not authenticated

Then you have to change the Receive Connector to allow anonymous connections (probably) ..
You can do this using the Microsoft Exchange Management Shell (EMS)

Set-ReceiveConnector -Identity "Default <SERVERNAME>" -PermissionGroups "AnonymousUsers"

or in the GUI using Microsoft Exchange Management Console (EMC)

Navigate to Microsoft Exchange | Server Configuration | Hub Transport | Receive Connectors