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.