Exchange: Allow an unauthenticated user to relay mail using Exchange 2010

Problem: I have this application/website that needs to send emails, I have it configured to use our exchange server as SMTP. It can send emails to internal users however external ones are failing with a "550 5.7.1 Unable to relay" error.

Note: This SHOULD be done by establishing an authenticated relationship - yet, there are time when an application has limitations and is unable to pass login credentials.

Objective: Allow an unauthenticated user to relay mail using Exchange 2010

Solution:
New-ReceiveConnector -Name RELAYCONNECTOR -usage Custom -Bindings '1.1.1.1:25' -fqdn mailservername.domain.com -RemoteIPRanges 2.2.2.2 -server mailservername -permissiongroups AnonymousUsers
Get-ReceiveConnector RELAYCONNECTOR | Add-ADPermission -User "NT AUTHORITY\ANONYMOUS LOGON" -ExtendedRights "ms-Exch-SMTP-Accept-Any-Recipient"

No comments:

Post a Comment