summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2004-05-30 09:51:55 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2004-05-30 09:51:55 +0000
commit666ab0387891ecceb65c8ba30a2e9d36b7e1c890 (patch)
tree4a6b69c34dbb94ed0d621e95f2bc1bbe68c839e6 /mail-mta/xmail/files
parentVersion bump #49607 by Daniel Webert. (diff)
downloadhistorical-666ab0387891ecceb65c8ba30a2e9d36b7e1c890.tar.gz
historical-666ab0387891ecceb65c8ba30a2e9d36b7e1c890.tar.bz2
historical-666ab0387891ecceb65c8ba30a2e9d36b7e1c890.zip
Moved from net-mail/xmail to mail-mta/xmail.
Diffstat (limited to 'mail-mta/xmail/files')
-rw-r--r--mail-mta/xmail/files/15xmail1
-rw-r--r--mail-mta/xmail/files/digest-xmail-1.161
-rw-r--r--mail-mta/xmail/files/xmail.confd19
-rw-r--r--mail-mta/xmail/files/xmail.initd97
-rw-r--r--mail-mta/xmail/files/xmailwizard65
5 files changed, 183 insertions, 0 deletions
diff --git a/mail-mta/xmail/files/15xmail b/mail-mta/xmail/files/15xmail
new file mode 100644
index 000000000000..7274e2c13ba8
--- /dev/null
+++ b/mail-mta/xmail/files/15xmail
@@ -0,0 +1 @@
+MAIL_ROOT=/var/MailRoot
diff --git a/mail-mta/xmail/files/digest-xmail-1.16 b/mail-mta/xmail/files/digest-xmail-1.16
new file mode 100644
index 000000000000..aa6f3e6077a2
--- /dev/null
+++ b/mail-mta/xmail/files/digest-xmail-1.16
@@ -0,0 +1 @@
+MD5 cc02e8aee49c48b9f4e592ba0b0cab71 xmail-1.16.tar.gz 409228
diff --git a/mail-mta/xmail/files/xmail.confd b/mail-mta/xmail/files/xmail.confd
new file mode 100644
index 000000000000..8092feee3caa
--- /dev/null
+++ b/mail-mta/xmail/files/xmail.confd
@@ -0,0 +1,19 @@
+# all files are relative to this folder
+
+CHROOT="/chroot/xmail"
+MAIL_ROOT=/var/MailRoot
+export CHROOT MAIL_ROOT
+
+# variables for simplicity sake
+MAIL_NAME=XMail
+MAIL_EXEC=/var/MailRoot/bin/$MAIL_NAME
+MAIL_PID=/var/run/$MAIL_NAME.pid
+
+# set your options here
+
+MY_SMTP=29025
+MY_POP3=29110
+MY_FING=29079
+MY_CTRL=29617
+
+MAIL_CMD_LINE=" -Pl -Pp $MY_POP3 -Sl -Sp $MY_SMTP -Ql -Fl -Fp $MY_FING -Cl -Cp $MY_CTRL -Ll"
diff --git a/mail-mta/xmail/files/xmail.initd b/mail-mta/xmail/files/xmail.initd
new file mode 100644
index 000000000000..df429d4ace36
--- /dev/null
+++ b/mail-mta/xmail/files/xmail.initd
@@ -0,0 +1,97 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/xmail/files/xmail.initd,v 1.1 2004/05/30 09:51:55 robbat2 Exp $
+
+depend() {
+ need net logger
+ use dns
+}
+
+checkconfig() {
+ if [ "$MAIL_NAME" == "" ] ; then
+ eerror "MAIL_NAME not set - check your /etc/conf.d/xmail file."
+ fi
+ if [ "$MAIL_ROOT" == "" ] ; then
+ eerror "MAIL_ROOT not set - check your /etc/conf.d/xmail file."
+ fi
+ if [ "$MAIL_PID" == "" ] ; then
+ eerror "MAIL_PID not set - check your /etc/conf.d/xmail file."
+ fi
+ if [ "$MAIL_CMD_LINE" == "" ] ; then
+ eerror "MAIL_CMD_LINE not set - check your /etc/conf.d/xmail file."
+ fi
+ if [ "$MAIL_EXEC" == "" ] ; then
+ eerror "MAIL_EXEC not set - check your /etc/conf.d/xmail file."
+ fi
+ if [ ! -f ${CHROOT}${MAIL_EXEC} ] ; then
+ eerror "$MAIL_EXEC not found!"
+ fi
+ set -e
+ ulimit -c 20000
+
+
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting $MAIL_NAME"
+ CHROOT=`sed -n 's/^[[:blank:]]\?CHROOT="\([^"]\+\)"/\1/p' /etc/conf.d/xmail 2>/dev/null`
+ EXIST="no"
+
+ if [ -z "${CHROOT}" -a ! -d "/chroot/xmail" ]; then
+ CHROOT="/chroot/xmail"
+ elif [ -d ${CHROOT} ]; then
+ EXISTS="yes"
+ fi
+
+ if [ ! "$EXISTS" = yes ]; then
+ einfo; einfo "Setting up the chroot directory..."
+ mkdir -m 700 -p ${CHROOT}
+ fi
+
+ for subdir in dev lib var/run var/MailRoot tmp
+ do
+ if [ ! -d ${CHROOT}${subdir} ]
+ then
+ mkdir -p ${CHROOT}/${subdir}
+ fi
+ done
+
+ if [ ! -c ${CHROOT}/dev/null ]
+ then
+ mknod ${CHROOT}/dev/null c `\
+ ls -Ll /dev/null |\
+ awk '{print sub(",","",$5) " " $6}'`
+ fi
+
+ cp -R -u /etc/xmail/* ${CHROOT}${MAIL_ROOT}
+
+ chown -R xmail:xmail ${CHROOT}
+
+ cp `ldd ${CHROOT}${MAIL_ROOT}/bin/XMail |\
+ sed -n 's/[[:blank:]]*[^=]*=>\([^(]*\).*/\1/p'` ${CHROOT}/lib/
+ start-stop-daemon --start -c xmail -r ${CHROOT} \
+ --startas ${MAIL_EXEC} --pidfile=${MAIL_PID} -- \
+ ${MAIL_CMD_LINE}
+ /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 110 -j REDIRECT --to-ports 29110
+ /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 25 -j REDIRECT --to-ports 29025
+ /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 79 -j REDIRECT --to-ports 29079
+
+ eend $? "Failed to start $MAIL_NAME"
+}
+
+stop() {
+ ebegin "Stopping $MAIL_NAME"
+ /sbin/iptables -t nat -D PREROUTING -i eth0 -p tcp --dport 110 -j REDIRECT --to-ports 29110
+ /sbin/iptables -t nat -D PREROUTING -i eth0 -p tcp --dport 25 -j REDIRECT --to-ports 29025
+ /sbin/iptables -t nat -D PREROUTING -i eth0 -p tcp --dport 79 -j REDIRECT --to-ports 29079
+ start-stop-daemon --stop --quiet --pidfile=${CHROOT}${MAIL_PID} --name $MAIL_NAME --retry 120 --oknodo --signal 2
+
+ cd ${CHROOT}${MAIL_ROOT}
+ for i in *\.tab
+ do
+ cp -u -f $i /etc/xmail/
+ done
+ eend $? "Failed to stop $MAIL_NAME"
+}
diff --git a/mail-mta/xmail/files/xmailwizard b/mail-mta/xmail/files/xmailwizard
new file mode 100644
index 000000000000..430829902c25
--- /dev/null
+++ b/mail-mta/xmail/files/xmailwizard
@@ -0,0 +1,65 @@
+#!/bin/sh
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/xmail/files/xmailwizard,v 1.1 2004/05/30 09:51:55 robbat2 Exp $
+
+MAIL_ROOT=/chroot/xmail/var/MailRoot
+MAIL_CONF=/etc/xmail
+echo "Configuring XMail server ..."
+echo ""
+read -p "Create CtrlClnt login name: " LOGIN
+echo ""
+PASSWD1=1
+until
+ read -s -p "Enter CtrlClnt password: " PASSWD
+ echo ""
+ read -s -p "Enter password again: " PASSWD1
+ echo ""
+ [ $PASSWD1 == $PASSWD ]
+do
+ echo "Passwords do not match, please try again!"
+done
+read -p "Enter fully-qualified domain name (e.g. xmailserver.org): " MYDN
+echo ""
+## process with files
+echo -e "\"$LOGIN\"\t\"`$MAIL_ROOT/bin/XMCrypt $PASSWD`\"\n" >$MAIL_CONF/ctrlaccounts.tab
+cp $MAIL_CONF/server.tab $MAIL_CONF/server.tab.orig
+sed -e "s:xmailserver.test:$MYDN:" <$MAIL_CONF/server.tab.orig >$MAIL_CONF/server.tab
+cp /etc/mail/aliases $MAIL_CONF/aliases.tab
+perl -n -i'.orig' -e "if (!/^\$/ and ! /^#/) {s/: */\t/;s/^/${MYDN}\t/;print}" $MAIL_CONF/aliases.tab
+/etc/init.d/xmail start
+NETSTAT=`netstat -an | grep -c ":29617"`
+while [ $NETSTAT -eq 0 ]; do
+ echo "XMail Ctrl server not yet running ... sleeping 10 seconds."
+ sleep 10
+ NETSTAT=`netstat -an | grep -c ":29617"`
+done
+$MAIL_ROOT/bin/CtrlClnt -n 29617 -s localhost -u $LOGIN -p $PASSWD domainadd $MYDN
+read -n 1 -p "Do you want to add mailusers to $MYDN domain? (y/n): " YESNO
+echo ""
+while [ $YESNO == 'Y' -o $YESNO == 'y' ]
+do
+ read -p "Enter mailuser login: " USER
+ echo ""
+ PASS=1
+ until
+ read -s -p "Enter mailuser password: " PASS
+ echo ""
+ read -s -p "Enter password again: " PASS1
+ echo ""
+ [ "$PASS" == "$PASS1" ]
+ do
+ echo "Passwords do not match, please try again!"
+ done
+ $MAIL_ROOT/bin/CtrlClnt -n 29617 -s localhost -u $LOGIN -p $PASSWD useradd $MYDN $USER $PASS U
+ read -n 1 -p "Do you want to add more mailusers to $MYDN domain? (y/n): " YESNO
+ echo ""
+done
+/etc/init.d/xmail stop
+NETSTAT=`netstat -an | grep -c ":29617"`
+while [ $NETSTAT -ne 0 ]; do
+ echo "There is(are) still $NETSTAT open connection(s) ... sleeping 10 seconds."
+ sleep 10
+ NETSTAT=`netstat -an | grep -c ":29617"`
+done
+echo "Edit the MAIL_CMD_LINE property in /etc/conf.d/xmail to configure logging, TCP/IP bindings, threads, etc."