SMTP relay not sending emails to own domain

I have a Windows 2012 Server that has IIS configured for relay with Office 365.

Call the company contoso.net.

When I put a test mail.txt file in the C:\InetPub\MailRoot\Pickup folder with the following information I get the email in my gmail account.  

FROM: emailrelay@contoso.net
TO: me@gmail.com
SUBJECT: Test email

This is a test email sent from my SMTP server


When I send the email to an internal user...the file leaves the Pickup folder and just sits in the "Queue" folder.

FROM: emailrelay@contoso.net
TO: me@contoso.net
SUBJECT: Test email

This is a test email sent from my SMTP server

I followed the steps in this article...https://support.office.com/en-us/article/how-to-configure-iis-for-relay-with-office-365-eb57abd2-3859-4e79-b721-2ed1f0f579c9

I know it's working properly because I can send a test email to other users at other companies as well.

It's only when I try to send to an internal user it doesn't work.

Some background...this company used to have an on-prem Exchange 2010 on an SBS.  They have since migrated to O365.  Exchange is fully migrated but the services on the SBS are still started for Exchange.

The SMTP is set up through IIS 6.0 on that server.  I have been through all of the settings multiple times and I don't see anything or any reason why the old SBS might be interfering.

This one has me stumped.
LVL 33
Scott CSenior Systems EnginerAsked:
Who is Participating?
 
Scott CSenior Systems EnginerAuthor Commented:
Turned out it was an authentication error.  I escalated this to my manager and he changed the authentication to "Anonymous" and that fixed the issue.

Go figure...that's about the only thing I didn't try.
0
 
Seth SimmonsSr. Systems AdministratorCommented:
relaying setup properly for that server to office 365?
any mx record in local dns pointing to sbs?
two things i thought of immediately...
0
 
Scott CSenior Systems EnginerAuthor Commented:
Thanks for replying.

I believe relaying is set up properly.  Otherwise my test would always fail wouldn't it?  Is there a test I can perform other than sending an email to make sure it's set up properly?

No, no local DNS with MX records at all.  Attached is the part of DNS with the server IP address...192.168.1.2.

DNS entries....no MX at all.
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
Seth SimmonsSr. Systems AdministratorCommented:
i was thinking more with the office 365 setup for your own mail since external senders are fine

oh wait, you are using the sbs server to send mail...do you have another server to install smtp service on and test with?
i'm thinking it's something to do with the fact that exchange is on there (even though migrated) that is causing an issue with internal mail being on the same domain
0
 
Scott CSenior Systems EnginerAuthor Commented:
No, the SBS is not doing the send mail.  The SMTP service is installed on Windows Server 2012.  

I mentioned the SBS server to give a complete picture.  I'm thinking it may have something to do with it as well, I'm just not sure what.
0
 
Seth SimmonsSr. Systems AdministratorCommented:
have you looked at smtp logs?

The SMTP is set up through IIS 6.0 on that server.

is that a typo?  IIS 6 was with windows 2003
0
 
Scott CSenior Systems EnginerAuthor Commented:
I looked at the logs, but I'll look again.

No, no typo...as you can see....IIS 6.0
0
 
Scott CSenior Systems EnginerAuthor Commented:
We resolved the issue ourselves.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.