Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Sendmail running slow on fast box

Posted on 2005-03-18
Medium Priority
Last Modified: 2013-12-17
This is really wierd... i'm building out a new sendmail box to act as another secondary mail server for our network and the box is running great except for some wierd speed issues with sendmail.

The box is not open to the web and routing traffic yet but i have it open to a few IPs that i'm sending test messags from.  The box has a load average of 0.00 since its not doing much and doesn't appear to have much network lag (i'm ssh'ed into it and i can type as fast as normal, no lag there).

Here is the issue though, whenever i telnet to it on port 25, it takes forever (like 15-20 seconds) to come back with the helo prompt.  after that, if i do the mail from: and rcpt to:, after each command it lags up and hangs, and then kicks to the next line.

typing in mailq for a little bit in the CLI caused some wierd lag too but it doesn't appear to be doing that anymore.

When i was setting up sendmail on this box, i stole the config files from another secondary box that should have similiar settings (access,mailertable,relay-domains,local-host-names,sendmail.mc,sendmailcf) and i modified the sendmail.mc file to change all of the names over from the server1 to server2 and did a make -C /etc/mail on it.  it looks like the config is ok, but something is going on.

at first i thought it would be DNS related (it might still be) because the resolv.conf file had a dead server in the first listing.  i changed it and put my primary dns in the first one and time warners dns in the second line. but i'm still seeing lag (i'm a windows junkie so i dont know, but is there an equivalent of ipconfig /flushdns for unix?  or is it even caching?)

Question by:onsite_tech
  • 4
  • 3
LVL 14

Expert Comment

ID: 13578032
to flush your name server try rndc restart (or if that fails) named restart

check your firewalls and their logs, make sure nothing's getting in the way (perhaps the IP of the new server is being flagged)

Try connecting to localhost 25 rather than "somename 25" and see if it connects any faster

Author Comment

ID: 13578461
ahhh, so resolv.conf is reloaded when i reload bind?  i thought that was just for the server side of DNS but cool.  i did that and it looks like its still a problem.

The firewalls are all happy though i did test it from localhost and the helo header comes up instantly (did it from both localhost and from the FQDN of the box while on that box), but from everyone else it still takes a while.  when i do a mail from: and a mail to: it still takes a while (i wrote a mail from: mail to: data and threw some test stuff in there by hand before it said anything about the mail From: being ok).

the redhat enterprise box itself is not running a firewall, we have a cisco pix in front of it taking care of all of that (i didn't turn the firewall on during the setup process and i haven't touched it since).  part of me wants to keep thinking its a DNS issue (every time i type in an address, it tries to resolve it and times out once or twice before finding it or something)
LVL 14

Accepted Solution

kenfcamp earned 1600 total points
ID: 13578672
Are you running your own dns?

if so run dig <new_sever_name>
and dig -x <new_server_ip>

I'm assuming you posted the new servers ip in your DNS records.
you may also want to verify your ip settings are correct (gateway, netmask etc), correct listings in your various /etc/hosts files and so on
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.


Author Comment

ID: 13578777
yup, i'm running DNS on this box as a secondary slave server that pulls all of its zone files from a master. its resolv.conf points to the primary ns server and then to timewarner (the T1 ISP).

both of those resolve via dig (the later pulling a ptr from timewarner's name servers).
LVL 14

Expert Comment

ID: 13582105
just a thought,

You mentioned you used the following config files from a older server.
What version of sendmail was the old server using, what version is the new server using?

Where were these files located on the old server, and where are they on the new server
When you added the copied files to the new server, did you delete existing files?

Assuming you're using a newer version of RH/Sendmail verify submit.cf exists
local-host-names <--- verify the only listings are localhost, and the "new" server name
sendmail.cf <-- make sure there is no DM record for the old server name [DMSERVERNAME.COM]
LVL 40

Assisted Solution

jlevie earned 400 total points
ID: 13590774
This sounds like a reverse DNS lookup issue. What happens if you do a reverse lookup on the server's IP and the IP you are trying the telnet test from?

If the system has a secondary name server running you should be using the localhost IP as the first nameserver in resolv.conf.
LVL 14

Expert Comment

ID: 13591852

I was leaning toward that direction myself what I first read the question, but onsite_tech indicates that he's able to SSH/Telnet into the system just fine except for sendmail connections.

If the issue were reverse DNS related wouldn't it be expected that any connectivity would be lagged, rather than just Sendmail connections?

Author Comment

ID: 13593806
I found the problem, it was reverse DNS but in a stupid way.  The box was set up with serverA as its hostname, but i went in and hacked it up and changed the hosts file and the network file to give it the outside ServerB.mydomain name.  problem was that sendmail was still using that serverA name it its helo statement (that was my tipoff actually, when i sat down and looked at it) so when i made sure everything was changed to the way i wanted it, i rebooted and the new sendmail helo statement had the right name, and it worked beautifully.

thanks for your help guys.  you rule

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Want to know how to use Exchange Server Eseutil command? Go through this article as it gives you the know-how.
The main intent of this article is to make you aware of ‘Exchange fail to mount’ error, its effects, causes, and solution.
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
Suggested Courses

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question