Tag Archives: freenet

Setting up Freemail with postfix and fetchmail

This was done on FreeBSD, bud should work elsewhere.

1. Freemail server.

First off, get Freemail and do what the manual tells you to do:

freemail% java -jar freemail.jar --newaccount thedude
freemail% java -jar freemail.jar --passwd thedude lebowski
freemail% java -jar freemail.jar --shortaddress thedude dude

Then, if your Freemail server is on a separate machine, edit the globalconfig file and change the IPs your server maps to.

I advise you start Freemail in foreground, this way you’ll have the error output right in front of you all the time:

freemail% java -jar Freemail.jar

2. Postfix.

Go to your postfix server’s /usr/local/etc/postfix/. If you’ve used it before, you should already have

smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = !plain, static:rest
smtp_sasl_password_maps = hash:/usr/local/etc/postfix/sasl_passwd

in main.cf. If not, add it and restart the postfix daemons.

Then, edit your transport file. This will relay all mail ending in .freemail to the appropriate server.

# relay freemail to headcleaner
.freemail smtp:[headcleaner.death.cd]:3025

Note there are no tabs here. Don’t know if they’re allowed. I hope they are.

Rebuild your transport.db database with

postfix% sudo postmap ./transport

Add your password to sasl_passwd:

[headcleaner.death.cd]:3025 thedude:lebowski

Note the port number is there, too!

And rebuild sasl_passwd.db:

postfix% sudo postmap ./sasl_passwd

3. fetchmail.

Now, this part isn’t really good yet, since I haven’t figured out how to fetch mail from IMAP as if it were POP. The idea here is to retrieve all mail and flush it from the server.

Ayway, edit your ~/.fetchmailrc:

poll headcleaner with proto IMAP port 3143
user 'thedude' there with password 'lebowski' is dude here

Now if you issue

~% fetchmail -v headcleaner

you’ll see your messages there.

I’ll finish with proper configuring instructions later.

Sources: A useful article on testing SMTP ovet telnet.

Also, this discussion was useful.

Freenet: using tin for FMS

I actually had to switch back to Thunderbird to read FMS, because tin has a bug or something that prevents communicating with the FMS server.

EDIT: no it doesn’t. This was an issue with FMS. It’s fixed now. Get a newer version.

Anyway, someone made a post to group fms yeasterday, detailing how to use tin with FMS. Here it is, almost entirely. I only removed some private data.

This is to report on using tin as a news client, and
also on the fact that FMS can’t handle many pipelined
GROUP commands.


% uname -a
FreeBSD [removed] 7.0-STABLE
FreeBSD 7.0-STABLE #5: Sun Aug 10 [removed] 2008
[removed]:/usr/obj/usr/src/sys/[removed] i386

% tin -V
Reading config file…
Version: tin 1.9.3 release 20080506 (“Dalintober”) Aug 30 2008 16:27:33

FMS version 0.3.18

When tin reads the list of active articles from the NNTP
server, it sends GROUP commands, all at once – “pipelined”.
Like this:

read_newsrc_active_file() GROUP anarchism
>>> GROUP anarchism [DEBUG: put_server]
read_newsrc_active_file() GROUP de.test
>>> GROUP de.test [DEBUG: put_server]
<<< 211 5 9 324 anarchism
<<< 211 4 215 328 de.test

This breaks FMS when more than two groups are subscribed to.
(Yes, I actually did check 2, 3, 4, 5 groups – "more than two"
seems to be the right definition.)

What happens is that tin sends, say, 5 GROUP messages, FMS
receives and properly handles two of them, and the rest get
choked up somewhere. NNTPConnection::run has a do-while cycle,
this cycle is executed iteration after iteration until
the news client is disconnected.

After that, FMS "receives" all the "missing" GROUP messages.

diff file that I used to trace where all this was taking place:

[CHK link removed]

P.S. It might be related to the sockets, etc.


A temporary solution for anyone who wants to use tin is
disabling message pipelining.

Doing it in 1.9.3 (unstable):

1) add ‘#define DISABLE_PIPELINING’ in include/autoconf.h,
there is no ./configure option yet.
2) grep for PIPELINE_LIMIT, seems that a recent addition to
mail.c doesn’t check if DISABLE_PIPELINING is enabled. So,
either remove PIPELINE_LIMIT or surround it with
‘#ifdef DISABLE_PIPELINING’ and ‘#endif’.
3) make build, don’t make distclean, since it will erase
the modified include/autoconf.h

Freenet 0.7 on FreeBSD 7.0

First off, running with Sun’s JDK won’t work. I’ve tried 1.6, 1.5 has also been reported. It doesn’t work, since the process can’t bind to the configured IPs.

You have to run it using Diablo JDK. At the time of writing Diablo JDK 1.6 was already available, yet I used diablo-jdk15 from ports.

If you get an error like

Updating time zones...You have the same version as the embedded one.

when installing, you can try disabling the Timezone Update tool:

sudo make -DWITHOUT_TZUPDATE install

That’s about it. You can run Freenet.

But there’s a catch: to run in the background, Freenet needs a wrapper. There is no wrapper for FreeBSD right now, of which you will be informed upon running freenet/run.sh start. Luckily, if you have Linux compatibility enabled, you can add a hard link (symbolic won’t work):

ln ./bin/wrapper-linux-x86-32 ./bin/wrapper