Setting up my ideal email system 3

Fetchmail setup

My ISP provides my email by POP3, so I use fetchmail to download it every 10 minutes. I created a file .fetchmailrc file in my home directory that looks like this:

# Configuration created Wed Jul 27 06:43:07 2005 by fetchmailconf
set postmaster "andy"
set bouncemail
set no spambounce
set properties ""
poll mail.myisp.co.uk with proto POP3
user 'andy@myisp.co.uk' there with password 'password' is 'andy' here

This tells fetchmail to use the username and password given to me by my ISP to download mail into the default location for the user andy on the local machine. This would normally put my mail into /var/spool/mail/andy, or something like that, but to get it into my Maildir (which I talked about in a previous blog entry), I added these lines to a .procmailrc in my home directory:

MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR
LOGFILE=$MAILDIR/log

Now when I type the command fetchmail (logged in as andy) I get something like this:

$ fetchmail
fetchmail: Server CommonName mismatch: localhost != mail.myisp.co.uk
fetchmail: Server CommonName mismatch: localhost != mail.myisp.co.uk
fetchmail: Server CommonName mismatch: localhost != mail.myisp.co.uk
fetchmail: No mail for andy@myisp.co.uk at mail.myisp.co.uk

(No idea how to get rid of those errors, but they don’t seem to cause any problems.) And if any mail was found, it appears in my Inbox in Thunderbird, as if by magic.

Next time: how I send mail, using sendmail.

FreeGuide 0.10pre2

So I’ve put out FreeGuide version 0.10pre2, and then a little bug-fix release because the Linux RPMs were broken. By calling this 0.10pre2-2 I managed to annoy my faithful Gentoo packager Christian, and myself, but at the time it seemed too much hassle to bump everytjing up to 0.10pre3.

The next release, 0.10.3, is going to be stable, and everyone is finally going to be using and testing our latest code stream. We’ve had a few bugs reported again 0.10pre2, and we’ve already got a couple to fix, and then we’re going to push it out asap and get everyone migrated up.

I hope people will like the new version – it’s a lot faster, and the UI experience is better (in my opinion). I just hope there aren’t too many wrinkles in the upgrade path.

Alex has written some good upgrade code, but some of the concepts have changed, and I’m not entirely happy with the depths you have to delve into the Options screen just to play with your XMLTV grabber, but most things should “Just Work” for normal users.

After 0.10.3, I really want to get recording working, using Reuel’s plugin. If anyone wants to send me a UK digital TV card, you can be sure it would be put to good use…

Setting up my ideal email system 2

Setting up Mozilla Thunderbird

On the same machine that was running Dovecot, I set up Thunderbird to be able to access my email. I did this by creating a new email account (which I called “Andy IMAP”), choosing “localhost” as the server, and entering the username I created in /etc/imap.passwd (‘brian’ in the example I gave) as the username. I set up all the other settings as I wanted them, and clicked OK.

When I clicked “Get New Messages,” Thunderbird asked for my password, and I entered the password I had put into /etc/imap.passwd (‘sausages’ in the example I gave). Now I could see some folders had appeared under the new account I had created, but there was nothing in them.

I tested whether I could read and write emails to the account by dragging an email from another folder (in an old account) to the “Inbox” folder in the new account “Andy IMAP”. It copied OK, and when I clicked on Inbox I could see the email in the list, and when I clicked the email its contents appeared in the preview pane. Success! My IMAP account existed.

Next time, how I made emails that people sent to me appear in my new Inbox.

Setting up my ideal email system

Recently I have managed to get pretty much my ideal email system set up. This is the kind of thing that would simply be impossible on a Windows box, but (when you know how) is a quick job on Linux. I didn’t know how, but now I do (ish). I’m going to do it in separate installments, trying to make them slightly self-contained.

Setting up an IMAP server

I chose Dovecot because it looked fairly good, and it came high up on Google. Installing it on Fedora Core 3 was just:

yum install dovecot

But then I needed to set up the config file. The only thing I changed looked like this:

default_mail_env = maildir:~/Maildir

I did this because after reading the scare stories about locking when using an mbox-type mailbox, I decided Maildir sounded safer. Maildir holds each mail in a separate file, which sounds good for preventing corruption if something goes wrong, so I chose it. It seems to work ok.

I left the passwords to be plain text for the moment, which meant my /etc/imap.passwd had to look like this:

brian:{PLAIN}sausages:500:500::/home/brian

Where ‘brian’ would be your username and ‘sausages’ the password you have decided to use for mail. If you’re using plain text passwords, don’t use the same password as your login password, because any old packet sniffer will be able to see the mail password.

With this set up, I had a working IMAP server which stored messages in my home dir under the ~/Maildir directory. Of course, there were no messages in there at the moment – that’s coming up later. Next time, how I made Mozilla Thunderbird see the messages stored there!