I have two almost identical Windows Server 2008 R2 servers set up with Microsoft SQL Server 2012.
- One server has a hardware firewall with port 25 open in both directions (plus opening RDP to certain IPs and opening ports 80 and 443)
- One server uses a Windows firewall (default options, plus restricting RDP to certain IPs and opening ports 80 and 443)
I can send emails using
msdb.dbo.sp_send_dbmail on the server with the Windows firewall. However the server with the hardware firewall returns in the log [msdb].[dbo].[sysmail_log]
The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2012-11-04T14:25:02). Exception Message: Cannot send mails to mail server. (Service not available, closing transmission channel. The server response was: Connection not accepted at this time). )
The email accounts and profiles are set up identically on both servers.
Does anyone have any idea why? I assume it is something to do with the firewall, although its possible one IP could be blocked by the mailserver.