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 34
Scott CSenior EngineerAsked:
Who is Participating?

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

x
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.

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 EngineerAuthor 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
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
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Scott CSenior EngineerAuthor 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 EngineerAuthor Commented:
I looked at the logs, but I'll look again.

No, no typo...as you can see....IIS 6.0
0
Scott CSenior EngineerAuthor 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

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
Scott CSenior EngineerAuthor Commented:
We resolved the issue ourselves.
0
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
Windows OS

From novice to tech pro — start learning today.