SMTP code 220 is the first response a mail server sends after a client opens a TCP connection on port 25, 465, or 587. The greeting banner typically includes the server hostname, software version, and the current timestamp. This response signals that the server is accepting connections and ready for the client to issue EHLO or HELO. If you never receive a 220 response, the server is either unreachable, firewalled, or not running an SMTP daemon on the expected port.
This is the expected first response in any SMTP conversation. Every compliant SMTP server sends 220 immediately after accepting a TCP connection. The banner usually contains the server's FQDN and may include ESMTP or Postfix/Exim/Sendmail identification.
Some servers send a second 220 response after STARTTLS negotiation completes, indicating the encrypted session is ready for a new EHLO command. This is normal behavior during opportunistic TLS upgrades on port 587.
In environments with SMTP proxies (such as HAProxy or Nginx stream), the 220 banner may come from the proxy rather than the actual mail server. The hostname in the banner can reveal whether you are connected to the expected backend.
Open a raw TCP connection to the mail server to confirm you receive the 220 greeting. If the connection hangs or is refused, the server is not listening or a firewall is blocking access.
telnet mail.example.com 25
For servers requiring implicit TLS (port 465) or STARTTLS (port 587), use openssl to establish the connection and verify the greeting.
openssl s_client -connect mail.example.com:465 -quiet
Ensure the domain's MX records point to a valid mail server that is actually running SMTP. Misconfigured MX records pointing to a web server or nonexistent host will prevent you from receiving the 220 banner.
dig MX example.com +shortCheck DNS Records
Use a port scanner to confirm that ports 25, 465, or 587 are open and not blocked by an upstream firewall or ISP.
Scan PortsThe SMTP server is closing the connection in response to a QUIT command.
The SMTP command was successfully processed. Used for EHLO responses, MAIL FROM, RCPT TO, and DATA completion.
The SMTP server is temporarily unavailable, closing the connection. The sending server should retry later.