Thursday, April 26, 2007

I had all sorts of problems today because my mail server was suddenly blacklisted by
cbl.abuseat.org Why ?

To quote from the transcript of their sites analysis:
There are two basic types of detections that land an IP in this page. RFC2821 section 4.1.1.1 says that there are only two legal types of HELO/EHLO a mail server can issue - either a fully qualified domain name (eg: "mail.example.com") or an "IP literal" (eg: "[1.2.3.4]").

The listings that land in this page are:

HELO "localhost", "localhost.localdomain", and other generic "unconfigured" names.
HELOs that are bare IP addresses (without enclosing square brackets).
Listings on the former are most common in UNIX-derived systems (such as Linux, xBSD


Well I have a lot of domains on that PC, and my network has several live sites going. I was in no mind to start messing with my hostname, so I added this line to my sendmail.mc file
define(`confDOMAIN_NAME',`mydomain.com') and regenerated sendmail.conf
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.conf

rebooted sendmail
/etc/rc.d/init.d/sendmail restart

And checked with cbl.abuseat.org . I seemed to be OK. So I applied to be delisted and I hope I will be. Who the frick are cbl.abuseat.org anyway?

Thursday, April 05, 2007

Postgresql problems

I have recently been battling mysterious crashes involving postgresql. Postresql has been in use on the system for more than 2 years.Though the amount of data is small and it is mainly a backend for simple web applications.

OS is Fedora Core 2. Anyway I have been experiencing intermittent system crashes, where everything locks up. The whole system goes down with no meaningful errors. At least none that I can find.

Well after one such bewildering crash, Postgresql wouldn't start. I thought that postgresql may have been my system crash culprit. Anyway I always start postgresql via
/etc/rc.d/init.d/postgresql start

But all I got was a bland [failed] and no error details. After some scouring, I learned to start postgresql manually using
su postgres
pg_ctl -D /var/lib/pgsql/data (or whatever the path to your pgsql data directory is)

Here I got the error that the server was already running, which it wasn't. It turned out that the database lockfile, on the last crash, had not been cleared. A simple
rm /var/lib/pgsql/data/postmaster.pid (to delete the lock file)
and I was back in business.

I still have system crashes though. I have tried rebooting and checking the file system
shutdown -rF now

And so far I have not had a crash. But it has only been a few minutes.

Justin