Avatar of GWIC100
GWIC100
Flag for United States of America asked on

telnet to port 25 on mail server hangs for over 1 minute before responding with 220

My mail server was working great two days ago. something changed over night. Now when I telnet 10.0.0.4 25 the system hangs for over a minute before it gives me a 220 message.

I suspected DNS was the issue and that's why I used the IP address. If I telnet to localhost 25 on the mail server, it is very quick, but if I telnet 10.0.0.4 25  or telnet mailhostname 25 it hangs for just over 1 minute before giving me a 220 message.

any ideas?

- I can ping mailhostname and get quick responce, I'm thinking it's a sendmail configuration issue...
Linux Networking

Avatar of undefined
Last Comment
DarthMod

8/22/2022 - Mon
jar3817

Are you doing this locally? Obviously when you did the localhost:25 connection it was, but what about when you use the name or ip? If not, does it act the same from a lan client? How about an internet client? Does this server use any dns blacklists for spam control? If so have you checked if the lists are all functioning and responding quickly? Are the resolvers in /etc/resolv.conf all functioning properly?
collins23

could your firewall be slowing things down maybe ?
try elimination
does it respond the same from other computers ? if so then the prob is most likely with the mail server..

check firewall / sendmail logs for clues.

you could take a look at this ( though not for sendmail )  

http://www.postfix.org/faq.html#delay

ravenpl

Usually it is DNS issue.
The smtp server upon client connection tries to solve the client's IP to real name (some mta then check if the name resolved back to same IP).
In other words the server where smtp server lives has to be able to resolve Your IP from reverse DNS.
Do I make sense or You need more clarifications?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
GWIC100

ASKER
Here is the answer I found.

At the beginning of the sendmail.cf is a disclaimer which says do not edit this file, but the solution I found does just that. I changed the DaemonPortOptions line to read:

DaemonPortOptions=Port=smtp,Addr=www.xxx.yyy.zzz,Name=MTA

Replace www.xxx.yyy.zzz with the local ip address of the server and then save and do the following at a shell prompt:

service sendmail restart

Sendmail is now very fast at sending.
ravenpl

In fact it was DNS issue, but another type - refund.
ASKER CERTIFIED SOLUTION
DarthMod

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question