Telnet to SMTP gets no 220 response unless user is specified
SMTP is not able to understand the user that you set with -l, because its another protocol than telnet.
I would guess that by specifying -l your telnet client is automatically posting some stuff into the smtpd
and the output that you see then is just what it responds to any random input?
But anyway. If you just telnet to your smtpd
's port 25 and get no output at all, then there should probably be some error in the logs right at the time when you connect. Maybe you should try checking the logs with tail -f
while connecting? depending on your distro the logs might be in different files, for example on SuSE it would be:
tail -f /var/log/mail.info /var/log/mail.err /var/log/mail.warn
Now while you run this tail
, connect to the smtpd
the same time, to see if some errors are written into the log.
Andrew Parker
Updated on September 18, 2022Comments
-
Andrew Parker almost 2 years
My server is setup to generate outgoing email only (no receiving), and is timing out when attempting to contact smtp.example.com
Essentially the email is generated by a process on myserver.example.com, sent to postfix on the localhost, which acts as a satellite system and relays the email to smtp.example.com
Error messages from postfix on myserver.example.com are:
Date/time-stamp myserver postfix/smtp[####]: ##########: to=<[email protected]>, relay=smtp.example.com:25 delay=1029, delays=729/0.01/300/0, dsn=4.4.2 status=deferred (conversation with smtp.example.com timed out while receiving the initial server greeting)
And this is the same error regardless of the recipient. Outbound emails are queuing up and never getting sent.
I've confirmed this timing-out by
telnet smtp.example.com 25
and finding that I don't even get the initial 220 response from the SMTP server.However, if I
telnet -l myuser smtp.example.com 25
instead, I receive the 220 response immediately and I can send an email as expected.I've configured postfix to use SMTP-AUTH by adding the following entries to
main.cf
relayhost = smtp.example.com smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/password smtp_sasl_security_options = noanonymous smtp_connect_timeout = 120s
Can anyone suggest how I might change my postfix configuration to get the type of speedy (or any) response I get by using
telnet -l myuser
?-
Jenny D over 9 yearsDo a
tcpdump
for all traffic tosmtp.example.com
when you do a regulartelnet
as well as atelnet -l
and see what the difference is.
-