Exchange 2016: tarpit event in SMTP-logs

2026-07-06T14:14:22.1833333+00:00

Hi!
We have an Exchange 2016 server with some custom receive connectors. Also we have our enternal application which send mail messages via one of these receive connectors.
And we have an issues from application, not all messages are sent the first time. Sometimes they are sent the second time, and sometimes the fifth time.
At SMTP receive logs I see corresponding events like:

Tarpit for '0.00:00:05' due to 'IP discredited'

and than
Remote(SocketError)

I believe this is due to some kind of limits or throttling within the Exchange. But which of them exactly? I'd like to do some tuning but I don't know what settings should I change?

Which Exchange limit is responsible for this?

Exchange | Exchange Server | Management
Exchange | Exchange Server | Management

The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.

0 comments No comments

Answer accepted by question author
Michelle-N 20,735 Reputation points Microsoft External Staff Moderator
2026-07-06T18:10:25.34+00:00

Hi @Евгений Котляревский

Based on your description, I understand you are running an Exchange Server 2016 environment where an internal application sends automated emails via a custom receive connector. However, some messages fail on the first attempt and require multiple retries to send successfully. Your Exchange SMTP receive logs specifically reveal the following events:

  • Tarpit for '0.00:00:05' due to 'IP discredited'
  • Remote(SocketError)

The specific limit responsible for this behavior is the TarpitInterval on your Receive Connector, not MessageRateLimit or connection throttling rules. In Exchange Server, tarpitting is an anti-abuse mechanism that intentionally introduces a delay in processing SMTP responses for unauthenticated connections that trigger protocol errors or rejections (such as trying to send to non-existent internal mailboxes or attempting to relay to external domains without permission).

Every time your application hits a protocol restriction, Exchange adds "bad points" to that source IP. Once a threshold is breached, Exchange flags the IP as "discredited" and penalizes it with a 5-second artificial delay (the default TarpitInterval). Because many internal applications are not built to gracefully wait out a delayed socket response, your application times out mid-execution, throwing a Remote(SocketError) and forcing a retry.

-If this is a dedicated connector handling trusted internal traffic, you can disable the artificial delays.

Open the Exchange Management Shell (EMS) and run the following commands:

# 1. Identify your exact connector (verify using the 'connector-id' field in your SMTP log)Get-ReceiveConnector | Format-Table Name, TarpitInterval, RemoteIPRanges, Enabled

Warning: Only disable this feature on connectors strictly bound to trusted internal servers via the RemoteIPRanges attribute. Never disable tarpitting on Internet-facing or default anonymous public connectors.

-Disabling the tarpit stops the 5-second delay, but it doesn't fix whatever error originally caused Exchange to discredit the IP. To fix this permanently, review your connector's properties:

$conn = Get-ReceiveConnector | Where-Object {$_.Name -like "*YourApp*"}   # Adjust filter$conn | Format-List Name, Enabled, TransportRole, Bindings, RemoteIPRanges, AuthMechanism, PermissionGroups, TarpitInterval

Ensure your application server's IP is explicitly defined in RemoteIPRanges. If your application needs to relay mail anonymously to external domains, ensure you have explicitly granted relay permissions to the anonymous logon group on that specific connector:

Get-ReceiveConnector "YourCustomConnectorName" | Add-ADPermission `

-If your application supports it, the most secure and modern configuration is to switch from an Anonymous SMTP Relay to Authenticated SMTP Submission:

  • Configure the application to connect via Port 587 using STARTTLS.
  • Pass dedicated service account credentials via SMTP AUTH.

Authenticated users bypass anonymous reputation tracking entirely, shielding your app from being marked as an "IP discredited" source.

When tuning, do not adjust these parameters first, as they handle separate volume throttling thresholds and are not the cause of an "IP discredited" log event:

  • MaxInboundConnection / MaxInboundConnectionPerSource
  • MessageRateLimit / MessageRateSource

Please refer to the official documentations for further deep dives into message handling mechanics.

https://learn.microsoft.com/en-us/Exchange/recipient-filtering-on-edge-transport-servers-exchange-2013-help

Receive connectors | Microsoft Learn

https://learn.microsoft.com/en-us/Exchange/mail-flow/message-rate-limits

I hope this information help.


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click ""Comment"".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.