I am having an issue with email relaying. We have on-premise Sharepoint, and email through Exchange Online. I am able to set up a local SMTP relay in the IIS 6 manager as follows:
Under Delivery (tab) -> Outbound security, I have "Basic Authentication" selected. For the user name, I have a valid exchange online account in the format ADDRESS@COMPANYNAME.ONMICROSOFT.COM. I also have TLS selected.
Under Delivery (tab) -> Outbound connections, I changed the TCP port to 587 as required by Microsoft
Under Delivery (tab) -> Advanced, under "Fully Qualified Domain Name", I have LOCALSERVERNAME.MYDOMAIN.COM. "Smart Host" is set to "smtp.office365.com"
With these settings in place, I can drop a text file in C:\inetpub\mailroot\Pickup, and the mail gets delivered automatically.
Now on to the "Outgoing E-Mail Settings" within SharePoint:
- Outbound SMTP server = LOCALSERVERNAME
- From Address: ADDRESS@COMPANYNAME.ONMICROSOFT.COM
- Reply Address: ADDRESS@COMPANYNAME.ONMICROSOFT.COM
When I do something in Sharepoint that sends an e-mail, I get an error in the Sharepoint log file: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: 5.7.1 Unable to relay for ...destinaton address
However, If I open the Sharepoint site in IIS and go to SMTP Email and click the option "Store e-mail in pickup directory", the mail gets delivered okay. If I have "Deliver e-mail to SMTP server", and use "localhost", or "servername", or "servername.domain.com", I continue to receive the error above. What is going on here? Do I really need to have Sharepoint dump files in the pickup directory to work with Exchange Online?
Thanks!

0 commentaires:
Enregistrer un commentaire