Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
docs:user-guide:services:xmail [2018/02/17 21:06] – ↷ Page moved from doc:howto:xmail to docs:user-guide:services:xmail bobafetthotmaildocs:guide-user:services:email:xmail [2021/06/23 21:29] stokito
Line 1: Line 1:
-=====XMail=====+====== XMail mail server =====
 + 
 +<WRAP center round alert 80%> 
 +The XMail package was available only up to 14.07. Since there was no active maintainer for this package, it was dropped in 15.05.\\ If you want to use XMail under OpenWrt/LEDE >/=17.01, you have to compile it yourself. 
 +</WRAP> 
  
 Installed xmail, it will put executables in /usr/bin and MailRoot in /tmp \\ Installed xmail, it will put executables in /usr/bin and MailRoot in /tmp \\
Line 6: Line 11:
 cp -rp MailRoot /www/ \\ cp -rp MailRoot /www/ \\
 I created the start script XMail in /etc/init.d/ with the following - you should edit XMAIL_ROOT variable \\ I created the start script XMail in /etc/init.d/ with the following - you should edit XMAIL_ROOT variable \\
 +<code bash>
 +#!/bin/sh
 +# example file to build /etc/init.d/ scripts.
 +# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
 +# Modified by Davide Libenzi <davidel@xmailserver.org>
 +#
 +# Version: 1.8  03-Mar-1998  miquels@cistron.nl
 +#
 +
 +XMAIL_ROOT=/www/MailRoot
 +XMAIL_CMD_LINE="-SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX 1 -Pl -Sl -Ql -Ll -Yl -Yi 600"
 +DAEMON=/usr/bin/XMail
 +NAME=XMail
 +DESC="XMail server"
 +echo $DAEMON
 +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
 +while [ ! -f /var/run/$NAME.pid ]
 +do
 +  sleep 1
 +done
 +}
 +
 +stop_xmail() {
 +if [ -f /var/run/$NAME.pid ]
 +then
 +  echo `date` > $XMAIL_ROOT/.shutdown
 +  kill `cat /var/run/$NAME.pid`
 +  sleep 1
 +  #while [ -f $XMAIL_ROOT/.shutdown ]
 +  #do
 +  # sleep 1
 +  #done
 +fi
 +}
 +
  
-  #!/bin/sh                                                                         +case "$1" in 
-  #                                                                                 +start) 
-  # skeleton      example file to build /etc/init.d/ scripts.                       +  echo -n "Starting $DESC: " 
-  #               This file should be used to construct scripts for                  +  start_xmail 
-  #/etc/init.d.                                                                     +  echo "$NAME.[" `cat /var/run/$NAME.pid` "]" 
-  #                                                                                 +;; 
-  #               Written by Miquel van Smoorenburg <miquels@cistron.nl>          +stop) 
-  #               Modified by Davide Libenzi <davidel@xmailserver.org>              +  echo -n "Stopping $DESC: " 
-  #                                                                                 +  stop_xmail 
-  # Version:      @(#)skeleton  1.8  03-Mar-1998  miquels@cistron.nl                +  echo "$NAME." 
-  #                                                                                 +;; 
-                                                                                  +restart|force-reload) 
-  XMAIL_ROOT=/www/MailRoot                                                          +  echo -n "Restarting $DESC: " 
-  XMAIL_CMD_LINE="-SX 1 -Qn 1 -Yt 1 -Ln 1 -PX 1 -CX 1 -Pl -Sl -Ql -Ll -Yl -Yi 600"  +  stop_xmail 
-  DAEMON=/usr/bin/XMail                                    +  sleep 1 
-  NAME=XMail                                               +  start_xmail 
-  DESC="XMail server"                                      +  echo "$NAME.[" `cat /var/run/$NAME.pid` "]" 
-  echo $DAEMON                                             +;; 
-  test -f $DAEMON || exit 0                                +*) 
-                                                         +  N=/opt/etc/init.d/Xmail 
-  set -e                                                   +  echo "Usage: $N {start|stop|restart|force-reload}" > &2 
-  ulimit -c 10000                                          +  exit 1 
-                                                         +;; 
-  start_xmail() {                                          +esac 
-  MAIL_ROOT=$XMAIL_ROOT                                   +exit 0 
-  export MAIL_ROOT                                        +</code>
-  MAIL_CMD_LINE=$XMAIL_CMD_LINE                           +
-  export MAIL_CMD_LINE                                    +
-  $DAEMON                                                 +
-  while [ ! -f /var/run/$NAME.pid ]                       +
-  do                                                      +
-    sleep 1                                                +
-  done                                                    +
-  }                                                        +
-                                                         +
-  stop_xmail() {                                           +
-  if [ -f /var/run/$NAME.pid ]                            +
-  then                                                    +
-    echo `date` > $XMAIL_ROOT/.shutdown                    +
-    kill `cat /var/run/$NAME.pid`                          +
-    sleep 1                                                +
-    #while [ -f $XMAIL_ROOT/.shutdown ]                    +
-    #do                                                    +
-    # sleep 1                                              +
-    #done                                                  +
-  fi                                                      +
-  }                                                        +
-                                                         +
-                                                         +
-  case "$1" in                                             +
-  start)                                                  +
-    echo -n "Starting $DESC: "                             +
-    start_xmail                                            +
-    echo "$NAME.[" `cat /var/run/$NAME.pid` "]"            +
-  ;;                                                      +
-  stop)                                                   +
-    echo -n "Stopping $DESC: "                             +
-    stop_xmail                                             +
-    echo "$NAME."                                          +
-  ;;                                                      +
-  restart|force-reload)                                   +
-    echo -n "Restarting $DESC: "                           +
-    stop_xmail                                             +
-    sleep 1                                                +
-    start_xmail                                            +
-    echo "$NAME.[" `cat /var/run/$NAME.pid` "]"            +
-  ;;                                                      +
-  *)                                                      +
-    N=/opt/etc/init.d/Xmail                                +
-    echo "Usage: $N {start|stop|restart|force-reload}" >&+
-    exit 1                                                 +
-  ;;                                                      +
-  esac                                                     +
-  exit 0+
  
 create MailRoot/ctrlaccounts.tab \\ create MailRoot/ctrlaccounts.tab \\
  • Last modified: 2022/05/11 23:59
  • by stokito