March 9, 2003

SquirrelMail on RH8

So I’m setting up a mail server again. This time my softwares of choice are Postfix, maildrop, Courier-IMAP, and SquirrelMail. I’m doing a “POP toaster” kind of configuration, where all user account information is kept outside of normal system authentication mechanisms. Just for the record, my previous setup was Qmail, VMailMgr, and SqWebMail. (I was using maildrop in this configuration as well, but IIRC it wasn’t exactly crucial, except for a ghetto way to have users set up web forwarding from SqWebMail. I was also using QmailAdmin in this setup. I’ll hopefully find something already written or write something myself to interact with userdb.)

I’ve got all the new setup going except SquirrelMail. It occurred to me that I should have been documenting my setup before, but since I’ve missed that I figured there’s no time like the present to start. I’m going to document my SquirrelMail setup as best I can. I’ll go back and document the setup of the other components later.
Grabbed the latest tarball off their site. SquirrelMail looks like another one of those PHP applications that basically expect you to extract the tarball into DocumentRoot or something. S’OK. My directory structure looks something like this:

      /root		# SquirrelMail tarball unpacked here.
        /data		# User preferences stored here.
      /mail-tmp		# Attachments and the like.

Those last two directories are mentioned in the SquirrelMail install file. They both need special permissions. I made mail-tmp owned by root, group apache, and mod 0730. They also mention that you should set up a cron job to clean out the mail-tmp directory. Here’s my /etc/cron.daily/mail-tmp-cleanup:


/usr/sbin/tmpwatch 48 /srv/www/default/mail-tmp

Hopefully just that simple. The 48 above means “delete anything older than 48 hours.”

Then I ran config/ The only option of note that I changed was the one that forces all user names to lowercase, I think. I’ve had problems with stuff that uses userdb and case sensitivity (wait for my maildrop discussion later).

Forgot to change DocumentRoot in /etc/httpd/conf/httpd.conf to point to /srv/www/default/root. Once I did that, started the httpd service, went to http://my.machine/ and got my SquirrelMail login. Login initially seems to be fine. Will do further testing (unknown users, sending mail, receiving mail, varying case in login) later.

For now: huzzah.