I've been seeing some SMTP errors in my database mail logs.
So I have a set up a test SQL Agent job that runs every ten minutes (it's only action is to SELECT NULL). It is set to send email notifications whenever the job completes. The addresses are internal email addresses. I have configured database mail to retry failed emails up to 4 times.
In the last day, almost half the emails encounter an error at least once but eventually get delivered. 15 of the emails failed completely. A little more than half get sent without any error at all.
Here's a list of each job execution since midnight, along with the number of errors encountered by each attempt to send mail: http://screencast.com/t/wMqolB7b (note: there are gaps in the mailitem_id sequence because we have other jobs that also send emails).
The errors are a mix of the following two messages:
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2016-03-08T05:41:21). Exception Message: Could not connect to mail server. (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.60.26:25). )
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2016-03-08T05:42:42). Exception Message: Cannot send mails to mail server. (Failure sending mail.). )
- I see no pattern for the errored or failed emails. The emails themselves are all identical... it is only the time of the notification that changes.
- I have verified the SMTP account settings and they are correct. The same SMTP account settings are set on two other servers, along with a similar test job. None of the emails on these other servers are failing at all.
- I see no evidence of problems on the Exchange server
- I see no useful related info in the server's event logs
BIG QUESTION: Why are these emails failing?
Smaller question: What steps can I take to further troubleshoot this to ultimately answer the big question?