IIS 5 & IIS 6
Problem with SMTP Relay
Last post Mar 21, 2008 12:33 AM by qbernard
Mar 18, 2008 01:52 PM|MalcRock|LINK
I have a Win2003 server running IIS 6 acting as a SMTP relay for inbound and outbound email. It is set to forward all outbound mail to a SmartHost (which is a FQDN)
It has been working fine until one day it would no longer deliver email outbound. The Event Log is full of Event 4000's like "Message delivery to the remote domain 'gmail.com' failed for the following reason: Unable to bind to the destination server in DNS",
and mail just sits in the IIS queue.
If I change the Smart Host entry to a single IP address this works around the problem, as no DNS lookups are being performed. Nothing has changed, apart from maybe some Windows Updates. The server is able to perform DNS lookups without a problem. (plus,
I'm not sure why IIS has to look up every individual email's domain name when they're all just going to the smarthost address!)
Can anyone help?
Mar 19, 2008 01:55 AM|qbernard|LINK
The event id is from the source or the relay smtp server ? if source, then it looks it is trying to send it rather than forward it to the smart host.
if it's from smart host, then check if you able to query remote domain mx record via udp port 53. you can also try smtpdiag tool to troubleshoot it.
Mar 19, 2008 05:09 AM|MalcRock|LINK
Thanks. The Event source is SMTPSVC, so yes it does sound like IIS is trying to deliver direct. I have checked that the option "Attempt direct delivery before sending to smart host" is NOT ticked. Yes you can successfully probe remote DNS servers using
Mar 19, 2008 10:16 AM|MalcRock|LINK
Ok, I've resolved this. It seems the SMTP server is trying to connect to DNS using TCP instead of UDP. Our firewall has only ever allowed UDP DNS outbound, and has now been changed to allow this access out. Following article
http://support.microsoft.com/kb/330070, I tried setting IIS to only use UDP but this made no difference. This must have been due to a Windows update - why is IIS trying to use TCP when UDP for DNS is the
Mar 21, 2008 12:33 AM|qbernard|LINK
Great... I can't recall but I think with w2k sp4 and above. UDP was the default, something/someone must have changed it.