Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I setup a new vps.net 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
add comment

1 Answer

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 serverfault.com/questions/233995 and thats what I was told. –  JD Isaacks Feb 10 '11 at 20:13
show 1 more comment

Your Answer

 
discard

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.