Skip to content

Est. 2011ยทMicrosoft Partner ID 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

Free Fix 451 4.4.397

451 4.4.397 and 451 4.4.316: queues stuck in Retry to external hosts

10 min read Updated October 5, 2026 Exchange Server

Fix it now

A queue in Retry has not failed: Exchange is holding the messages and retrying on a schedule. The diagnostic information is in the queue’s own LastError, and the host to test is the queue’s next hop, which is often not the recipient’s domain.

Run these in the Exchange Management Shell on the transport server

Get-Queue | Where-Object {$_.Status -eq 'Retry'} | Format-List Identity,NextHopDomain,MessageCount,LastRetryTime,NextRetryTime,LastError
Get-TransportService <servername> | Format-List MessageExpirationTimeout
  1. Read LastError verbatim rather than summarising it. Microsoft documents it as the last error recorded for the queue, and its text is far more specific than the number in it.
  2. Note NextHopDomain. That is the host to test, and it may be a smart host, a gateway or a connector target rather than the recipient’s domain.
  3. Test from the Exchange server itself: Test-NetConnection <next hop> -Port 25. Refused and timed out mean different things, so note which you get.
  4. Resolve the next hop from the same server so you know you are testing the host Exchange is reaching: Resolve-DnsName <next hop> -Type MX, or a plain lookup for a smart host name.
  5. Once the path works, force a connection attempt with Retry-Queue -Identity ‘<server>\<queue>’.

Use plain Retry-Queue for a queue in Retry. The -Resubmit parameter sends the queue contents back to the categorizer first, and Microsoft documents it as required for the Unreachable queue, not as a routine step.

If the queue goes Active and the message count falls, you are done. If not, the next section covers what each of these codes is and is not telling you.

Why it happens

A message in Retry has not been given up on. Exchange holds it, retries on a schedule, and only produces a permanent failure when the message expiration timeout is reached, which is why the deadline is a property you can read with Get-TransportService <servername> | Format-List MessageExpirationTimeout rather than a number to guess at. It also means the useful diagnostic information is sitting in the queue rather than in anyone’s inbox.

The two codes in the title do not carry equal weight, and it matters that you know which. Microsoft publishes 4.4.316 as connection refused, with the socket error number, and describes it as Microsoft 365 trying to send to a mail server outside the service where every connection attempt fails because of a network problem at the external server’s location. The error text includes the IP address of the host generating it, which is the party who has to fix it. 4.4.397, by contrast, appears in no Microsoft NDR reference and no registry: nobody publishes a meaning for it, so treating it as evidence of a particular failure mode is guesswork.

That leaves the queue’s own LastError as the real instrument. Read the whole string. A refused connection is a network answer: something actively rejected the attempt, or nothing is listening. A timeout is a different answer: traffic is being dropped silently rather than rejected, which is what Microsoft’s published meaning for 4.4.1, connection timed out, describes.

Outbound port 25 is blocked

You have this one if Connections to every external mail host fail from the Exchange server, while the same hosts are reachable from elsewhere.

  1. Test the port from the Exchange server against two or three unrelated destinations, so you can tell a general block from one unreachable host.
  2. Check the firewall rule permitting outbound TCP 25 from that server, and confirm it has not been narrowed during a policy tidy-up. Microsoft names firewall or ISP restrictions on port 25 as a documented cause of 4.4.1.
  3. Check with your internet provider. Outbound 25 is blocked by default on many connections, and a change of circuit reintroduces the block.
  4. If the provider will not open it, route outbound mail through a smart host they permit and configure the send connector accordingly.

The smart host or connector target is wrong or unreachable

You have this one if NextHopDomain is a gateway name rather than a recipient domain, and that name either does not resolve or does not answer.

  1. Read the connector: Get-SendConnector | Format-List Name,AddressSpaces,SmartHosts,DNSRoutingEnabled,SourceTransportServers,Port.
  2. Resolve the smart host name from the Exchange server and confirm it returns the address you expect.
  3. Confirm the port on the connector matches the port the gateway listens on. Filtering services frequently use a submission port rather than 25.
  4. Correct the connector, then force a retry rather than restarting the transport service.

TLS is required and the negotiation fails

You have this one if The connection succeeds, the conversation starts, and it ends around the point TLS is negotiated.

  1. Check the certificate: Get-ExchangeCertificate | Format-List Thumbprint,Subject,NotAfter,Services. An expired certificate bound to SMTP breaks outbound TLS quietly.
  2. If the connector requires TLS for a specific partner domain, confirm their certificate and host name still match what your configuration expects.
  3. Confirm the protocol versions and cipher suites still overlap. This is the usual cause when a long-working partner connection stops after either side is hardened.
  4. Renew or rebind the certificate, then retry the queue and confirm the conversation completes.

The failing hop is inbound, and the mail is queued on the far side

You have this one if A service reports these codes delivering into your organisation while your own outbound queues are healthy.

  1. Test your published mail host name from outside your network on port 25 and confirm the connection is accepted.
  2. Confirm the certificate presented there matches the name the connector expects and has not expired.
  3. Check your firewall permits the connection and that any SMTP inspection is disabled for it.
  4. Validate the connector from the service side after the change, so the result is recorded rather than assumed.

When mail is queued on the service side rather than on your server, the messages are being held for you. Fix the endpoint and the backlog delivers itself with no resubmission on your part.

Full reference

The queue properties worth reading

Property What Microsoft says it holds
LastError The last error that was recorded for the queue
NextHopDomain The name of the next hop, based on the DeliveryType of the queue
Status Active, Connecting, Ready, Retry or Suspended
MessageCount The number of messages in the queue
LastRetryTime The date and time of the last connection attempt for a queue in Retry
NextRetryTime The date and time of the next connection attempt for a queue in Retry

Microsoft defines Retry as the last automatic or manual connection attempt having failed, with the queue waiting to retry. Connecting is a separate status meaning the queue is in the process of connecting to the next hop, and Ready means the queue recently transmitted messages and is now empty. A queue flipping between Retry and Connecting is being answered intermittently, which is a different problem from one that never leaves Retry.

Which of these codes is documented

Code Published by What that source says
4.4.316 Microsoft Connection refused, with socket error code 10061; a network connection issue at the external server’s location, and the error carries that server’s IP address
4.4.1 Microsoft Connection timed out; transient network issues, or firewall and ISP restrictions on TCP port 25
4.4.397 Nobody Absent from both Microsoft NDR references and from the IANA registry

Because 4.4.397 carries no published meaning, the only honest way to use it is as a label on a LastError string you then read in full. Do not infer from the number that a connection was established, or that it was not.

Forcing a retry without making things worse

Retry-Queue forces a connection attempt for a queue in Retry, and sets a new retry time if the connection cannot be established. -Resubmit $true does something different and heavier: it sends the queue contents back to the categorizer before a connection is attempted, and Microsoft documents it as what you must include to retry delivery of messages in the Unreachable queue. Using it routinely on an ordinary Retry queue re-categorises mail that did not need it.

Three different jobs

Retry-Queue -Identity 'MBX01\contoso.com'
Retry-Queue -Filter "NextHopDomain -eq 'contoso.com'"
Retry-Queue -Identity 'MBX01\Unreachable' -Resubmit $true

How long you actually have

Read MessageExpirationTimeout on the transport service rather than assuming a default, and treat it as the deadline. Until then the messages are safe where they are, and resubmitting repeatedly while you investigate only restarts the retry cycle and adds load. Fix the path, then retry once.

When the path tests clean and the queue stays in Retry

  • Turn on verbose protocol logging on the send connector, force one retry and read the session. A conversation that starts and stops tells you far more than any code.
  • Confirm you tested the same host Exchange is using. A workstation resolving a different MX record proves nothing about the transport server’s view.
  • Check whether a connector with a more specific address space is winning and sending the mail somewhere you did not expect.
  • Look for shadow redundancy holding copies, which can make a queue’s message count behave differently from the number of messages users are waiting on.

Every code this article covers

Code What it points at Source
451 4.4.397 No meaning is published by Microsoft or registered with IANA. Treat it as a next-hop delivery failure label and diagnose from the queue’s full LastError text and NextHopDomain not published by the vendor
451 4.4.316 Connection refused, reported with socket error code 10061: every connection attempt to a mail server outside the service is failing because of a network problem at that server’s location. The error text includes the IP address of the host generating it Microsoft Learn
421 4.4.1 Connection timed out. Microsoft’s documented causes are transient network problems and firewall or ISP restrictions on TCP port 25 Microsoft Learn

Confirm the fix worked

  1. Get-Queue shows the affected queue Active, Connecting or empty, with the message count falling.
  2. Test-NetConnection <next hop> -Port 25 from the Exchange server succeeds repeatedly, not just once.
  3. A verbose protocol log shows a complete SMTP conversation ending in acceptance by the destination.
  4. A test message to the affected destination is delivered, and no new Retry queues appear over the following day.

Questions people ask about this

Is there anything to buy to clear a stuck queue?

No. These are network path, certificate and connector problems, and every one of them is fixed with configuration you already control or a conversation with your provider or the destination.

What does 4.4.397 mean?

Nobody publishes a meaning for it. It is not in Microsoft’s Exchange Online NDR reference, not in the Exchange Server DSN reference, and not in the IANA registry of enhanced status codes. Read the whole LastError string on the queue instead.

How long do I have before the messages bounce?

Until the message expiration timeout on the transport service is reached. Read your own value with Get-TransportService <servername> | Format-List MessageExpirationTimeout rather than assuming, and treat that as your deadline.

Should I resubmit the queue repeatedly while I investigate?

No. Retry-Queue on its own forces a connection attempt, which is what you want. -Resubmit sends the contents back through categorisation and Microsoft documents it for the Unreachable queue; using it routinely just adds load.

Why does the queue name a host I have never heard of?

Because the next hop is not necessarily the recipient’s mail server. A smart host, a filtering service or a connector target sits in between, and that intermediate host is the one failing. Test whatever NextHopDomain names.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

Free Fix 0x8004010F: Outlook cannot download the offline address book from Exchange Free Fix HTTP 500.19 on Exchange virtual directories: broken IIS configuration files Free Fix Error 1618 and a half finished Exchange CU: setup will not start again License Error Event ID 9518 with error -1808: the log volume filled and the store dismounted
โ† Back to Knowledge Base