diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2004-05-30 09:51:55 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2004-05-30 09:51:55 +0000 |
commit | e403032b6ae6a1cc1f1b4db615f0c2e65a7a9c8f (patch) | |
tree | 7dce1ad2bb4bdc757c1d9fa8dc8468c2b4aea6a8 /mail-mta | |
parent | Version bump #49607 by Daniel Webert. (diff) | |
download | gentoo-2-e403032b6ae6a1cc1f1b4db615f0c2e65a7a9c8f.tar.gz gentoo-2-e403032b6ae6a1cc1f1b4db615f0c2e65a7a9c8f.tar.bz2 gentoo-2-e403032b6ae6a1cc1f1b4db615f0c2e65a7a9c8f.zip |
Moved from net-mail/xmail to mail-mta/xmail.
Diffstat (limited to 'mail-mta')
-rw-r--r-- | mail-mta/xmail/ChangeLog | 81 | ||||
-rw-r--r-- | mail-mta/xmail/Manifest | 8 | ||||
-rw-r--r-- | mail-mta/xmail/files/15xmail | 1 | ||||
-rw-r--r-- | mail-mta/xmail/files/digest-xmail-1.16 | 1 | ||||
-rw-r--r-- | mail-mta/xmail/files/xmail.confd | 19 | ||||
-rw-r--r-- | mail-mta/xmail/files/xmail.initd | 97 | ||||
-rw-r--r-- | mail-mta/xmail/files/xmailwizard | 65 | ||||
-rw-r--r-- | mail-mta/xmail/metadata.xml | 5 | ||||
-rw-r--r-- | mail-mta/xmail/xmail-1.16.ebuild | 126 |
9 files changed, 403 insertions, 0 deletions
diff --git a/mail-mta/xmail/ChangeLog b/mail-mta/xmail/ChangeLog new file mode 100644 index 000000000000..4030e4a566ff --- /dev/null +++ b/mail-mta/xmail/ChangeLog @@ -0,0 +1,81 @@ +# ChangeLog for net-mail/xmail +# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/xmail/ChangeLog,v 1.1 2004/05/30 09:51:55 robbat2 Exp $ + +*xmail-1.16 (30 May 2004) + + 30 May 2004; Robin H. Johnson <robbat2@gentoo.org> metadata.xml, + xmail-1.16.ebuild, files/15xmail, files/xmail.confd, files/xmail.initd, + files/xmailwizard: + Moved from net-mail/xmail to mail-mta/xmail. + + 25 Feb 2004; Jason Wever <weeve@gentoo.org> xmail-1.16.ebuild: + Added patch from bug #42771 so xmail builds again on sparc. + + 15 Dec 2003; <spider@gentoo.org> files/xmail.initd: + QA: fixing chown user.group to user:group, bug #35127 + + 17 Oct 2003; Nick Hadaway <raker@gentoo.org> xmail-1.16.ebuild: + Marked stable for x86. + + 27 Jul 2003; Nick Hadaway <raker@gentoo.org> : + Okay... both are now REALLY set to 29617. + + 25 Jul 2003; Nick Hadaway <raker@gentoo.org> files/xmailwizard: + Changed port 6017 to 29617 in the wizard to match the confd defaults. + + 23 Jul 2003; Nick Hadaway <raker@gentoo.org> files/xmail.initd, + files/xmail.confd: + Made changes to the initd file as suggested on bug #24923. + Thanks to Sergey Ivanov for working out the quirks with this build. + Added a warn to postinst about needing iptables enabled in the kernel. + +*xmail-1.16 (21 Jul 2003) + + 21 Jul 2003; Nick Hadaway <raker@gentoo.org> xmail-1.16.ebuild: + Version bump. Also fixed files/* so that there aren't any cr-lf + remnants. Made xmailwizard executable. + +*xmail-1.15 (26 May 2003) + + 10 Jun 2003; Nick Hadaway <raker@gentoo.org> xmail-1.15.ebuild: + Moved the useradd/groupadd routine to pkg_setup and added the + PROVIDE="virtual/mta" + + 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/mail-mta/xmail/Manifest b/mail-mta/xmail/Manifest new file mode 100644 index 000000000000..9f149d27a339 --- /dev/null +++ b/mail-mta/xmail/Manifest @@ -0,0 +1,8 @@ +MD5 8f93bde743cf3f7a77f27bcf602aa4dc files/xmail.confd 409 +MD5 e00a488aecb141a34c5ec43eac58b9a9 files/15xmail 24 +MD5 5bbd572781bd63319f432d3a74a399cf files/digest-xmail-1.16 62 +MD5 cae6882c47f1716c308486269292f76f files/xmail.initd 2803 +MD5 7b836bc7c37b3251bb6342bdb59b66f0 files/xmailwizard 2305 +MD5 91ae590722be6da1fcb7722240c1d27c ChangeLog 3197 +MD5 5721b86fd871bdfab77231abc6e02f68 metadata.xml 161 +MD5 5793a43c6823acc3e06067b65eb20fea xmail-1.16.ebuild 3248 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." diff --git a/mail-mta/xmail/metadata.xml b/mail-mta/xmail/metadata.xml new file mode 100644 index 000000000000..51f94e3fbe0e --- /dev/null +++ b/mail-mta/xmail/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>net-mail</herd> +</pkgmetadata> diff --git a/mail-mta/xmail/xmail-1.16.ebuild b/mail-mta/xmail/xmail-1.16.ebuild new file mode 100644 index 000000000000..e4361161d851 --- /dev/null +++ b/mail-mta/xmail/xmail-1.16.ebuild @@ -0,0 +1,126 @@ +# 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/xmail-1.16.ebuild,v 1.1 2004/05/30 09:51:55 robbat2 Exp $ + +inherit eutils + +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" + +DEPEND="virtual/glibc" +PROVIDE="virtual/mta" + +pkg_setup() { + enewgroup xmail + enewuser xmail -1 /bin/false /dev/null xmail +} + +src_compile() { + if use x86 ; then + emake -f Makefile.lnx || die + elif use sparc ; then + emake -f Makefile.slx || die + fi + 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." + + ewarn "" + ewarn "Make sure you have iptables enabled in your kernel!" + ewarn "" +} |