www.mamboteam.com
macsat.com - OpenWrt | Olegs Firmware  
Home
Thursday, 24 July 2008
 
 
Main Menu
Home
About
News
Tutorials - OpenWrt (WR)
Tutorials - Oleg
Wiki (RDC Based Routers)
Online Shop
Forum
Downloads
Free Linux eBooks
Links
Search
Contact Us
We have 1 guest online
2509099 Visitors
Login
Welcome Guest.






Lost Password?
No account yet? Register
Old macsat.com
Nokia Unlock (Dansk)
Nokia Unlock (English)
XBins IRC Chat
XMail - POP3/SMTP Server PDF Print E-mail
(2 votes)
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.
2) Installing phpxmail.

 

Installing

Unfortunately 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:
ipkg install http://openwrt.alphacore.net/experimental/libstdc++_6.0.3-2_mipsel.ipk
ipkg install libpthread
ipkg install libgcc

 

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:
cd /tmp
wget http://www.xmailserver.org/xmail-1.22.tar.gz tar zxf xmail-122.tar.gz

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/
mkdir -p /opt/var
cd /tmp/xmail-1.22 cp -R MailRoot /opt/var

Now download the xmail binaries from my site and unpack in the /opt/var/MailRoot/bin directory:
cd /opt/var/MailRoot/bin
wget http://www.macsat.com/xmail_1.22_OpenWrt_WR_Binaries.tar.gz
tar zxf xmail_1.22_OpenWrt_WR_Binaries.tar.gz
rm  xmail_1.22_OpenWrt_WR_Binaries.tar.gz

Now, download the startup script and make it executable:
mkdir -p /opt/etc/init.d
wget http://www.macsat.com/S70xmail
chmod +x S70xmail

All that is left is to create an administrator account and password.
You need to edit the file /opt/var/MailRoot/ctrlaccounts.tab

In there you need to add a user/password in the form:
user<tab>pass

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:
/opt/var/MailRoot/bin/XMCrypt password

This should be it. You are ready to run your xmail server :-)

Try to run it with:
./S70xmail

You should see a message like:
Starting XMail server: XMail.[ 20285 ]

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 phpxmail

As 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:
http://switch.dl.sourceforge.net/sourceforge/phpxmail/phpxmail1.4.zip

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:
cd /opt/www/phpxmail
touch servers.php

You should now be able to point your internet browser to :
http://<your-router-ip>/phpxmail

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://www.xmailserver.org/

 http://phpxmail.sourceforge.net/

Questions, comments and also success stories are VERY welcome in the forums.

macsat 

Last Updated ( Monday, 29 January 2007 )
 
Next >
Buy Router
Buffalo Technology WBR2G54
Buffalo Technology WBR2G54
Recent Forum Topics
Donations

If you appriciate this site, please consider making a small donation.

All donations will be used to cover expenses from running macsat.com.

Syndicate
Sponsored Ads
 
Top! Top!