Index ¦ Archives ¦ Atom

Email addresses with apostrophes and mail loops

Recently we encountered an issue sending an email from one domain, hosted on Office 365 to another domain also hosted on Office 365. The destination email address had an apostrophe e.g. tim.o'reilly@example.org and we were getting the error message. 554 5.4.14 Hop count exceeded - possible mail loop

When we removed the apostrophe from the email address the email got through ok.

But the error message still didn't make sense to me. Firstly, while rare an email address with an apostrophe is technically valid. And secondly if an address doesn't exist I would expect a 550 5.1.10 Recipient not found or similar message rather than "Hop count exceeded".

As it turned out the apostrophe was a red herring. The destination domain was a hybrid Office 365 deployment, and for any address where the local part did not exist Office 365, the mail was forwarded to the onsite server, which in turn would forward to the Office 365 server.

Mail Loop

After getting this error, I tried a few different mail serves with apostrophes and that Office 365, Gmail, EXIM4 on Debian and Yahoo Mail all work ok with apostrophes.

Creative Commons License
Content on this site is licensed under a Creative Commons Attribution 4.0 International License.
Built using Pelican. Based on a theme by Giulio Fidente on github.