| XMail - POP3/SMTP Server |
|
|
|
| Written by macsat | |
| Wednesday, 20 December 2006 | |
|
Completing this tutorial will leave you with a working POP3 and SMTP mail server - the xmail server. I really do suggest that you drop by the home page of xmail, to read the documentation. I will not take any responsibility regarding people having there connections abused by people using their SMTP servers for sending out SPAM as a result of not setting up security correctly. This tutorial will install and configure the servers for basic use, and also show how to install and configure a PHP based configuration web interface (phpxmail). While the OpenWrt devices are indeed able to run this mail server, and also able to handle both incoming and outgoing mail, dont expect it to be able to handle 100s of mailboxes from very active users. I have only testet it a bit here, and it seems stable and quite low in system ressources. Please feel VERY welcome to write your experiences in the forums.
Tutorial Index
1) Installing needed packages, and xmail.
InstallingUnfortunately there isnt at present any ipkg package for xmail, which makes installation a bit (albeit not too much) more difficult than ipkg installs. Since there isnt much space in flash - at least not much space to store actual mails, I suggest that you only consider installing in /opt - meaning in external storage like a MMC card, USB Device or NFS/Samba share if you really want that :-). Information on theese topics can be found in my other tutorials on theese pages. I will in this tutorial install everything in /opt. If you are using /mmc or /hdd or something like that, please do change /opt to the appropiate value.
First, lets install some needed libs with ipkg:
The first thing to download is the xmail source tar file. This can be found here: http://www.xmailserver.org/xmail-1.22.tar.gz
Download and unpack directly on the router:
We need one directory containing all the default config files from the tar. The rest is of no use for us. Copy this directory to /opt/var/
Now download the xmail binaries from my site and unpack in the /opt/var/MailRoot/bin directory:
Now, download the startup script and make it executable:
All that is left is to create an administrator account and password.
In there you need to add a user/password in the form:
You are free to choose both username and password. The password however is not clear txt, it needs to be encrypted with the XMCrypt software that is a part of the package (we put that in the bin directory). Create the encrypted password like: This should be it. You are ready to run your xmail server :-)
Try to run it with:
You should see a message like: Where the number in the square brackets is the PID - and will hence be different on your system. Instead of configuring directly in the many config files, I really suggest you to proceed to the next section, and install phpxmail.
Installing and configuring phpxmailAs the name indicates, this package needs php to run. I suggest you take a look at my lighttpd with php 5 tutorial. After having lighttpd running with php5 the setup is quite easy.
Download the file from here: Unzip it and upload the entire content to your routers external storage in a directory that you setup lighttpd to use as server-root. In the following I have used /opt/www as root for lighttpd ! So copy all files in the zip to a directory like : /opt/www/phpxmail
After the copy perform the following commands:
You should now be able to point your internet browser to : and start configuring the mail server.
How to configure safely is beyond the scope of this tutorial. I will refer you to reading up on that on the xmail and phpxmail homepages : http://phpxmail.sourceforge.net/ Questions, comments and also success stories are VERY welcome in the forums. macsat |
|
| Last Updated ( Monday, 29 January 2007 ) |
| Next > |
|---|












