Jan 20 2010
Exchange 2007 relay receive connector
Most networks using Exchange connect with IMAP/SMTP next to MAPI access. When you are using SMTP it is very easy to send e-mail from a different e-mail address as the addresses you use on the server. Also when using a smartphone to check several mailboxes, like I do, you will want to send e-mail using several e-mail addresses in a secure way from all around the world.
So what I wanted to do was create a Receive Connector for relaying my e-mails for several e-mail domains.
For myself I am running Windows 2008 Small Business Server and it comes with three receive connector.
- Windows SBS Fax Sharepoint Receive SERVER; for localhost processes.
- Windows SBS Internet Receive SERVER; for receiving e-mail from other e-mail servers for your local users.
- Windows SBS Internet Relay SERVER; for relaying
So naturally I focussed on the third one. In my case this one is running at port 587, as not to interfere with the Internet Receive connector. Also I enabled the following Authentication protocols
- Transport Layer Security (TLS)
- Basic authentication, with Offer Basic authentication only after starting TLS
As the permission group I only checked Exchange Users, as this is a service for my local users.
After configuring these settings I tested this and of course it didn’t work. So I enabled protocol logging on the connector and tested it again. Now I got the following logging:
….
334 <authentication response>
SMTPSubmit SMTPAcceptAnyRecipient BypassAntiSpam AcceptRoutingHeaders,Set Session Permissions
<username>,authenticated
235 2.7.0 Authentication successful,
RSET,
250 2.0.0 Resetting,
MAIL FROM:<e-mail address>,
receiving message
550 5.7.1 Client does not have permissions to send as this sender
When I searched for a solution I came across lots of people with the same problem.
Two solutions where presented in the several discussions:
- Add ms-Exch-SMTP-Accept-Authoritative-Domain-Sender right to NT AUTHORITY\Authenticated Users
In the Exchange Management Shell type the following:
Get-ReceiveConnector -Identity “Windows SBS Internet Relay SERVER” | Add-ADPermission -User “NT AUTHORITY\Authenticated Users” -ExtendedRights ms-Exch-SMTP-Accept-Authoritative-Domain-Sender - Add NT AUTHORITY\SELF in the list of Send As permissions on the user account that experiences this problem.
This can be done through the GUI or you can type the following in the Exchange Management Shell:
Add-MailboxPermission -Identity <user alias> -User “NT AUTHORITY\SELF” -AccessRights SendAs
I tried both solutions and the problem remained the same. When I tried testing with an account in the Domain Admin group it worked, so it had to be a permissions issue on the receive connector.
I opened ADSIEdit and connected to the Configuration. Then I browsed to the receive connector, which you can find under:
Configuration -> Services -> Microsoft Exchange -> [my Exchange organisation] -> Administrative Groups -> [my Exchange group] -> Servers -> [my server] -> Protocols -> SMTP Receive Connectors
When we right click the receive connector and choose Properties, on the Security tab you will find all the security permissions.
This gave me the option to browse through the possible permissions to give to a user. I came across the ms-Exch-SMTP-Accept-Any-Sender and noticed that because it concerns the relay connector the permission ms-Exch-SMTP-Accept-Any-Recipient was already added for ‘NT AUTHORITY\Authenticated Users’ which makes sense.
So I added the ms-Exch-SMTP-Accept-Any-Sender to the permissions of ‘NT AUTHORITY\Authenticated Users’ and everything started working.
When you are reading the protocol logging which is being created, you will notice that it displays to the authenticated user the different permissions you added for the user. You can use this to check if all the required permissions are there.
When you read the logging included earlier in the post you will see that my server advertised the following:
SMTPSubmit SMTPAcceptAnyRecipient BypassAntiSpam AcceptRoutingHeaders
After making the three changes discussed in this post it looks like this:
SMTPSubmit SMTPAcceptAnyRecipient SMTPAcceptAnySender SMTPAcceptAuthoritativeDomainSender BypassAntiSpam AcceptRoutingHeaders
So the two new permissions are shown here like they should be. Check this to make sure that adding the permissions went successfully.
Now i can finally send that e-mail that has been in the Outbox of my phone all evening

