summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Hadaway <raker@gentoo.org>2003-06-09 18:30:15 +0000
committerNick Hadaway <raker@gentoo.org>2003-06-09 18:30:15 +0000
commit08a479a04e96783e21908e55a288c3d49263903e (patch)
treeb6760c0a377f20a0ae79ae69f36ff1b50d9b0938 /net-mail/xmail
parentupdate to ebuild to make it install shared lib in addition to static (diff)
downloadgentoo-2-08a479a04e96783e21908e55a288c3d49263903e.tar.gz
gentoo-2-08a479a04e96783e21908e55a288c3d49263903e.tar.bz2
gentoo-2-08a479a04e96783e21908e55a288c3d49263903e.zip
New ebuild. "The world's fast email server" ??? :)
Diffstat (limited to 'net-mail/xmail')
-rw-r--r--net-mail/xmail/ChangeLog43
-rw-r--r--net-mail/xmail/Manifest7
-rw-r--r--net-mail/xmail/files/15xmail1
-rw-r--r--net-mail/xmail/files/digest-xmail-1.151
-rw-r--r--net-mail/xmail/files/xmail.confd19
-rw-r--r--net-mail/xmail/files/xmail.initd99
-rw-r--r--net-mail/xmail/files/xmailwizard65
-rw-r--r--net-mail/xmail/xmail-1.15.ebuild123
8 files changed, 358 insertions, 0 deletions
diff --git a/net-mail/xmail/ChangeLog b/net-mail/xmail/ChangeLog
new file mode 100644
index 000000000000..b8635b52f243
--- /dev/null
+++ b/net-mail/xmail/ChangeLog
@@ -0,0 +1,43 @@
+# ChangeLog for net-mail/xmail
+# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/xmail/ChangeLog,v 1.1 2003/06/09 18:30:15 raker Exp $
+
+*XMail-1.15 (26 May 2003)
+
+ 09 Jun 2003; Nick Hadaway <raker@gentoo.org> xmail-1.15.ebuild:
+ Commented out the interactive portion of the ebuild and updated the
+ groupadd/useradd portion.
+
+ 26 May 2003; Sergey Ivanov <seriv@parkheights.dyndns.org> xmail-1.15.ebuild,
+ xmail-1.15.ebuild, xmail.initd, xmail.confd, xmailwizard:
+ Files updated to chroot XMail into /chroot/xmail, running as unprivileged user
+
+*XMail-1.14 (21 Mar 2003)
+
+ 21 Mar 2003; Kevin Williams <kwilliams@sark.com> xmail-1.12.ebuild, files/xmailwizard, files/xmail.initd, files/xmail.confd, files/15xmail :
+ ENV.D file for MAIL_ROOT variable,
+ CONF.D file for XMail configuration,
+ INIT.D script greatly simplified, uses CONF.D file variables,
+ automated configuration script - separated from ebuild
+
+ 07 Apr 2003; Sergey Ivanov <seriv@parkheights.dyndns.org> xmail-1.12-r0.ebuild,
+ xmail-1.14-r0.ebuild, xmail.diff:
+ Update ebuild and patch to be independent of version numbers.
+
+*XMail-1.12 (07 Feb 2003)
+
+ 18 Feb 2003; Kevin Williams <kwilliams@sark.com> xmail-1.12.ebuild, xmail.diff:
+ Initial import.
+
+ 11 Mar 2003; Sergey Ivanov <seriv@parkheights.dyndns.org> xmail-1.12.ebuild, xmail.diff
+ Updated ebuild and start/stop script to start and stop it by it's own
+ control functions
+
+ 13 Mar 2003; Sergey Ivanov <seriv@parkheights.dyndns.org> xmail-1.12.ebuild, xmail.diff
+ Updated ebuild and start/stop script to according to debian's directory
+ structure of XMail mailserver, thanks to Radim Kolar <hsn@cybermail.net>,
+ see http://home.worldonline.cz/~cz210552/xmail.html
+
+ 18 Mar 2003; Sergey Ivanov <seriv@parkheights.dyndns.org> xmail-1.12-r0.ebuild
+ Fix some mistakes in interactive configure script of xmail and move mailboxes
+ from /etc/xmail to /var/mail.
diff --git a/net-mail/xmail/Manifest b/net-mail/xmail/Manifest
new file mode 100644
index 000000000000..977553a02e3f
--- /dev/null
+++ b/net-mail/xmail/Manifest
@@ -0,0 +1,7 @@
+MD5 6a3493e456a487d53f4be637bfa8a549 ChangeLog 1964
+MD5 883072798c8df331f155695e9f9607a7 xmail-1.15.ebuild 3328
+MD5 88beafce840e044f9f7c1cd7ec477298 files/15xmail 25
+MD5 4618d48569507ce58990ba97fee24692 files/digest-xmail-1.15 62
+MD5 6c3887ed3e3bcacc4394300820ba571f files/xmailwizard 2366
+MD5 4fa9158e0a12ad6782ab15e068648c74 files/xmail.confd 428
+MD5 7d164fc749068e3ecce5e5f751d23594 files/xmail.initd 2944
diff --git a/net-mail/xmail/files/15xmail b/net-mail/xmail/files/15xmail
new file mode 100644
index 000000000000..56153638700d
--- /dev/null
+++ b/net-mail/xmail/files/15xmail
@@ -0,0 +1 @@
+MAIL_ROOT=/var/MailRoot
diff --git a/net-mail/xmail/files/digest-xmail-1.15 b/net-mail/xmail/files/digest-xmail-1.15
new file mode 100644
index 000000000000..da8db88c0742
--- /dev/null
+++ b/net-mail/xmail/files/digest-xmail-1.15
@@ -0,0 +1 @@
+MD5 df7b85c889d8ac420559cb5a1e0678b7 xmail-1.15.tar.gz 402472
diff --git a/net-mail/xmail/files/xmail.confd b/net-mail/xmail/files/xmail.confd
new file mode 100644
index 000000000000..19a8bf992e79
--- /dev/null
+++ b/net-mail/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/net-mail/xmail/files/xmail.initd b/net-mail/xmail/files/xmail.initd
new file mode 100644
index 000000000000..d878cfc64d48
--- /dev/null
+++ b/net-mail/xmail/files/xmail.initd
@@ -0,0 +1,99 @@
+#!/sbin/runscript
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-mail/xmail/files/xmail.initd,v 1.1 2003/06/09 18:30:15 raker 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
+ do
+ if [ ! -d ${CHROOT}${subdir} ]
+ then
+ mkdir -p ${CHROOT}/${subdir}
+ fi
+ done
+
+ if [ ! -c ${CHROOT}/dev/null ]
+ then
+ ls -Ll /dev/null |\
+ awk '{print sub(",","",$5) " " $6}' |\
+ xargs mknod ${CHROOT}/dev/null c
+ fi
+
+ chown -R xmail.xmail ${CHROOT}
+
+ cp -R -u /etc/xmail/* ${CHROOT}${MAIL_ROOT}
+
+ cd ${CHROOT}
+ ldd var/MailRoot/bin/XMail |\
+ sed -n 's/[[:blank:]][^>]\+>[[:blank:]]\([[:graph:]]\+\).*/\1 lib\/ /p'\
+ |xargs -n 2 cp -u
+ 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/net-mail/xmail/files/xmailwizard b/net-mail/xmail/files/xmailwizard
new file mode 100644
index 000000000000..8eec15d6967b
--- /dev/null
+++ b/net-mail/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/net-mail/xmail/files/xmailwizard,v 1.1 2003/06/09 18:30:15 raker 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 ":6017"`
+while [ $NETSTAT -eq 0 ]; do
+ echo "XMail Ctrl server not yet running ... sleeping 10 seconds."
+ sleep 10
+ NETSTAT=`netstat -an | grep -c ":6017"`
+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 ":6017"`
+while [ $NETSTAT -ne 0 ]; do
+ echo "There is(are) still $NETSTAT open connection(s) ... sleeping 10 seconds."
+ sleep 10
+ NETSTAT=`netstat -an | grep -c ":6017"`
+done
+echo "Edit the MAIL_CMD_LINE property in /etc/conf.d/xmail to configure logging, TCP/IP bindings, threads, etc."
diff --git a/net-mail/xmail/xmail-1.15.ebuild b/net-mail/xmail/xmail-1.15.ebuild
new file mode 100644
index 000000000000..ccef5a9ac4da
--- /dev/null
+++ b/net-mail/xmail/xmail-1.15.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/xmail/xmail-1.15.ebuild,v 1.1 2003/06/09 18:30:15 raker Exp $
+
+DESCRIPTION="The world's fastest email server"
+HOMEPAGE="http://www.xmailserver.org/"
+SRC_URI="http://www.xmailserver.org/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~sparc"
+IUSE=""
+DEPEND="virtual/glibc"
+
+pkg_preinst() {
+ if ! grep -q ^xmail: /etc/group
+ then
+ groupadd xmail || die "problem adding group xmail"
+ fi
+ if ! grep -q ^xmail: /etc/passwd
+ then
+ useradd -g xmail -d /dev/null -s /bin/false xmail \
+ || die "problem adding user xmail"
+ fi
+ pwconv
+ grpconv
+}
+
+src_compile() {
+ emake -f Makefile.lnx || die
+ sed -e "s:/var/MailRoot:/etc/xmail:g" sendmail.sh > sendmail.sh.new
+}
+
+src_install() {
+ einfo "Setting up directory hierarchy"
+ diropts -m 700 -o xmail -g xmail
+ dodir /etc/xmail
+ dodir /chroot/xmail/var/MailRoot/bin
+ dodir /etc/xmail/tabindex
+ dodir /etc/xmail/dnscache/mx
+ dodir /etc/xmail/dnscache/ns
+ dodir /etc/xmail/spool/local
+ dodir /etc/xmail/spool/temp
+ dodir /etc/xmail/logs
+ dodir /etc/init.d
+ dodir /etc/conf.d
+
+ touch ${D}/chroot/xmail/var/MailRoot/bin/.keep
+
+ for i in cmdaliases custdomains domains filters pop3linklocks\
+ pop3links pop3locks userauth
+ do
+ dodir /etc/xmail/${i}
+ touch ${D}/etc/xmail/${i}/.keep
+ done
+
+ for i in pop3 smtp
+ do
+ dodir /etc/xmail/userauth/${i}
+ touch ${D}/etc/xmail/userauth/${i}/.keep
+ done
+ rm -f ${D}/etc/xmail/userauth/.keep
+
+ einfo "Installing the XMail initial configuration"
+ insopts -o xmail -g xmail -m 600
+ cd ${S}/MailRoot
+ insinto /etc/xmail
+ doins server.tab ctrl.ipmap.tab dnsroots finger.ipmap.tab\
+ message.id pop3.ipmap.tab smtp.ipmap.tab\
+ userdef.tab
+
+ umask 077
+ for i in mailusers extaliases domains mailusers aliases \
+ aliasdomain extaliases pop3links smtpauth smtpextauth \
+ smtpfwd smtprelay smtpgw spam-address spammers ctrlaccounts \
+ filters.in filters.out
+ do
+ touch ${D}/etc/xmail/${i}.tab
+ done
+
+ einfo "Installing the XMail documentation"
+ umask 022
+ dodoc ${S}/docs/*
+ dodoc ${S}/gpl.txt
+ dodoc ${S}/ToDo.txt
+
+
+ einfo "Installing the XMail software"
+ insinto /etc/env.d
+ doins ${FILESDIR}/15xmail
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/xmail.initd xmail
+ insinto /etc/conf.d
+ newins ${FILESDIR}/xmail.confd xmail
+ cd ${S}
+ insopts -o xmail -g xmail -m 4700
+ newsbin sendmail sendmail.xmail
+ insopts -o xmail -g xmail -m 700
+ exeinto /chroot/xmail/var/MailRoot/bin
+ doexe CtrlClnt XMail XMCrypt MkUsers
+ newsbin sendmail.sh.new sendmail
+}
+
+pkg_postinst() {
+ rm -f /etc/xmail/cmdaliases/.keep
+ rm -f /etc/xmail/custdomains/.keep
+ rm -f /etc/xmail/domains/.keep
+ rm -f /etc/xmail/filters/.keep
+ rm -f /etc/xmail/pop3linklocks/.keep
+ rm -f /etc/xmail/pop3links/.keep
+ rm -f /etc/xmail/pop3locks/.keep
+ rm -f /etc/xmail/userauth/pop3/.keep
+ rm -f /etc/xmail/userauth/smtp/.keep
+
+ #read -n 1 -p "Do you want to configure XMail now (y/n)? " YESNO
+ #echo ""
+ #if [ $YESNO == 'Y' -o $YESNO == 'y' ] ; then
+ # sh ${FILESDIR}/xmailwizard
+ #else
+ # einfo "You can quickly configure XMail by running ${FILESDIR}/xmailwizard."
+ #fi
+
+ einfo "You can quickly configure XMail by running ${FILESDIR}/xmailwizard."
+}