Office 365 with on Premise Smartermail, 554 5.4.14 hop count exceeded
Question asked by Tim De Vos - 3/1/2021 at 1:22 AM

For one domain we need a few accounts is Office 365 and the some on our Smartermail v17 server. 

We did the following steps to achieve this:

  • Point MX record to Office 365
  • Setup domain in Office 365 as internal relay 
  • Configured DKIM, SPF-records, etc
  • Created a connector from Office 365 to Smartermail
  • Configured on Smartermail "Inbound Message Delivery" to "External Host (MX Record)" and switched on "Deliver locally if user exists".
The setup works great. Mails are correctly delivered to as well Office 365 and Smartermail. However, we have one small problem which I can not fix. If we e-mail to a non existent e-mail address "non_existent_address@mydomain.com" the sender receives:

Remote Server returned: '554 5.4.14 Hop count exceeded - possible mail loop ATTR34 [VE1EUR02FT033.eop-EUR02.prod.protection.outlook.com]'

If we trace a the message the following happens:

  1. Mail is delivered to Office 365 (MX record)
  2. Mail is forwared to Smartermail since Office 365 does not recognize the e-mail adres.
  3. Smartermail forwards the mail to Office 365 as it doesn't know the e-mail adress
  4. Hop count exceeds
It would be great if we could configure smartermail to return "No such user here". Is there a solution for this problem?

2 Replies

Reply to Thread
Nathan Replied
It's a feature of the current implementation - we encounter it too. Arguably it is working correctly but it would be nice to have a further option along the line of 'Reject if user does not exist locally and delivery rDNS does not contain X'. 

The issue is local users still on smartermail though. So you would probably want to further distinguish between traffic via TCP/25 and TCP/587 (submission). i.e. apply this to TCP/25 only and not the submission port(s).
Tim De Vos Replied
Thanks Nathan.  Your analysis is right on the spot. I'm sure now I'm not the only one with this problem. Hopefully Smartermail will implement this.

Reply to Thread