Back when Gmail was first launched I was like “big deal”. 1GB storage? I’ve got my own server. Filters? I can run procmail (because I’ve got my own server). Webmail? I can run my own (because I’ve got my own server).
I used to have a fantastic email setup with postfix handling SMTP, spamassassin and ClamAV handling spam and viruses respectively, procmail for filtering, dovecot for IMAP and various clients (including Squirrelmail).
Then I upgraded from Fedora Core 1 to Debian Sarge (just before it became stable), and everything broke. Sure postfix still worked, spamassassin and ClamAV still scanned (although the former was never as good as it was) but procmail was broken horribly, and I used this extensively to filter my various mailing lists and to file spam for later inspection. When I couldn’t immediately fix this, I switched to using Gmail for mailing lists (and some personal email), and struggled on with my reduced functionality setup.
You see the problem was, when anything was run through procmail, it was stored with the owner & group as root:mail which meant the it was unreadable by me. For the life of me I couldn’t figure out what was causing this. After extensive Googling and enlisting the help of various people (of which Mike Knell – my brother-in-laws brother – was extremely helpful) I was still drawing a blank.
Tonight I fixed the problem though:
If no rcfiles and no -p have been specified on the command line, procmail will, prior to reading $HOME/.procmailrc, interpret commands from /etc/procmailrc (if present). Care must be taken when creating /etc/procmailrc, because, if circumstances permit, it will be executed with root privileges (contrary to the $HOME/.procmailrc file of course).
You see the problem was that I was using Maildir with procmail, and I was using a global procmailrc to configure this, and that’s where the permissions were coming from. Once I figured out the correct incantation to force procmail to use Maildir I was laughing:
mailbox_command = /usr/bin/procmail -a "$EXTENSION" DEFAULT=$HOME/Maildir/ MAILDIR=$HOME/Maildir
I do like Gmail and may continue to use it for mailing lists, but now my mail configuration is back up to full strength (and my spam is neatly handled) I suddenly feel less need for it.