diff options
author | Geert Bevin <gbevin@gentoo.org> | 2001-12-05 02:33:04 +0000 |
---|---|---|
committer | Geert Bevin <gbevin@gentoo.org> | 2001-12-05 02:33:04 +0000 |
commit | 3305cab09d899221a66abe94be3cc9b5a97e5b75 (patch) | |
tree | e99ed02b93c9bfd2e4bfe81b442f03631f55517c | |
parent | Upgraded to new version and integrate with startup scripts. (diff) | |
download | gentoo-2-3305cab09d899221a66abe94be3cc9b5a97e5b75.tar.gz gentoo-2-3305cab09d899221a66abe94be3cc9b5a97e5b75.tar.bz2 gentoo-2-3305cab09d899221a66abe94be3cc9b5a97e5b75.zip |
Reviewed entire qmail installation since the installation was broken.
It's now installed exactly according to what's explained in the qmail howto
v2. It uses daemontools for service launching. To start/stop/reload, there
is an additional script /var/qmail/bin/qmail-control that can be used
instead of the general svscan startup file.
-rw-r--r-- | net-mail/dot-forward/dot-forward-0.71.ebuild | 52 | ||||
-rw-r--r-- | net-mail/dot-forward/files/digest-dot-forward-0.71 | 1 | ||||
-rw-r--r-- | net-mail/fastforward/fastforward-0.51.ebuild | 53 | ||||
-rw-r--r-- | net-mail/fastforward/files/digest-fastforward-0.51 | 1 | ||||
-rw-r--r-- | net-mail/qmail/files/1.03-r5/dot_qmail | 1 | ||||
-rw-r--r-- | net-mail/qmail/files/1.03-r5/qmail-control | 27 | ||||
-rw-r--r-- | net-mail/qmail/files/1.03-r5/qmail-linksync.patch | 54 | ||||
-rw-r--r-- | net-mail/qmail/files/1.03-r5/rc | 4 | ||||
-rw-r--r-- | net-mail/qmail/files/1.03-r5/run-qmailsend | 2 | ||||
-rw-r--r-- | net-mail/qmail/files/1.03-r5/run-qmailsendlog | 2 | ||||
-rw-r--r-- | net-mail/qmail/files/1.03-r5/run-qmailsmtpd | 6 | ||||
-rw-r--r-- | net-mail/qmail/files/1.03-r5/run-qmailsmtpdlog | 2 | ||||
-rw-r--r-- | net-mail/qmail/files/digest-qmail-1.03-r5 | 4 | ||||
-rw-r--r-- | net-mail/qmail/qmail-1.03-r5.ebuild | 255 |
14 files changed, 464 insertions, 0 deletions
diff --git a/net-mail/dot-forward/dot-forward-0.71.ebuild b/net-mail/dot-forward/dot-forward-0.71.ebuild new file mode 100644 index 000000000000..d5025022c0c0 --- /dev/null +++ b/net-mail/dot-forward/dot-forward-0.71.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2001 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Geert Bevin <gbevin@theleaf.be> +# $Header: /var/cvsroot/gentoo-x86/net-mail/dot-forward/dot-forward-0.71.ebuild,v 1.1 2001/12/05 02:33:04 gbevin Exp $ + +S=${WORKDIR}/${P} +DESCRIPTION="Dot-forward reads sendmail's .forward files under qmail." +HOMEPAGE="http://cr.yp.to/dot-forward.html" + +SRC_URI="http://cr.yp.to/software/dot-forward-0.71.tar.gz" + +DEPEND="virtual/glibc + sys-apps/groff" + +src_unpack() { + + cd ${WORKDIR} + unpack ${P}.tar.gz + + cd ${S} + + echo "gcc ${CFLAGS}" > conf-cc + echo "gcc" > conf-ld + +} + +src_compile() { + + cd ${S} + + emake it || die +} + + + +src_install() { + + into /usr + dodoc BLURB CHANGES FILES INSTALL README SYSDEPS TARGETS THANKS + dodoc TODO VERSION + + insopts -o root -g qmail -m 755 + insinto /var/qmail/bin + doins dot-forward + + into /usr + for i in *.1 + do + doman $i + done + +} diff --git a/net-mail/dot-forward/files/digest-dot-forward-0.71 b/net-mail/dot-forward/files/digest-dot-forward-0.71 new file mode 100644 index 000000000000..cf6dbc6b3b0e --- /dev/null +++ b/net-mail/dot-forward/files/digest-dot-forward-0.71 @@ -0,0 +1 @@ +MD5 1fefd9760e4706491fb31c7511d69bed dot-forward-0.71.tar.gz 28672 diff --git a/net-mail/fastforward/fastforward-0.51.ebuild b/net-mail/fastforward/fastforward-0.51.ebuild new file mode 100644 index 000000000000..6dc3596b4dfb --- /dev/null +++ b/net-mail/fastforward/fastforward-0.51.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2001 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Geert Bevin <gbevin@theleaf.be> +# $Header: /var/cvsroot/gentoo-x86/net-mail/fastforward/fastforward-0.51.ebuild,v 1.1 2001/12/05 02:33:04 gbevin Exp $ + +S=${WORKDIR}/${P} +DESCRIPTION="Fastforward handles qmail forwarding according to a cdb database" +HOMEPAGE="http://cr.yp.to/fastforward.html" + +SRC_URI="http://cr.yp.to/software/fastforward-0.51.tar.gz" + +DEPEND="virtual/glibc + sys-apps/groff" + +src_unpack() { + + cd ${WORKDIR} + unpack ${P}.tar.gz + + cd ${S} + + echo "gcc ${CFLAGS}" > conf-cc + echo "gcc" > conf-ld + +} + +src_compile() { + + cd ${S} + + emake it || die +} + + + +src_install() { + + into /usr + dodoc ALIASES BLURB CHANGES FILES INSTALL README SYSDEPS TARGETS + dodoc THANKS TODO VERSION + + insopts -o root -g qmail -m 755 + insinto /var/qmail/bin + doins fastforward newaliases newinclude printforward printmaillist \ + setforward setmaillist + + into /usr + for i in *.1 + do + doman $i + done + +} diff --git a/net-mail/fastforward/files/digest-fastforward-0.51 b/net-mail/fastforward/files/digest-fastforward-0.51 new file mode 100644 index 000000000000..6e03baf1e5e9 --- /dev/null +++ b/net-mail/fastforward/files/digest-fastforward-0.51 @@ -0,0 +1 @@ +MD5 6dc619180ba9726380dc1047e45a1d8d fastforward-0.51.tar.gz 40960 diff --git a/net-mail/qmail/files/1.03-r5/dot_qmail b/net-mail/qmail/files/1.03-r5/dot_qmail new file mode 100644 index 000000000000..7c9e5d08f067 --- /dev/null +++ b/net-mail/qmail/files/1.03-r5/dot_qmail @@ -0,0 +1 @@ +./.maildir/ diff --git a/net-mail/qmail/files/1.03-r5/qmail-control b/net-mail/qmail/files/1.03-r5/qmail-control new file mode 100644 index 000000000000..8fbc60de593e --- /dev/null +++ b/net-mail/qmail/files/1.03-r5/qmail-control @@ -0,0 +1,27 @@ +#!/sbin/runscript + +opts="start stop restart reload" + +start() { + ebegin "Starting qmail mta ..." + svc -u /var/qmail/supervise/* + eend $? + ebegin "Starting qmail mta logging ..." + svc -u /var/qmail/supervise/*/log + eend $? +} + +stop() { + ebegin "Stopping qmail mta ..." + svc -d /var/qmail/supervise/* + eend $? + ebegin "Stopping qmail mta logging ..." + svc -d /var/qmail/supervise/*/log + eend $? +} + +reload() { + ebegin "Reloading 'locals' and 'virtualdomains' control files." + svc -h /var/qmail/supervise/qmail-send + eend $? +} diff --git a/net-mail/qmail/files/1.03-r5/qmail-linksync.patch b/net-mail/qmail/files/1.03-r5/qmail-linksync.patch new file mode 100644 index 000000000000..1b35f12aaa1f --- /dev/null +++ b/net-mail/qmail/files/1.03-r5/qmail-linksync.patch @@ -0,0 +1,54 @@ +--- ../qmail-1.03.orig/qmail-local.c Mon Jun 15 12:53:16 1998 ++++ qmail-local.c Sun Jul 16 16:19:04 2000 +@@ -1,5 +1,6 @@ + #include <sys/types.h> + #include <sys/stat.h> ++#include <fcntl.h> + #include "readwrite.h" + #include "sig.h" + #include "env.h" +@@ -128,6 +129,9 @@ + if (close(fd) == -1) goto fail; /* NFS dorks */ + + if (link(fntmptph,fnnewtph) == -1) goto fail; ++ if ((fd = open(fnnewtph, O_RDONLY)) < 0 || ++ fsync(fd) < 0 || close(fd) < 0) goto fail; ++ + /* if it was error_exist, almost certainly successful; i hate NFS */ + tryunlinktmp(); _exit(0); + +--- ../qmail-1.03.orig/qmail-queue.c Mon Jun 15 12:53:16 1998 ++++ qmail-queue.c Sun Jul 16 16:19:33 2000 +@@ -1,5 +1,6 @@ + #include <sys/types.h> + #include <sys/stat.h> ++#include <fcntl.h> + #include "readwrite.h" + #include "sig.h" + #include "exit.h" +@@ -155,6 +156,7 @@ + { + unsigned int len; + char ch; ++ int fd; + + sig_blocknone(); + umask(033); +@@ -183,7 +185,7 @@ + todofn = fnnum("todo/",0); + intdfn = fnnum("intd/",0); + +- if (link(pidfn,messfn) == -1) die(64); ++ if (link(pidfn,messfn) == -1) die(64); + if (unlink(pidfn) == -1) die(63); + flagmademess = 1; + +@@ -248,6 +250,8 @@ + if (fsync(intdfd) == -1) die_write(); + + if (link(intdfn,todofn) == -1) die(66); ++ if ((fd = open(todofn, O_RDONLY)) < 0 || ++ fsync(fd) < 0 || close(fd) < 0) die(66); + + triggerpull(); + die(0); diff --git a/net-mail/qmail/files/1.03-r5/rc b/net-mail/qmail/files/1.03-r5/rc new file mode 100644 index 000000000000..57fdec522803 --- /dev/null +++ b/net-mail/qmail/files/1.03-r5/rc @@ -0,0 +1,4 @@ +#!/bin/sh + +exec env - PATH="/var/qmail/bin:$PATH" \ + qmail-start '|dot-forward .forward ./.maildir/' diff --git a/net-mail/qmail/files/1.03-r5/run-qmailsend b/net-mail/qmail/files/1.03-r5/run-qmailsend new file mode 100644 index 000000000000..8dbd3adf524f --- /dev/null +++ b/net-mail/qmail/files/1.03-r5/run-qmailsend @@ -0,0 +1,2 @@ +#!/bin/sh +exec /var/qmail/rc diff --git a/net-mail/qmail/files/1.03-r5/run-qmailsendlog b/net-mail/qmail/files/1.03-r5/run-qmailsendlog new file mode 100644 index 000000000000..5ff50d1e7711 --- /dev/null +++ b/net-mail/qmail/files/1.03-r5/run-qmailsendlog @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/setuidgid qmaill /usr/bin/multilog t s2500000 /var/log/qmail/qmail-send diff --git a/net-mail/qmail/files/1.03-r5/run-qmailsmtpd b/net-mail/qmail/files/1.03-r5/run-qmailsmtpd new file mode 100644 index 000000000000..0d61202a7cf3 --- /dev/null +++ b/net-mail/qmail/files/1.03-r5/run-qmailsmtpd @@ -0,0 +1,6 @@ +#!/bin/sh +QMAILDUID=`id -u qmaild` +NOFILESGID=`id -g qmaild` +exec /usr/bin/softlimit -m 2000000 \ + /usr/bin/tcpserver -H -R -v -p -x /etc/tcp.smtp.cdb \ + -u $QMAILDUID -g $NOFILESGID 0 smtp rblsmtpd /var/qmail/bin/qmail-smtpd 2>&1 diff --git a/net-mail/qmail/files/1.03-r5/run-qmailsmtpdlog b/net-mail/qmail/files/1.03-r5/run-qmailsmtpdlog new file mode 100644 index 000000000000..2d9546146583 --- /dev/null +++ b/net-mail/qmail/files/1.03-r5/run-qmailsmtpdlog @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/setuidgid qmaill /usr/bin/multilog t s2500000 /var/log/qmail/qmail-smtpd diff --git a/net-mail/qmail/files/digest-qmail-1.03-r5 b/net-mail/qmail/files/digest-qmail-1.03-r5 new file mode 100644 index 000000000000..30aa583b5e7c --- /dev/null +++ b/net-mail/qmail/files/digest-qmail-1.03-r5 @@ -0,0 +1,4 @@ +MD5 2ff58c3570870a8ff9a1d9eb9aec05a6 big-concurrency.patch 12288 +MD5 39b6f70f65056472ff97ab40c1dba7b4 big-todo.103.patch 8192 +MD5 622f65f982e380dbe86e6574f3abcb7c qmail-1.03.tar.gz 221184 +MD5 ce787cadc234c17b1051eedaf04c7760 qmail-dns-patch 4096 diff --git a/net-mail/qmail/qmail-1.03-r5.ebuild b/net-mail/qmail/qmail-1.03-r5.ebuild new file mode 100644 index 000000000000..770985137b43 --- /dev/null +++ b/net-mail/qmail/qmail-1.03-r5.ebuild @@ -0,0 +1,255 @@ +# Copyright 1999-2001 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Geert Bevin <gbevin@theleaf.be> +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail/qmail-1.03-r5.ebuild,v 1.1 2001/12/05 02:33:04 gbevin Exp $ + +S=${WORKDIR}/${P} +DESCRIPTION="A modern replacement for sendmail which uses maildirs" +HOMEPAGE="http://www.qmail.org/ + http://www.jedi.claranet.fr/qmail-tuning.html + http://iain.cx/unix/qmail/mysql.php + http://www.nrg4u.com/" + +SRC_URI="http://cr.yp.to/software/qmail-1.03.tar.gz + http://www.qmail.org/big-todo.103.patch + http://www.qmail.org/big-concurrency.patch + http://www.flounder.net/qmail/qmail-dns-patch" + +DEPEND="virtual/glibc + sys-apps/groff + >=sys-apps/ucspi-tcp-0.88 + >=sys-apps/daemontools-0.76 + >=net-mail/checkpassword-0.90 + >=net-mail/fastforward-0.51 + >=net-mail/dot-forward-0.71" + +PROVIDE="virtual/mta" + +src_unpack() { + + cd ${WORKDIR} + unpack qmail-1.03.tar.gz + + cd ${S} + + echo "Applying dns patch..." + patch < ${DISTDIR}/qmail-dns-patch + + echo "Applying big-todo patch..." + patch < ${DISTDIR}/big-todo.103.patch + + echo "Applying big-concurrency patch..." + patch < ${DISTDIR}/big-concurrency.patch + + echo "Applying Ext2FS/ReiserFS patch..." + patch < ${FILESDIR}/${PV}-${PR}/qmail-linksync.patch + + echo "gcc ${CFLAGS}" > conf-cc + echo "gcc" > conf-ld + echo "500" > conf-spawn + +} + +src_compile() { + + cd ${S} + + emake it man || die +} + + + +src_install() { + + einfo "Setting up the required file hierarchy ..." + cd ${S} + diropts -m 755 -o root -g qmail + dodir /var/qmail + + for i in bin boot control users + do + dodir /var/qmail/$i + done + + diropts -m 755 -o alias -g qmail + dodir /var/qmail/alias + + diropts -m 750 -o qmailq -g qmail + dodir /var/qmail/queue + dodir /var/qmail/queue/todo + + diropts -m 700 -o qmailq -g qmail + dodir /var/qmail/queue/pid + + diropts -m0700 -o qmails -g qmail + dodir /var/qmail/queue/bounce + + diropts -m 750 -o qmailq -g qmail + dodir /var/qmail/queue/mess + + for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 + do + dodir /var/qmail/queue/mess/$i + dodir /var/qmail/queue/todo/$i + dodir /var/qmail/queue/intd/$i + done + + diropts -m 700 -o qmails -g qmail + for i in info local remote + do + dodir /var/qmail/queue/$i + done + + for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 + do + dodir /var/qmail/queue/info/$i + dodir /var/qmail/queue/local/$i + dodir /var/qmail/queue/remote/$i + done + + diropts -m 750 -o qmailq -g qmail + dodir /var/qmail/queue/lock + + dd if=/dev/zero of=${D}/var/qmail/queue/lock/tcpto bs=1024 count=1 + fperms 644 /var/qmail/queue/lock/tcpto + fowners qmailr.qmail /var/qmail/queue/lock/tcpto + + touch ${D}/var/qmail/queue/lock/sendmutex + fperms 600 /var/qmail/queue/lock/sendmutex + fowners qmails.qmail /var/qmail/queue/lock/sendmutex + + mkfifo ${D}/var/qmail/queue/lock/trigger + fperms 622 /var/qmail/queue/lock/trigger + fowners qmails.qmail /var/qmail/queue/lock/trigger + + einfo "Installing the qmail software ..." + insopts -o root -g qmail -m 755 + insinto /var/qmail/boot + doins home home+df proc proc+df binm1 binm1+df binm2 binm2+df binm3 binm3+df + + into /usr + dodoc FAQ UPGRADE SENDMAIL INSTALL* TEST* REMOVE* PIC* SECURITY + dodoc SYSDEPS TARGETS THANKS THOUGHTS TODO VERSION + + insopts -o qmailq -g qmail -m 4711 + insinto /var/qmail/bin + doins qmail-queue qmail-queue + + insopts -o root -g qmail -m 700 + insinto /var/qmail/bin + doins qmail-lspawn qmail-start qmail-newu qmail-newmrh + + insopts -o root -g qmail -m 711 + insinto /var/qmail/bin + doins qmail-getpw qmail-local qmail-remote qmail-rspawn \ + qmail-clean qmail-send splogger qmail-pw2u + + insopts -o root -g qmail -m 755 + insinto /var/qmail/bin + doins qmail-inject predate datemail mailsubj qmail-showctl \ + qmail-qread qmail-qstat qmail-tcpto qmail-tcpok qmail-pop3d \ + qmail-popup qmail-qmqpc qmail-qmqpd qmail-qmtpd qmail-smtpd \ + sendmail tcp-env qreceipt qsmhook qbiff forward preline \ + condredirect bouncesaying except maildirmake maildir2mbox \ + maildirwatch qail elq pinq config-fast + + into /usr + for i in *.1 *.5 *.8 + do + doman $i + done + + einfo "Creating sendmail replacement ..." + diropts -m 755 + dodir /usr/sbin /usr/lib + dosym /var/qmail/bin/sendmail /usr/sbin/sendmail + dosym /var/qmail/bin/sendmail /usr/lib/sendmail + + einfo "Setting up the default aliases ..." + diropts -m 700 -o alias -g qmail + if [ ! -d ${ROOT}/var/qmail/alias/.maildir ] ; then + dodir /var/qmail/alias/.maildir + for i in cur new tmp + do + dodir /var/qmail/alias/.maildir/$i + done + fi + + for i in mailer-daemon postmaster root + do + touch ${D}/var/qmail/alias/.qmail-${i} + fowners alias.qmail /var/qmail/alias/.qmail-${i} + done + + einfo "Setting up maildirs by default in the account skeleton ..." + diropts -m 755 -o root -g root + insinto /etc/skel + ${D}/var/qmail/bin/maildirmake ${D}/etc/skel/.maildir + newins ${FILESDIR}/${PV}-${PR}/dot_qmail .qmail + fperms 644 /etc/skel/.qmail + insinto /root + ${D}/var/qmail/bin/maildirmake ${D}/root/.maildir + newins ${FILESDIR}/${PV}-${PR}/dot_qmail .qmail + fperms 644 /root/.qmail + + einfo "Setting up daemontools ..." + insopts -o root -g root -m 755 + diropts -m 755 -o root -g root + dodir /service + dodir /var/qmail/supervise + dodir /var/qmail/supervise/qmail-send + dodir /var/qmail/supervise/qmail-send/log + dodir /var/qmail/supervise/qmail-smtpd + dodir /var/qmail/supervise/qmail-smtpd/log + chmod +t ${D}/var/qmail/supervise/qmail-send + chmod +t ${D}/var/qmail/supervise/qmail-smtpd + diropts -m 755 -o qmaill + dodir /var/log/qmail + dodir /var/log/qmail/qmail-send + dodir /var/log/qmail/qmail-smtpd + + insinto /var/qmail/supervise/qmail-send + newins ${FILESDIR}/${PV}-${PR}/run-qmailsend run + insinto /var/qmail/supervise/qmail-send/log + newins ${FILESDIR}/${PV}-${PR}/run-qmailsendlog run + insinto /var/qmail/supervise/qmail-smtpd + newins ${FILESDIR}/${PV}-${PR}/run-qmailsmtpd run + insinto /var/qmail/supervise/qmail-smtpd/log + newins ${FILESDIR}/${PV}-${PR}/run-qmailsmtpdlog run + dosym /var/qmail/supervise/qmail-send /service/qmail-send + dosym /var/qmail/supervise/qmail-smtpd /service/qmail-smtpd + + einfo "Installing the qmail control file ..." + exeinto /var/qmail/bin + doexe ${FILESDIR}/${PV}-${PR}/qmail-control + + einfo "Installing the qmail startup file ..." + insinto /var/qmail + doins ${FILESDIR}/${PV}-${PR}/rc + + echo -e "\033[1;42m\033[1;33m Please do not forget to run, the following syntax : \033[0m" + echo -e "\033[1;42m\033[1;33m ebuild /var/db/pkg/${CATEGORY}/${PN}-${PV}-${PR}/${PN}-${PV}-${PR}.ebuild config \033[0m" + echo -e "\033[1;42m\033[1;33m This will add the necessary post install config to your system. \033[0m" + +} + + +pkg_config() { + + export qhost=`hostname` + if [ ${ROOT} = "/" ] ; then + if [ ! -f ${ROOT}/var/qmail/control/me ] ; then + ${ROOT}/var/qmail/bin/config-fast $qhost + fi + fi + + echo "Accepting relaying by default from all ips configured on this machine." + LOCALIPS=`/sbin/ifconfig | grep inet | cut -d " " -f 12 -s | cut -b 6-20` + for ip in $LOCALIPS; do + echo "$ip:allow,RELAYCLIENT=\"\"" >> /etc/tcp.smtp + done + echo ":allow" >> /etc/tcp.smtp + + tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp + +} |