Link to home
Start Free TrialLog in
Avatar of onsite_tech
onsite_techFlag for United States of America

asked on

Sendmail running slow on fast box

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?)

thoughts?
Avatar of kenfcamp
kenfcamp
Flag of United States of America image

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
Avatar of onsite_tech

ASKER

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)
ASKER CERTIFIED SOLUTION
Avatar of kenfcamp
kenfcamp
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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).
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]
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
jlevie,

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?
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