2

We have a Java web application that needs to send out emails to our users, and I'm getting this Java error when those emails try to go out:

javax.mail.MessagingException: Could not connect to SMTP host: hostname.example.com, port: 25, response: 421

I began troubleshooting this Exception by trying some SMTP commands over telnet to our sendmail server. I'm seeing strange discrepancies between how it interacts with a Linux server and a Windows Server.

On Linux, I can run:

telnet hostname.example.com 25

and the result is:

220 ******************************************************************************************************************************************************************************
HELO hostname.example.com
250 hostname.example.com Hello [xxx.xxx.xxx.xxx], pleased to meet you

(xxx.xxx.xxx.xxx is replacing the IP address I ran the telnet command from, but the asterisks are not obfuscating anything -- that's exactly what the command output)

However, on Windows Server, on the same subnet, vlan, Windows Firewall disabled, I get the following:

telnet hostname.example.com 25

gives me:

220 *********************************************************************************************************************************************************
********************
HELO hostname.example.com
500 5.5.1 Command unrecognized: "XXXX XXXXXXXXXXXXXXXXXXX"

(neither the * or X were obfuscated in the above output -- this is exactly what the command output)

There are no proxies between the Linux/Windows clients, and the sendmail server.

3
  • Are you using RDS or something like that for accessing Windows? Is there any way how to run in directly from console? Nov 12, 2015 at 16:43
  • I'm running through RDS and typing directly into a cmd. Nov 12, 2015 at 17:00
  • 2
    Maybe telnet has problem with remote keyboard (yep, I've seen it before, application gets nonsense keycodes) and so there is bullshit on telnet's input => bullshit sended to SMTP. Try to do it from real keyboard directly connected to Windows station to eliminate effect of RDS. Nov 12, 2015 at 17:20

1 Answer 1

3

Turns out this was a firewall issue. Our Cisco firewall was set to perform ESMTP Inspection, and we followed this guide to disable it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .