With so many free mail services out there why would you like to have your own. Well, I can think in a few reasons: probably you want to create a portable e-mail both, or simply you want to play around with your bug. Another good reason would be that phoneME doesn't support https which it's need it if you want to use any free mail service (yahoo, gmail, etc), and having postfix is a simple and portable solution if you want to send emails with your bug. After battling with OE and Postfix (I'm new to OE), I was able to build and install my own postfix packages on my bug. By no means this is the only and/or the best way to setup postfix on the BUG platform, just want to share the result. Alright, let's get start it and transform your bug into a mail server with postfix.
Download and Install postfix
- Download the files: libpcre0_7.6-r4_armv6.ipk , libpcreposix0_7.6-r4_armv6.ipk , postfix_2.2.12-r0_armv6.ipk .
- Transfer the packages to your BUG from terminal, shell or any other SCP program:
$ scp *.ipk email@example.com:/home/root
- Then, log into the BUG as root and install the packages.
$ ssh firstname.lastname@example.org email@example.com's password: ... firstname.lastname@example.org:~# ipkg install libpcre0_7.6-r4_armv6.ipk ... email@example.com:~# ipkg install libpcreposix0_7.6-r4_armv6.ipk ... firstname.lastname@example.org:~# ipkg install postfix_2.2.12-r0_armv6.ipk ...
If you want, you can build the packages yourself.(finsprings has very good post on how to build packages for the BUG http://community.buglabs.net/finsprings/posts/19-Pulling-in-an-OE-Recipe)
We need to make some changes to the postfix configuration file:
- Open the main.cf file :
email@example.com:~# vi /etc/postfix/main.cf
- Change the domain and add the USB network:
mydomain = [YOUR-DOMAIN] # Optional mynetworks = 127.0.0.1/32 192.168.0.0/24; 10.10.10.0/32
To start postfix just type this:
firstname.lastname@example.org:~# /etc/init.d/postfix start
If everything went well, you should see something like this:
BusyBox v1.01 (2009.06.02-16:49+0000) multi-call binary
Usage: find [PATH...] [EXPRESSION]
postfix/postfix-script: starting the Postfix mail system
NOTE: Sometimes I get an error when try to start postfix, but just try to start it again and you should be fine
Here you can find a very simple app that uses postfix to send e-mails. For simplicity the app uses socket to send the emails instead JavaMail API.