Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I setup a new server.

I tried to send mail from PHP. It would not.

I installed sendmail apt-get install sendmail.

It now sends mail, but the server lags for about a minute before sending an email.

Not sure why this could be?

share|improve this question
I provided the log to community, and it made a quick look on my problem. – Andrejs Cainikovs Feb 10 '11 at 17:47
up vote 2 down vote accepted

Have a look at /var/log/mail.err and /var/log/mail.log for error output from sendmail, that might shed some light on the problem.

From your description though I'd hazard a guess that the server is stalling trying to resolve DNS - have you got nameservers correctly configured in /etc/resolv.conf?

share|improve this answer
What exactly do I put inside the /etc/resolv.conf file? the IP of my server? or domain name? or dns nameserver? Thanks. – JD Isaacks Feb 10 '11 at 17:55
I think this is the issue, the log says unable to qualify domain name. I do not know how to setup resolv.conf, I have a different question pending for that answer. – JD Isaacks Feb 10 '11 at 18:06
Actually I needed to add the domains to the /etc/hosts file. – JD Isaacks Feb 10 '11 at 18:44
@John: No, you needed to fix DNS. /etc/hosts is only a temporary workaround. – grawity Feb 10 '11 at 19:44
@grawity, I am so confused. I asked this question and thats what I was told. – JD Isaacks Feb 10 '11 at 20:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.