Thursday, March 22, 2012

SMTPMail stopped working after install of firewall and router

I had a couple of simple apps in which I managed to get SMTPMail working. However I recently upgraded XP to SP2 and am now running the firewall. I have also installed a wireless router with firewall so I'm guessing they may be causing the problem.

Has anyone any advice as to how to get SMTP working again?

Remember it was working so everything was set up -

SmtpMail.SmtpServer = "127.0.0.1";

and I granted relay access to 127.0.0.1 in my default SMTP Virtual Server.

I found a page on MSDN that states... "If your local SMTP server (included with Windows 2000 and Windows Server 2003) is behind a firewall that blocks any direct SMTP traffic (through port 25), you will need to find out if there is a smart host available on your network that is allowed to relay SMTP messages to the Internet."

First, you need to be more specific on what "stopped working" means. Check event logs, the SMTP log and error messages you may see. Is the mail sitting in the queue and not being processed?

But a few things are possible for your problem. The first is SP2 has the firewall activated by default. Either disable it or open port 25 for SMTP traffic. Second is your new wireless router may not have port 25 open either. It also may not be translating your IP and port correctly. See the router's docs for setting that up.

Jeff


Thanks - I have checked the Event Viewer (System) and spotted lots of SMTPSVC warnings and errors.

Generally a warning appears:

"SMTP could not connect to the DNS server 'ipaddress'. The protocol used was 'UDP'. It may be down or inaccessible." (where ipaddress matches the DNS server, default gateway and DHCP server when I run ipconfig).

This is followed by an error message:

"SMTP could not connect to any DNS server. Either none are configured, or all are down."

I also see error messages such as:

"Error - Message delivery to the remote domain 'foo.com' failed for the following reason: The remote server did not respond to a connection attempt."

I tried various combinations of turning XP firewall on/off, adding an open port 25 in XP fiewall and forwarding port 25 on my router for SMTP, but nothing has solved the problem.

Basically the mails I try and send are not received - see error and warning messages.

Any advice?


I've managed to get SMTPMail working again but only using my ISP's SMTP server - had to include some authentication fields. Also found the SmtpConnectionTimeout field helped.

Still don't know why my SMTP server won't relay - guess it is to do with the router - have asked router maker for info. If I find anything I'll post.

0 comments:

Post a Comment