Wednesday, June 18, 2008

BlakeNet Goes Live

In another step towards making it a reality, BlakeNet is finally open to visitors.

The first complaint came in the other day about the performance of the Contact Us form, citing that it took a full minute or two to send messages from it. Upon investigation, I found that it was Sendmail's fault. My first instinct was to find an alternative to using Sendmail. I had the idea to do what I traditionally do with contact forms; Make them go to a SQL database, not mail them directly. Then I would set up a crontab that would mail me a digest of the SQL data every day or so. This would eliminate the wait to submit the forms, and would also make it easier for me to check and harder for me to avoid keeping up with (Yes, Im a very lazy person, if you havent noticed. As the quote goes, "all good programmers are lazy").

Today, I decided to take a whack at fixing Sendmail instead of setting up an alternative. My /etc/log/mail.log file had some interesting information. "My unqualified host name unknown" and "Unable to qualify my own domain name", to be exact. So, I guessed this was something to be fixed in my /etc/hosts file. I pulled it up and, after a couple tries, finally got everything running smoothly with no more complaining Sendmail. The line I edited now looks like this:

127.0.0.1 localhost localhost.localdomain blakeserver

The first bit is the loopback IP address, followed by the localhost host name, then the localhost.localdomain alias, and finally my servers hostname (If you dont know it, you can find it with the hostname command). Everything should work on your own machine, except the hostname. Hopefully, this can help someone out there with similar problems.

No comments: