Can't telnet to port 25 and yet Outlook still manages to send mail. How?

1

1

I configured Outlook to use port 25 on my ISP's smtp server. That works fine and I can send email. But if I try to use the server in one of my applications (using JavaMail), I can't connect to the server. Same thing if I try to "manually" telnet to it: I get

telnet: Unable to connect to remote host: Connection refused

How is this possible? And how do I configure my application to be able to send mail?

Edit to add more information:

Wireshark shows that when Outlook tries to send email, it connects to port 25 of the ISP's smtp server. Everything works as expected. When I try 'telnet server 25', the connection never makes it to the server. I see 'Destination unreachable (Communication administratively filtered)', which seems to indicate the firewall at my workplace blocked it. If that's the case, how does the firewall know to let Outlook through?

Marlo Guthrie

Posted 2011-12-22T16:26:34.203

Reputation: 273

Are you sure you didn't configure SSL/TLS in Outlook for SMTP? – thims – 2011-12-22T17:42:30.367

Exactly how did you setup mail in Outlook to your ISP? If it's POP3, then the connection to the server is on port 110 (POP3), not 25 (SMTP). – Ƭᴇcʜιᴇ007 – 2011-12-22T18:42:59.577

1@techie007, you cannot send mail over POP3. It's always SMTP. – user1686 – 2011-12-22T19:21:52.960

@grawity Yeah ME = brainfart, it's 110 to get it, but it sends on 25. Sorry about that. ;) I was thinking about POP3 'listening' on 110. I'd still like to know how the account is setup in the OP's Outlook. :) – Ƭᴇcʜιᴇ007 – 2011-12-22T19:30:54.500

1Any anti-virus/"Internet Protection" suites installed/enabled? They may block non-email clients (or unknown email clients) from sending from your computer in case you unwittingly become a spam-zombie. – Ƭᴇcʜιᴇ007 – 2011-12-22T19:37:41.033

Answers

2

techie007 was on the right track. The anti-virus running on the computer is what was blocking the connection. I'm now running the program from a linux box and that works fine.

Marlo Guthrie

Posted 2011-12-22T16:26:34.203

Reputation: 273

3

I would use a network sniffer like Wireshark (free) to see what Outlook does - Wireshark's "Follow TCP Stream" is useful for this.

RedGrittyBrick

Posted 2011-12-22T16:26:34.203

Reputation: 70 632

Microsoft has a free Network Monitor.

– thims – 2011-12-22T17:43:40.083

2

Bear in mind that Windows can block outbound connections on a per-application basis. Check the Windows Security control panel.

MetaEd

Posted 2011-12-22T16:26:34.203

Reputation: 309