0

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 
5
  • What does the nginx error log say? Check this if you need help with error log configuration Commented Feb 6, 2013 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. Commented Feb 6, 2013 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 Commented Feb 6, 2013 at 22:42
  • Please include the contents of /etc/hosts Commented Feb 7, 2013 at 4:31
  • please see edit Commented Feb 7, 2013 at 19:05

1 Answer 1

0

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.

5
  • 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? Commented Feb 7, 2013 at 10:38
  • It matters because $j holds the name by which your computer introduces itself to other computers during the SMTP dialog. Commented Feb 7, 2013 at 12:35
  • I added the line as you described and regenerated sendmail.cf but the issue persists Commented Feb 7, 2013 at 19:06
  • What does the Dj do before sergeserver.example.net? Commented Feb 7, 2013 at 22:07
  • It defines macro $j. Whatever the value for $j add it in your /etc/hosts files too. Commented Feb 8, 2013 at 8:56

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.