Not that anyone hosts their own Exchange server anymore … but we had a pretty strange issue pop up. Exchange has been, for a dozen years, configured to use the system DNS servers. The system can still use DNS just fine … but the Exchange transport failed to query DNS and just queued messages.
PS C:\scripts> Get-Queue -Identity "EXCHANGE01\3" | Format-List * DeliveryType : SmtpDeliveryToMailbox NextHopDomain : mailbox database 1440585757 TlsDomain : NextHopConnector : 1cdb1e55-a129-46bc-84ef-2ddae27b808c Status : Retry MessageCount : 7 LastError : 451 4.4.0 DNS query failed. The error was: DNS query failed with error ErrorRetry RetryCount : 2 LastRetryTime : 1/4/2025 12:20:04 AM NextRetryTime : 1/4/2025 12:25:04 AM DeferredMessageCount : 0 LockedMessageCount : 0 MessageCountsPerPriority : {0, 0, 0, 0} DeferredMessageCountsPerPriority : {0, 7, 0, 0} RiskLevel : Normal OutboundIPPool : 0 NextHopCategory : Internal IncomingRate : 0 OutgoingRate : 0 Velocity : 0 QueueIdentity : EXCHANGE01\3 PriorityDescriptions : {High, Normal, Low, None} Identity : EXCHANGE01\3 IsValid : True ObjectState : New
Yup, still configured to use the SYSTEM’s DNS:
PS C:\scripts> Get-TransportService | Select-Object Name, *DNS* Name : EXCHANGE01 ExternalDNSAdapterEnabled : True ExternalDNSAdapterGuid : 2fdebb30-c710-49c9-89fb-61455aa09f62 ExternalDNSProtocolOption : Any ExternalDNSServers : {} InternalDNSAdapterEnabled : True InternalDNSAdapterGuid : 2fdebb30-c710-49c9-89fb-61455aa09f62 InternalDNSProtocolOption : Any InternalDNSServers : {} DnsLogMaxAge : 7.00:00:00 DnsLogMaxDirectorySize : 200 MB (209,715,200 bytes) DnsLogMaxFileSize : 10 MB (10,485,760 bytes) DnsLogPath : DnsLogEnabled : True
I had to hard-code the DNS servers to the transport and restart the service:
PS C:\scripts> Set-TransportService EXCHANGE01 -InternalDNSServers 10.5.5.85,10.5.5.55,10.5.5.1 PS C:\scripts> Set-TransportService EXCHANGE01 -ExternalDNSServers 10.5.5.85,10.5.5.55,10.5.5.1 PS C:\scripts> Restart-Service MSExchangeTransport WARNING: Waiting for service 'Microsoft Exchange Transport (MSExchangeTransport)' to stop... WARNING: Waiting for service 'Microsoft Exchange Transport (MSExchangeTransport)' to start... PS C:\scripts> Get-TransportService | Select-Object Name, InternalDNSServers, ExternalDNSServers Name InternalDNSServers ExternalDNSServers ---- ------------------ ------------------ EXCHANGE01 {10.5.5.1, 10.5.5.55, 10.5.5.85} {10.5.5.85, 10.5.5.55, 10.5.5.1}
Viola, messages started popping into my mailbox.