Forum Discussion

bobm's avatar
bobm
Copper Contributor
Oct 03, 2025

One 365 mailbox and several non 365 mailboxes

I am trying to configure the situation where I have one user on a microsoft 365 subscription and several other users on the domain using IMAP.

I have configured the domain to send emails to the 365 subscriber and that works.  However I am battling to get emails to the IMAP users.

I have set up connectors to and from 365 and they validate correctly.

However when I try to send a message from outside to one of the IMAP users I get 

Diagnostic-Code: smtp;554 5.4.14 Hop count exceeded - possible mail loop ATTR34

On researching this there are various tutorials which suggest loading exchangeonlinemanagement, connnect to the domain and execute Start-EdgeSynchronization

I then get an error telling me the command is not recognised.   Having searched it seems this command is only for on premises exchange servers and not the on line subscription model have.

Any pointers to where I am going wrong would be gratefully received.

5 Replies

  • Hi bobm​,

    could you please share your environment details? if you have hybrid environment with Microsoft Exchange Edge server than this command Start-EdgeSynchronization will work on edge server. 
    The Start-EdgeSynchronization command you found is only for on-premises Exchange Edge servers. It won’t apply here because you’re in a cloud-only + external IMAP setup.

    • bobm's avatar
      bobm
      Copper Contributor

      I thought I had replied to this 18 hours ago but cannot see it displayed.

      I am not clear what you mean by environment details.

      After using the Start-EdgeSychronization command I did read it did not apply to a cloud set up, but I cannot find which command I should be using.

    • bobm's avatar
      bobm
      Copper Contributor

      Many thanks

      Not quite clear what you mean by environment details.   

      I did subsequently pick up that the command only applies to on-premises but cannot find the equivalent command for my set-up.

  • TrendsVista's avatar
    TrendsVista
    Copper Contributor

    This looks like a mail flow loop rather than a connector validation issue. The error 554 5.4.14 Hop count exceeded typically means mail is bouncing back and forth between Exchange Online and your external IMAP mail server.

    A few things to check:

    • MX Record & Routing
      If your MX record points to Exchange Online, then O365 needs to know which users are hosted on IMAP vs. Exchange Online. For IMAP users, you’ll usually need a mail flow connector or smart host rule that routes their mail to your external server.
    • Accepted Domain Setting
      Make sure your domain in Exchange Online is set as Internal Relay (not Authoritative). Authoritative tells O365 that all mailboxes are hosted there, which causes a loop when it can’t find the IMAP user.
    • Connectors
      It sounds like you already created in/out connectors. Ensure the outbound connector from O365 → IMAP server is selected in your transport rules.
    • Command Confusion
      You’re right: Start-Edge Synchronization applies only to on-premises Exchange servers. In Exchange Online, directory sync isn’t done this way. For your case, it’s purely a mail flow / accepted domain configuration issue, not an edge sync issue.

    In short:

    Set your domain in Exchange Online to Internal Relay.
    Confirm your connector routes unknown recipients to your IMAP host.
    Test delivery with Get-Message Trace in Exchange Online to see where it’s looping.

    That usually resolves the loop in hybrid-style setups where some users are on O365 and others remain on IMAP.

    • bobm's avatar
      bobm
      Copper Contributor

      Thank you for that clear explanation.

      The MX records are correct

      The domain setting is set to Internal relay

      The two connectors are set up and the one from O365 to my organisation validates OK

      When I try to set up a transport rule for the connector, it is not listed as available as a connector to route to.

Resources