First, I'll start with a description of the situation, so you could understand my needs, then I'll describe how I installed and configured wu-imapd-ssl on a Debian box.
My ISP (Scarlet) is sometimes kind of lazy, one of the things they refuse to do is enable clients to use secure authentication of ssl encryption for checking their POP3 mailbox. (Nope, they don't even provide Imap). So my password can be sniffed by anyone between me and my provider. Unfortunately, that password is also used to establish the ADSL connection, change my billing information, or just receive my private data. It can be used to change my homepage, in short, who has that password, becomes as powerfull as I am over my internet account. And Scarlet also doesn't provide spam-filtering/marking.
Nowadays I'm most of the time connected to the internet through the University network (kotnet) from the KULeuven. It shouldn't surprise you that I don't like to send my all-mighty password from this network, to my ISP, just cleartext, each five minutes, proceeded by the magical keyword "PASS". Because of this, and because I wanted to use SpamAssassin to filter my mail, I decided to use Fetchmail, Exim and SpamAssassin to fetch and filter mail from my provider. I'm running this only on my pc connected to my provider, cause I believe the connection doesn't leave the "trusted" network of my provider. And for more than a year, I've been checking my email with Mutt, through an ssh session.
At the university however, they do use IMAP, and you are obligated to use ssl encryption. And I've been always been using Mozilla to send and receive mail for that account.
But now, it's becomming an annoyance that to check both email accounts I needed to start Mozilla, and start an ssh session to my home pc. I don't really know if Mutt supports local mboxes and external Imap, but Mozilla supports multiple IMAP boxes anyway. So I wanted to set up an IMAP server on my home Pc...
Before beginning to install wu-imapd(-ssl), I already had fetchmail, exim and spamassassin fetching and filtering my mail.
apt-get install wu-imapd-ssl
Don't we all just LOVE apt? First I looked for something like /etc/init.d/imapd, but found nothing, so I tried
/etc/init.d/inetd restart
and
and yes, something was listening to port 993, and that would probably be an IMAP server. Now make sure you can connect from the Internet to that port.
iptables -I no-conns-from-ppp0 -p tcp --dport 993 -j ACCEPT
and in the file /etc/hosts.allow I added and extra line:
Let's start testing. I configured an extra mail account, pointing the hostname to my box running at home, username and same as my regular Unix u/p.
Bingo, had to accept my certificate first, and then I saw an Inbox (which contained mail from the /var/spool/myusername mbox), and a Trash directory. I created some new folders in mozilla, copied some mail in them, and yes, it worked. Wow, that was easy, I didn't need to configure anything from imapd.
But, beside my /var/spool/tom mbox, I also have some other mboxes, containing sent mail, my "historical inbox", which contains all mail I received the past 3 years, and it would also be good if I could see my junk folders (spam, evil, and executables, which hold my mail filtered by spamassassin, own rules, or filtered because they contained win32 executables). Ok, where's the documentation of wu-imapd? man imapd, not really helpful, the faq on the site of wu-imapd refers to a file named CONFIG, but I couldn't find it anyware, probably because it was renamed in the debian package. So I tried some trial-and-error. I created a new folder (in Mozilla) with some odd name. I looked in my home dir, and idd, a new mbox with that name was created. Then, using some common sense, I started to look for files named like .mail*, .imap* in my homedir. In ".mailboxlist" I found that weird name again. Bingo! I added my other mboxes, and yes, mozilla displayed them, and I could find all my mail.
I also found out that the documentation for imapd, and c-client - which appears to be important to imapd too - are in /usr/share/doc/libc-client2002edebian and /usr/share/doc/uw-imapd
It might seem strange, but in those documents, they never mention .mailboxlist. But there seem to be other configuration files. In /etc/c-client.cf I put:
I accept the risk
set mail-subdirectory Mail
Now you might wonder what that first line does, well you should read /usr/share/doc/libc-client2002edebian/imaprc.txt.gz (with zless for instance).
After adjusting the subdir, I needed to update .mailboxlist, because it works relative to the mail-subdirectory. But everything seems to work fine now, and again, I'm a happy man.
Conclusion:
- Installation is easy
- Documentation could be better
- It does what's it's supposed to do
Neduz