Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_bootstrap.php(430) : eval()'d code on line 123
[How-To] Install and configure xmail an a wl500g
Results 1 to 7 of 7

Thread: [How-To] Install and configure xmail an a wl500g

  1. #1
    Join Date
    Jul 2005
    Location
    Germany
    Posts
    15

    Talking [How-To] Install and configure xmail an a wl500g

    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 1.9.2.7-7f 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:

    ipkg.conf


    Code:
    src wl500g http://wl500g.dyndns.org/ipkg
    src unslung http://ipkg.nslu2-linux.org/feeds/unslung/wl500g
    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...
    Downloading http://ipkg.nslu2-linux.org/feeds/un...2-3_mipsel.ipk
    Installing libstdc++ (0.2.0-5) to root...
    Downloading http://ipkg.nslu2-linux.org/feeds/un...0-5_mipsel.ipk
    Installing libuclibc++ (0.1.12-1) to root...
    Downloading http://ipkg.nslu2-linux.org/feeds/un...2-1_mipsel.ipk
    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:



    Code:
    #!/bin/sh
    #
    # 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 <miquels@cistron.nl>.
    #               Modified by Davide Libenzi <davidel@xmailserver.org>
    #
    # Version:      @(#)skeleton  1.8  03-Mar-1998  miquels@cistron.nl
    #
    
    XMAIL_ROOT=/opt/var/MailRoot
    #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"
    PATH=$XMAIL_ROOT/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    DAEMON=/opt/bin/XMail
    NAME=XMail
    DESC="XMail server"
    
    test -f $DAEMON || exit 0
    
    set -e
    
    ulimit -c 10000
    
    
    start_xmail()
    {
        MAIL_ROOT=$XMAIL_ROOT
            export MAIL_ROOT
        MAIL_CMD_LINE=$XMAIL_CMD_LINE
            export MAIL_CMD_LINE
            $DAEMON $MAIL_CMD_LINE > /dev/null 2>&1 &
        while [ ! -f /var/run/$NAME.pid ]
        do
            sleep 1
        done
    }

    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:


    Code:
    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/ctrlaccounts.tab"

    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.:


    Code:
    [admin@MMXAP bin]$ XMCrypt password
    15041616120a1701


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



    Code:
    "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.

    http://www.geocities.com/xmailearn/


    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 server.tab 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

    mmX

  2. #2
    Hi,
    great works, thanks for your tutorial.
    Is possible to decrease using of memory? It use a lot memory
    command ps writes 10x Xmail is it necessary to be run 10x?
    $ps
    149 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    189 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    190 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    191 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    192 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    193 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    194 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    195 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    196 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    197 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX

    thanks
    Last edited by greengreen; 29-12-2006 at 13:41.

  3. #3
    My problem with Xmail, the HDD on the WL-HDD don't shut down when Xmail is running!

  4. #4

    Thumbs up dovecot

    can you provide us with dovecot package or binaries?

  5. #5
    Join Date
    Aug 2005
    Location
    Denmark
    Posts
    30
    Quote Originally Posted by greengreen View Post
    Hi,
    great works, thanks for your tutorial.
    Is possible to decrease using of memory? It use a lot memory
    command ps writes 10x Xmail is it necessary to be run 10x?
    $ps
    149 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    189 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    190 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    191 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    192 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    193 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    194 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    195 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    196 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX
    197 green 1028 S /opt/bin/XMail -Md -SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX

    thanks
    I have the same question. Can anyone explain that?
    /Peter

  6. #6
    Same problem with my system. Does anybody know how to disable POP3 thread in XMail? Now I have 13 threads from XMail according to 'ps'. Each uses ~3 MB, so only XMail uses more RAM than router has. :-(

  7. #7
    The answer is:

    -P- disable pop
    -B- disable pop3s
    -S- disable smtp
    -X- disable smtps
    -Y- disable psync
    -F- disable finger
    -C- disable ctrl
    -W- disable ctrls

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •