I am at my wits end.... I have a product on Server A that uses SMTP to send notifications to end users. Server B is the exchange server. I can telnet on port 25 from Server A to Server B but cannot telnet from server B to Server A on port 25. Does this mean port 25 is open on Server A to send but not receive? If so how can I open the port without utilizing Windows Security Configuration Wizard? Or is my thought process all screwed up here? Any help would be greatly appreciated! I am sure it is easy and I am just living in Friday afternoon already.

Thanks!

Dani AI

Generated

Short diagnosis and likely causes (relates to 's symptom): if Server A can make an outbound SMTP connection to Server B but Server B cannot connect to A, Server A is not accepting inbound SMTP. Common reasons are: no process is listening on TCP/25 (the application only initiates outbound SMTP), a host firewall blocking inbound TCP/25, or upstream NAT/router/ISP blocking or not forwarding port 25. Note that ping tests ICMP echo, not a TCP port — it won't tell whether TCP/25 is open (as pointed out). (rfc-editor.org)

Immediate checks to run on Server A to see whether anything is listening on port 25 (run from an elevated command prompt):

netstat -ano | findstr :25

If a LISTENING line appears, note the PID and map it to the process:

tasklist /FI "PID eq <pid>"

Alternatively run netstat -ab as admin to show the executable that has opened the port. If no listener is present, the product is likely send-only and will not accept inbound SMTP connections. (learn.microsoft.com)

If a listener exists but the connection from Server B still fails, the host or network is blocking the port. On Windows Server 2003 the Windows Firewall can be managed with netsh; to add an inbound port exception scoped to only Server B's IP (replace 192.168.1.2) use:

netsh firewall add portopening protocol=TCP port=25 name="SMTP" mode=ENABLE scope=CUSTOM addresses=192.168.1.2

(Or add the exception via the Windows Firewall dialog; disable the firewall only briefly for testing.) Also verify any edge firewall/NAT device forwards external TCP/25 to Server A and check whether the ISP blocks SMTP. (learn.microsoft.com)

If an SMTP service is required on Server A, confirm or install the SMTP service (service name SMTPSVC / "Simple Mail Transfer Protocol (SMTP)") so a daemon listens on port 25, and configure relay restrictions to avoid becoming an open relay. As an alternative to running a full SMTP server on A, install a small local relay (IIS SMTP or a lightweight MTA) that accepts inbound SMTP and forwards to the Exchange server. (learn.microsoft.com)

Summary actionable checklist (no GUI wizard required): confirm a listener (netstat), identify the process (tasklist/netstat -ab), add a scoped firewall exception (netsh) or adjust router/NAT, and if needed install/configure an SMTP relay (SMTPSVC) with proper relay restrictions.

Recommended Answers

All 5 Replies

On the PC your having issues with, open up the command prompt (Start > run > type cmd then click ok.

ping the server's smtp address e.g type: ping mail.yourserver.com then press enter.

If it fails, your ports are not open.

On the PC your having issues with, open up the command prompt (Start > run > type cmd then click ok.

ping the server's smtp address e.g type: ping mail.yourserver.com then press enter.

If it fails, your ports are not open.

ping does NOT test port 25, it tests ICMP connectivity.

---------------------------------------------------------------

As for the issue, on server A, the product, is it a full fledged SMTP server, or does it simply initiate a scripted SMTP session when it needs to? because if it does, you will not be able to aconnect to it by port 25, since it doesn't have a daemon that would listen on port 25.

It would still try to access the mail server.

OK, to test port 25, use a Telnet Session. Press Start > Run > type telnet and click ok.

Type: telnet 25

For example, type: telnet 25

You can also use the servers IP address or the FQDN instead of the hostname.

telnet 25 (replace with your servers IP)

If it works you should see a responce like:

220 yourserver.com Microsoft Exchange Internet Mail Connector <version number of the IMC> (if your using Microsoft Exchange).

If it fails it will tell you that also.

It would still try to access the mail server.

it will try to see if it's alive by the means of an ICMP echo request. Whether server A is alive i snot an issue here.

many mailing (and not only mail) daemons work by demand only, so they wait, without listening on a port, get woken up by a software's request to send an email, and go back to sleep once they finish.
having said all that, it is easy enough to send an email without havinf a mail server

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.