SQL Database Mail relaying bulk email via Exchange 2010 gets 421 4.3.2 and timeouts.
This article assumes you have already created your receive connector on your hub transport server(s) as per this technet guide here. I am also assuming you have configured database mail properly.
This is a common issue if you have just migrated to Exchange 2010 or have just configured SQL Server database mail but when relaying via Exchange 2010 you get “the server response was 421 4.3.2 The maximum number of concurrent connections has exceeded a limit” and timeout errors. Some emails will likely go fine but if sending anywhere around 100 or more emails you will get several emails failing.
1. Get the details of your receive connector
Run the following in EMS:
get-receiveconnector “receive connector name” | fl
Which should return all of the attributes of your connector, below is an example of some of the attributes we are interested in, you will see a lot more when you run it.
[PS] C:Windowssystem32>get-receiveconnector "Receive Connector Name" | fl ... ConnectionTimeout : 00:10:00 ConnectionInactivityTimeout : 00:05:00 MessageRateLimit : unlimited MessageRateSource : IPAddress MaxInboundConnection : 5000 MaxInboundConnectionPerSource : 20 MaxInboundConnectionPercentagePerSource : 2 ... TarpitInterval : 00:00:05 MaxAcknowledgementDelay : 00:00:30
2. Allow more concurrent connections on the receive connector
To allow more concurrent connections on a receive connector run the following in EMS:
Set-ReceiveConnector “your connector name” –MaxInboundConnectionPerSource XXX
Replace the X’s with a number value, 20 is the default I would suggest 100 should be enough but it depends how many emails you are sending, you may need to modify the “MaxInboundConnectionPercentagePerSource” value as well if you are relaying a lot of mail, although I would suggest you probably ought to use something other than Exchange if this is the case.
This step should solve the 421 4.3.2 errors.
3. Improve the receive connectors efficiency
Exchange 2010 receive connectors are less efficient than in previous versions of Exchange due to a couple of attributes, MaxAcknowledgementDelay and TarpitInterval. Both can be set to 0 to speed up SMTP relaying. Run the following in EMS to set them to 0.
Set-ReceiveConnector “your connector name” –MaxAcknowledgementDelay 0 Set-ReceiveConnector “your connector name” –TarpitInterval 0
4. Increasing SQL Server database mail timeout
This may be optional as the previous steps may well have already resolved your errors but another step if you still get timeouts in the database mail logs is to make SQL more tolerant of delays in SMTP relaying.
Firstly you need the identity for the account ID of the database mail account you are using.
In SQL Management Studio start a new query and execute:
“Select * from msdb.dbo.sysmail_server”
It will return something like this:
As you can see if you have several using anonymous authentication it isn’t always obvious which one is the right one, if this is the case then tidy up the unused accounts and maybe temporarily change the servername via the configure database mail wizard.
Next you need to modify and execute the msdb.dbo.sysmail_update_account_sp stored procedure.
You need to change the following fields before you execute it:
@Account_id=(the id we identified above)
@Timeout= (an appropriate value in seconds e.g. 30)
Do not change anything else and now execute the procedure.
You should now be able to test your bulk email and if you turn on verbose logging in database mail configuration wizard you will see several emails a second being sent instead of one every 1-2 seconds.