Yes it is possible to run a mail server on a wl500g, but it acts very slow and uses a lot of memory.
If you a running a webcam or a lot of other programs on the router, it would not be a pleasure to work with the
mail server. I only have experience with the wl500g, perhaps it will run like charm on a newer asus model
with a little bit more of ram.

So I use Olegs latest firmware on a wl500g. (Thanks for his great work!)

We need a /opt partition on a external data storage. (I used a 128 MB USB-Drive on my test router).

I run the standard ipkg-package configuration:


src wl500g
src unslung
dest root /

Login via telnet or ssh and

run "ipkg update"

then run "ipkg install xmail"

Xmail and its necessary packages are going to be installed.

Installing xmail (1.22-3) to root...
Installing libstdc++ (0.2.0-5) to root...
Installing libuclibc++ (0.1.12-1) to root...
Configuring libstdc++
Configuring libuclibc++
Configuring xmail
Successfully terminated.

If you start the xmail-deamon via standard init script "/opt/etc/init.d/S43xmail start" the deamon
is starting with 3 processes after a few moments, but if you try to connect via telnet on port 25 or 110
the connection are refused.

So I begin to change some instructions in the "/opt/var/MailRoot/xmail" file:

# skeleton      example file to build /etc/init.d/ scripts.
#               This file should be used to construct scripts for /etc/init.d.
#               Written by Miquel van Smoorenburg <>.
#               Modified by Davide Libenzi <>
# Version:      @(#)skeleton  1.8  03-Mar-1998

#XMAIL_CMD_LINE="-SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX 1"
XMAIL_CMD_LINE="-Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX 1"
DESC="XMail server"

test -f $DAEMON || exit 0

set -e

ulimit -c 10000

        export MAIL_ROOT
        export MAIL_CMD_LINE
        $DAEMON $MAIL_CMD_LINE > /dev/null 2>&1 &
    while [ ! -f /var/run/$ ]
        sleep 1

If you would like to have a log file from the mail services simple change "/dev/null" with the path and
filename from the logfile e.g. "/opt/var/log/mail.log"

The environment from the router seems to have problem with exporting the global variables. I don't
know why, but if anybody knows why, please tell me.
I also have problems get the server equitable started without the option "-Md", which is for verbose logging.
But I thing this is not really a big problem.

Now try to start the mail-server with "/opt/etc/init.d/S43xmail start".

After 20 seconds try telnet localhost 25

If everything works fine you get something like this:

220 <1166714250.9226@xmailserver.test> [XMail 1.22 ESMTP Server] service ready; Thu, 21 Dec 2006 16:17:30 +0100

Now we need to add a admin user for the xmail-server administration:

Edit the file "/opt/var/MailRoot/"

Add a username for administrating the mail server and a password.
To create the password you need the programm "XMCrypt".

Simple run XMCrypt followed by the password to encrypt - e.g.:

[admin@MMXAP bin]$ XMCrypt password

If you use the user "administrator" with the password "password" the must look like this:
!The parameters must be seperated by a [TAB] space!

"administrator"	"15041616120a1701"

Restart the mail-server with "/opt/etc/init.d/S43xmail restart".

The easiest way to configure the mail server is the tool phpxmail. But you need a running webserver with
php to run this programm, but the webserver must not run on the router itself, you can also use
a external webserver.

I used phpxmail on the router itself, running on a lighttpd server with php-fcgi support, and it
works like charm.

If you would like to configure it without the tool CyberUX did a great tutorial.

The System is now ready for testing. If you would like to create a new domain and so on you also need
to change the according to the tutorial by Cyberux.

I also get the dovecot imap server running, if there is interest I will make a short tutorial too.

If you would like to run the mail-server not only for internal mail traffic you must
open the ports 25 and 110 tcp of course. But there a enough tutorials in this
fine forum.

I know that this isn't a complete tutorial, but the nessesery steps to get the server running
are included. So fell free to help me completing it.

So good luck and have fun.

Best regards