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 have a new server running ubuntu, nginx, php sendmail etc.

To test if sendmail is working I made a basic php file with the php mail function in it. When I execute the file my browser hangs until I get a 503 timeout but I still receive the test mail a few seconds later indicating sendmail is working.

Other pages on the server load just fine

The server does not have a domain name; I am just using its IP address for now. There are no errors in the nginx error log but the mail log is showing errors like

sergeserver sm-msp-queue[13609]: unable to qualify my own domain name

Any ideas why and how to solve?

Here is the contents of etc/hosts

127.0.0.1       localhost

# --- Gandi DHCP Script ---
95.142.166.209  sergeserver
# --- End ---

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
share|improve this question
    
What does the nginx error log say? Check this if you need help with error log configuration –  Mathias R. Jessen Feb 6 '13 at 22:38
    
This sounds more like an nginx configuration issue. You may want to check to logs at /var/log/nginx or the corresponding mail logs. –  passy Feb 6 '13 at 22:38
    
check the nginx error log - no errors reported. Other pages work fine and do not time out. There is unable to qualify my own domain name error in the mail log but I don't have a domain yet - just using the server IP –  harryg Feb 6 '13 at 22:42
    
Please include the contents of /etc/hosts –  mossy Feb 7 '13 at 4:31
    
please see edit –  harryg Feb 7 '13 at 19:05

1 Answer 1

up vote 0 down vote accepted

The quickest hack to make this error message go is to try and add the following lines in your /etc/mail/sendmail.mc:

LOCAL_CONFIG
Djsergeserver.example.net

Do not use any random domain as a FQDN. Use either a domain that you own, or example.net. After editing sendmail.mc make sure you generate sendmail.cf and restart sendmail. In Debian you do this with sendmailconfig. In CentOS you run /etc/mail/make followed by service sendmail restart.

share|improve this answer
    
OK, I shall try later when I get home. A few questions: why does it matter which domain I use? Can I use a domain I own but which is currently being used on another site? Will this cure the page timeouts? –  harryg Feb 7 '13 at 10:38
    
It matters because $j holds the name by which your computer introduces itself to other computers during the SMTP dialog. –  adamo Feb 7 '13 at 12:35
    
I added the line as you described and regenerated sendmail.cf but the issue persists –  harryg Feb 7 '13 at 19:06
    
What does the Dj do before sergeserver.example.net? –  harryg Feb 7 '13 at 22:07
    
It defines macro $j. Whatever the value for $j add it in your /etc/hosts files too. –  adamo Feb 8 '13 at 8:56

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.