Freenet Freemail with Stunnel and Thunderbird

This is a short tipsheet, not a full tutorial. It'll help if you have freenet running on a server, and want to connect to it to interact with freemail. You should already have plenty of experience with Tbird, and some experience with Freenet and Freemail before attempting this, as it's a little tricky and hard to troubleshoot, and I'm not going to give detailed explanations.

Freemail listens only on localhost, so you need to install stunnel (or stunnel4) to give you a proxy to freemail.

sudo apt-get install stunnel4

Then edit /etc/defaults/stunnel4 to enable stunnel, and create /etc/stunnel/freemail-imap.conf:

# based on the included sample
accept  =
connect =
accept  =
connect = is the address of the freenet server.

You also need to create the self-signed cert. Just as a reminder, here's the sequence of commands.

cd /etc/stunnel
openssl genrsa -des3 -out server.key 1024
openssl req -new -x509 -key server.key -out cacert.pem -days 1095
openssl rsa -in server.key -out
mv server.key
cat server.key cacert.pem > mail.pem
/etc/init.d/stunnel4 restart

Tbird is kind of finicky about certs, so you should copy the cert file over to your client computer, and then install the cert file into Tbird's certs.

Follow the Freemail page (in Freenet) to learn to set up tbird. Everything is the same except a couple things. Instead of localhost, the server's address is used. Also, set the security to SSL/TLS for both services.

It should still cause an error, but the "Advanced Config" button should appear, and you can press that. That means the account is made.

When you attempt to connect, you should get a certificate error. Add an exception for your certificate.

Continue with the Freemail instructions, and you should be able to get your freemail on tbird.