IIS SMTP server will not relay

We have migrated to Office 365 and I am using this document to setup an SMTP relay for our copiers...

I have everything setup exactly as this suggests, but an email never arrives.  I have logging enabled on the IIS SMTP server and in the log file located at C:\Windows\System32\LogFiles\SMTPSVC1, I see this...

19:09:32 HELO - 250
19:09:32 MAIL - 250
19:09:32 RCPT - 250
19:09:32 DATA - 250
19:09:33 QUIT - 240

It looks like it is accepting the email, but I'm not sure what is happening after this.  How can I track this down further?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
Is the to address one of the exchange mailboxes?
You can track messages with delivery reports

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bpl5000Author Commented:
Thanks for the response!  The IP address that the IIS SMTP server is accepting is the IP address of the copier.

I tried running a delivery report on the user I created as per step 2 of Microsoft's document.  I also ran a message trace on that account, but both the delivery report and the message trace show no messages by that user.  It looks to me like the SMTP server is accepting it from the copier, but when it tries to relay it thru the user account (which was setup in step 2), something goes wrong.  I'm not sure where else I can look in the EAC or on the IIS SMTP server side (maybe a log showing the SMTP server trying to pass the message onto Office 365?).

I thought about adding our public IP to Connection Filter/Allowed IP Addresses in EAC.  I wish there was some way to see if the connection from the IIS SMTP server is being refused by Office 365.
David Johnson, CD, MVPOwnerCommented:
you are getting an OK from exchange.. is the email address you are sending TO within your organization ?

250 Requested mail action okay, completed.
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.


Enable the verbose logging on the Receive connector and check it out that what exactly is going on their.

Vasil Michev (MVP)Commented:
Just run a message trace in the EAC:


Also, the setup you did requires a valid Exchange license to be applied to the user you configured in the IIS SMTP relay settings. Not a big deal, but if you only want to send messages to internal recipients only, you can follow this article instead:

bpl5000Author Commented:
ve3ofa, we are NOT getting an OK from Exchange, that OK is from our IIS SMTP server.  The TO address is within our organization as far as being part of OurDomain.org, but it is with Office 365, NOT an on premise Exchange server, but I think that should be obvious from what I stated above.

vasilcho, as stated before I did run a message trace in the EAC.  The message doesn't show at all... I'm assuming the message is rejected when the IIS SMTP server tries to transfer it to Office 365.  I could try your suggestion for not setting up a user for the relay, but it's not really internal because it's going from our on premise IIS SMTP server to our Office 365 tenant out in Microsoft's cloud.

Mohd_Shaikh, it's Office 365, not our own Exchange server.  I know how to setup verbose logging on the receive connector in EMC of our old Exchange server, but I do NOT see how to setup such logging on the EAC of our Office 365 tenant.  If you know how to do so, please advise.
bpl5000Author Commented:
Ok, so I changed the logging from the default IIS log file format to NCSA Common log file format and now I can see what happens when the SMTP server tries to hand off the email to our Office 365 tenant.  Right away I noticed the sending email address was not a valid address.  It did not matter before because we were using Exchange and would allow anything from that IP address.

As soon as I saw that email address in the log I said, "D'oh!"  I put in a valid email address and now it's working!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Office 365

From novice to tech pro — start learning today.