I have hit a wall with this setup and I cant for the life of me figure this out, despite having setup a few other Virtual SMTP servers in the past. Maybe something has changed in 2019?
I will provide as much info as possible to help you help me :)
I have installed SMTP Server and Telnet Client on my 2019 server, I have followed guides and rechecked my settings to ensure all is setup correctly.
[General]
- I have all unassigned IP addresses allowed
[Access]
- Authentication set to 'Anonymous'
- TLS Greyed out
- Connection control and relay restrictions set to allow all with a blank list below.
[Messages]
[Delivery]
Outbound Security
- Basic Authentication with the Office 365 username and password set.
Outbound connection
Advanced Delivery
- Smart host is set to: smtp.office365.com
[LDAP] and [Security] tabs are default.
The Office 365 user is set to SMTP auth enabled and I have confirmed this via PowerShell.
telnet 127.0.0.1 25
shows:
220 mydomain.com Microsoft ESMTP MAIL Service, Version: 10.0.17763.1697 ready at Tue, 7 Sep 2021 13:53:35 +1000
However, when trying to send an email via this relay it stays in the C:\inetpub\mailroot\Queue directory and I get the below in the event log:
Message delivery to the host 'X.X.X.X' failed while delivering to the remote domain 'recipientsdomain.com' for the following reason: The remote SMTP service rejected AUTH negotiation.
I will probably kick myself once I figure this out, but I must be going mad.
EDIT: forgot to add...
I can also telnet from the network to smtp.office365.com
on port 587 and have also configured a connector in Office 365 for WAN IPs which are in use on my network.
Thanks!
Bil