summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2003-08-11 07:35:20 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2003-08-11 07:35:20 +0000
commit958209a11bf3fd4d45cebb27d7ee88859a3bda13 (patch)
tree93e2628e6916d81bb7479c9f144dcba7e7ff3810 /net-mail/qmail
parentupdate following bug #26365 with possible fix (diff)
downloadhistorical-958209a11bf3fd4d45cebb27d7ee88859a3bda13.tar.gz
historical-958209a11bf3fd4d45cebb27d7ee88859a3bda13.tar.bz2
historical-958209a11bf3fd4d45cebb27d7ee88859a3bda13.zip
update following bug #26365 with possible fix
Diffstat (limited to 'net-mail/qmail')
-rw-r--r--net-mail/qmail/Manifest12
-rw-r--r--net-mail/qmail/files/1.03-r12/99qmail4
-rw-r--r--net-mail/qmail/files/1.03-r12/conf-common25
-rw-r--r--net-mail/qmail/files/1.03-r12/conf-qmqpd16
-rw-r--r--net-mail/qmail/files/1.03-r12/conf-qmtpd19
-rw-r--r--net-mail/qmail/files/1.03-r12/conf-smtpd27
-rw-r--r--net-mail/qmail/files/1.03-r12/dot_qmail2
-rw-r--r--net-mail/qmail/files/1.03-r12/errno.patch38
-rw-r--r--net-mail/qmail/files/1.03-r12/qmail-control30
-rw-r--r--net-mail/qmail/files/1.03-r12/rc4
-rw-r--r--net-mail/qmail/files/1.03-r12/run-qmailpop3d6
-rw-r--r--net-mail/qmail/files/1.03-r12/run-qmailpop3dlog2
-rw-r--r--net-mail/qmail/files/1.03-r12/run-qmailqmqpd17
-rw-r--r--net-mail/qmail/files/1.03-r12/run-qmailqmqpdlog2
-rw-r--r--net-mail/qmail/files/1.03-r12/run-qmailqmtpd17
-rw-r--r--net-mail/qmail/files/1.03-r12/run-qmailqmtpdlog2
-rw-r--r--net-mail/qmail/files/1.03-r12/run-qmailsend2
-rw-r--r--net-mail/qmail/files/1.03-r12/run-qmailsendlog2
-rw-r--r--net-mail/qmail/files/1.03-r12/run-qmailsmtpd17
-rw-r--r--net-mail/qmail/files/1.03-r12/run-qmailsmtpdlog2
-rw-r--r--net-mail/qmail/files/1.03-r12/smtp-auth-close3.patch20
-rw-r--r--net-mail/qmail/files/digest-qmail-1.03-r1212
-rw-r--r--net-mail/qmail/qmail-1.03-r12.ebuild333
23 files changed, 605 insertions, 6 deletions
diff --git a/net-mail/qmail/Manifest b/net-mail/qmail/Manifest
index 632b31869882..b6c039f3bc74 100644
--- a/net-mail/qmail/Manifest
+++ b/net-mail/qmail/Manifest
@@ -2,8 +2,8 @@ MD5 4bf70f21528928c670477f76bd375237 qmail-1.03-r11.ebuild 11431
MD5 3bdf6864e9399d20c8d786be23d7d34f qmail-1.03-r9.ebuild 9990
MD5 d1d239c08fb007430de3a84e0a5de524 qmail-1.03-r10.ebuild 11180
MD5 173fcf74cb0fb3fd6df5a3c842cd6d41 qmail-1.03-r8.ebuild 8142
-MD5 a2ba01c115d2f3043634727dc354c5e6 qmail-1.03-r12.ebuild 10612
-MD5 33677a21306d8fd1435655163e7731d8 ChangeLog 7481
+MD5 9fa3f6faf31d1a36ffae1166e1634068 qmail-1.03-r12.ebuild 10612
+MD5 da54a07f2cbf5466aa124bb29d4eda5f ChangeLog 7529
MD5 ff596e74b015e067a180fc78855aa87a metadata.xml 360
MD5 5897cb300c3233c91c7e221c8b4b8501 files/digest-qmail-1.03-r8 245
MD5 48a1e168db29ab4e6c57f1ac135ee2bf files/digest-qmail-1.03-r9 323
@@ -79,11 +79,11 @@ MD5 249138d56492deb0f856849bc002e46a files/1.03-r12/run-qmailqmqpdlog 97
MD5 795f633858c0919b6e201cf2b845779e files/1.03-r12/run-qmailqmtpdlog 97
MD5 b24f4dbd450d2d4eddc75ba19cebb915 files/1.03-r12/dot_qmail 34
MD5 f43900d79a0aacb5e0d71b0bb6c06fea files/1.03-r12/run-qmailsmtpdlog 97
-MD5 7f5c5cca4dc2919c28147ddc9ab5f758 files/1.03-r12/conf-qmqpd 482
-MD5 981e6ffcf382b11a313d6f598c5f18d2 files/1.03-r12/conf-qmtpd 574
+MD5 d681d112e063797dbc0c0308430b25ee files/1.03-r12/conf-qmqpd 482
+MD5 f3225c7d82abd16d5f4c4fa7e40aa3d4 files/1.03-r12/conf-qmtpd 574
MD5 41b856bb1938974f4fd9c9320706e832 files/1.03-r12/conf-smtpd 1054
MD5 834dad5113515d0f00981fdc1d07fa84 files/1.03-r12/run-qmailsendlog 96
-MD5 76af15d5058316eee26c7dd8e53d7acf files/1.03-r12/qmail-control 858
-MD5 c4dfed6db3b0b96b84bc7eb6c22aec08 files/1.03-r12/conf-common 836
+MD5 fc7391f02934a9c75a92dce36229d590 files/1.03-r12/qmail-control 858
+MD5 fdb3ebabfa3e830c405f72f945819c83 files/1.03-r12/conf-common 836
MD5 23a2babf3049fe012de21c17e550b3e5 files/1.03-r12/run-qmailsend 29
MD5 0e97c0b031776f40cacdfbf3114af574 files/1.03-r12/run-qmailpop3dlog 97
diff --git a/net-mail/qmail/files/1.03-r12/99qmail b/net-mail/qmail/files/1.03-r12/99qmail
new file mode 100644
index 000000000000..d9d929e4892b
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/99qmail
@@ -0,0 +1,4 @@
+PATH="/var/qmail/bin"
+ROOTPATH="/var/qmail/bin"
+CONFIG_PROTECT="/var/qmail/control /var/qmail/alias"
+QMAIL_CONTROLDIR=/var/qmail/control
diff --git a/net-mail/qmail/files/1.03-r12/conf-common b/net-mail/qmail/files/1.03-r12/conf-common
new file mode 100644
index 000000000000..6276c86272b0
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/conf-common
@@ -0,0 +1,25 @@
+#!/bin/sh
+# Configuration file for all qmail daemons
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail/files/1.03-r12/conf-common,v 1.1 2003/08/11 07:35:15 robbat2 Exp $
+
+# Qmail User IDS to run daemons as
+QMAILDUID=`id -u qmaild`
+NOFILESGID=`id -g qmaild`
+
+# Qmail Control Dir (this is actually set in /etc/env.d/99qmail
+#QMAIL_CONTROLDIR=/var/qmail/control
+
+# Host and port to listen on
+# We listen on the IPv4 local ip by default
+TCPSERVER_HOST=0.0.0.0
+TCPSERVER_PORT=${SERVICE}
+
+# tcpserver maximum concurrency, defaults to 40 in tcpserver
+[ -e ${QMAIL_CONTROLDIR}/concurrencyincoming ] && MAXCONN=$(<${QMAIL_CONTROLDIR}/concurrencyincoming) || MAXCONN=40
+
+# A quick sanity check
+if [ -z "${QMAILDUID}" -o -z "${NOFILESGID}" -o -z "${SERVICE}" ]; then
+ echo SERVICE, QMAILDUID or NOFILESGID is unset in
+ echo $0
+ exit 1
+fi
diff --git a/net-mail/qmail/files/1.03-r12/conf-qmqpd b/net-mail/qmail/files/1.03-r12/conf-qmqpd
new file mode 100644
index 000000000000..1e61ffbd4cf2
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/conf-qmqpd
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Configuration file for qmail-qmqpd
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail/files/1.03-r12/conf-qmqpd,v 1.1 2003/08/11 07:35:15 robbat2 Exp $
+
+# Stuff to run before tcpserver
+QMAIL_TCPSERVER_PRE=""
+# Stuff to run qmail-qmqpd
+QMAIL_QMQP_PRE=""
+# Stuff to after qmail-qmqpd
+QMAIL_QMQP_POST=""
+
+# We don't have anything to set QMAILQUEUE to at the moment, so we leave it alone
+#QMAILQUEUE=""
+
+# I don't trust /etc/services to have everything...
+TCPSERVER_PORT=628
diff --git a/net-mail/qmail/files/1.03-r12/conf-qmtpd b/net-mail/qmail/files/1.03-r12/conf-qmtpd
new file mode 100644
index 000000000000..8822636baa96
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/conf-qmtpd
@@ -0,0 +1,19 @@
+#!/bin/sh
+# Configuration file for qmail-qmtpd
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail/files/1.03-r12/conf-qmtpd,v 1.1 2003/08/11 07:35:15 robbat2 Exp $
+
+# For more information on making your servers talk QMTP
+# see http://cr.yp.to/im/mxps.html
+
+# Stuff to run before tcpserver
+QMAIL_TCPSERVER_PRE=""
+# Stuff to run qmail-qmtpd
+QMAIL_QMTP_PRE=""
+# Stuff to after qmail-qmtpd
+QMAIL_QMTP_POST=""
+
+# We don't have anything to set QMAILQUEUE to at the moment, so we leave it alone
+#QMAILQUEUE=""
+
+# I don't trust /etc/services to have everything...
+TCPSERVER_PORT=209
diff --git a/net-mail/qmail/files/1.03-r12/conf-smtpd b/net-mail/qmail/files/1.03-r12/conf-smtpd
new file mode 100644
index 000000000000..87c878f9c884
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/conf-smtpd
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# Stuff to run before tcpserver
+QMAIL_TCPSERVER_PRE=""
+# Stuff to run qmail-smtpd
+QMAIL_SMTP_PRE=""
+# Stuff to after qmail-smtpd
+QMAIL_SMTP_POST=""
+
+# You might want to use rblsmtpd with this, but you need to fill in a RBL server here first
+# see http://cr.yp.to/ucspi-tcp/rblsmtpd.html for more details
+#QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} rblsmtpd -r RBL-SERVER"
+
+# If you are interested in providing limited relaying, emerge relay-ctrl, then uncomment the next 2 lines
+#QMAIL_TCPSERVER_PRE="${QMAIL_TCPSERVER_PRE} envdir /etc/relay-ctrl relay-ctrl-chdir"
+#QMAIL_SMTP_POST="${QMAIL_SMTP_POST} relay-ctrl-check"
+# In /etc/courier-imap/authdaemonrc add the next line to the end:
+#authmodulelist="${authmodulelist} relay-ctrl-allow"
+# Then in /etc/courier-imap/{imapd,imapd-ssl,pop3d,pop3d-ssl}
+# Add this at the end
+#PRERUN="${PRERUN} envdir /etc/relay-ctrl relay-ctrl-chdir"
+
+# We don't have anything to set QMAILQUEUE to at the moment, so we leave it alone
+#QMAILQUEUE=""
+
+# I don't trust /etc/services to have everything...
+TCPSERVER_PORT=25
diff --git a/net-mail/qmail/files/1.03-r12/dot_qmail b/net-mail/qmail/files/1.03-r12/dot_qmail
new file mode 100644
index 000000000000..d0ef7de8b590
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/dot_qmail
@@ -0,0 +1,2 @@
+|dot-forward .forward
+./.maildir/
diff --git a/net-mail/qmail/files/1.03-r12/errno.patch b/net-mail/qmail/files/1.03-r12/errno.patch
new file mode 100644
index 000000000000..f9b77b91e065
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/errno.patch
@@ -0,0 +1,38 @@
+% diff -u3 error.h.orig error.h
+--- error.h.orig 1998-06-15 06:53:16.000000000 -0400
++++ error.h 2002-12-24 20:28:40.000000000 -0500
+@@ -1,7 +1,7 @@
+ #ifndef ERROR_H
+ #define ERROR_H
+
+-extern int errno;
++#include <errno.h>
+
+ extern int error_intr;
+ extern int error_nomem;
+
+
+% diff -u3 dns.c.orig dns.c
+--- dns.c.orig 2002-08-09 19:20:48.000000000 -0400
++++ dns.c 2002-12-24 20:42:46.000000000 -0500
+@@ -7,8 +7,6 @@
+ #include <errno.h>
+ extern int res_query();
+ extern int res_search();
+-extern int errno;
+-extern int h_errno;
+ #include "ip.h"
+ #include "ipalloc.h"
+ #include "fmt.h"
+
+
+% diff -u3 cdb_seek.c.orig cdb_seek.c
+--- cdb_seek.c.orig 1998-06-15 06:53:16.000000000 -0400
++++ cdb_seek.c 2002-12-24 20:42:52.000000000 -0500
+@@ -1,6 +1,5 @@
+ #include <sys/types.h>
+ #include <errno.h>
+-extern int errno;
+ #include "cdb.h"
+
+ #ifndef SEEK_SET
diff --git a/net-mail/qmail/files/1.03-r12/qmail-control b/net-mail/qmail/files/1.03-r12/qmail-control
new file mode 100644
index 000000000000..dcbd86bf6729
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/qmail-control
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail/files/1.03-r12/qmail-control,v 1.1 2003/08/11 07:35:15 robbat2 Exp $
+
+opts="start stop restart reload"
+
+start() {
+ ebegin "Starting qmail mta ..."
+ svc -u /service/qmail-{smtpd,send,qmqp,qmtp}
+ eend $?
+ ebegin "Starting qmail mta logging ..."
+ svc -u /service/qmail-{smtpd,send,qmqp,qmtp}/log
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping qmail mta ..."
+ svc -d /service/qmail-{smtpd,send,qmqp,qmtp}
+ eend $?
+ ebegin "Stopping qmail mta logging ..."
+ svc -d /service/qmail-{smtpd,send,qmqp,qmtp}/log
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading 'locals' and 'virtualdomains' control files."
+ svc -h /service/qmail-send
+ eend $?
+}
diff --git a/net-mail/qmail/files/1.03-r12/rc b/net-mail/qmail/files/1.03-r12/rc
new file mode 100644
index 000000000000..a7bbdc986766
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/rc
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+exec env - PATH="/var/qmail/bin:$PATH" \
+ qmail-start "`cat /var/qmail/control/defaultdelivery`"
diff --git a/net-mail/qmail/files/1.03-r12/run-qmailpop3d b/net-mail/qmail/files/1.03-r12/run-qmailpop3d
new file mode 100644
index 000000000000..174d47ad310f
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/run-qmailpop3d
@@ -0,0 +1,6 @@
+#!/bin/sh
+exec /usr/bin/softlimit -m 2000000 \
+ /usr/bin/tcpserver -v -p -x /etc/tcp.smtp.cdb \
+ 0 pop-3 /var/qmail/bin/qmail-popup `hostname --fqdn`
+ /bin/checkpassword /var/qmail/bin/qmail-pop3d .maildir 2>&1
+
diff --git a/net-mail/qmail/files/1.03-r12/run-qmailpop3dlog b/net-mail/qmail/files/1.03-r12/run-qmailpop3dlog
new file mode 100644
index 000000000000..b1fcb8f4af22
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/run-qmailpop3dlog
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/setuidgid qmaill /usr/bin/multilog t s2500000 /var/log/qmail/qmail-pop3d
diff --git a/net-mail/qmail/files/1.03-r12/run-qmailqmqpd b/net-mail/qmail/files/1.03-r12/run-qmailqmqpd
new file mode 100644
index 000000000000..e936de18973a
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/run-qmailqmqpd
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# This is to make life easier
+SERVICE=qmqp
+
+# We run this afterwards to allow appending of values etc.
+[ -s ${QMAIL_CONTROLDIR}/conf-common ] && source ${QMAIL_CONTROLDIR}/conf-common
+[ -s ${QMAIL_CONTROLDIR}/conf-${SERVICE}d ] && source ${QMAIL_CONTROLDIR}/conf-${SERVICE}d
+
+# Now run it all
+exec /usr/bin/softlimit -m 8000000 \
+ ${QMAIL_TCPSERVER_PRE} \
+ /usr/bin/tcpserver -H -R -v -x /etc/tcp.${SERVICE}.cdb -c ${MAXCONN} \
+ -u ${QMAILDUID} -g ${NOFILESGID} \
+ ${TCPSERVER_HOST} ${TCPSERVER_PORT} \
+ ${QMAIL_QMQP_PRE} /var/qmail/bin/qmail-${SERVICE}d ${QMAIL_QMQP_POST} \
+ 2>&1
diff --git a/net-mail/qmail/files/1.03-r12/run-qmailqmqpdlog b/net-mail/qmail/files/1.03-r12/run-qmailqmqpdlog
new file mode 100644
index 000000000000..d759fbcbcfe1
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/run-qmailqmqpdlog
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/setuidgid qmaill /usr/bin/multilog t s2500000 /var/log/qmail/qmail-qmqpd
diff --git a/net-mail/qmail/files/1.03-r12/run-qmailqmtpd b/net-mail/qmail/files/1.03-r12/run-qmailqmtpd
new file mode 100644
index 000000000000..d22c977593f0
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/run-qmailqmtpd
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# This is to make life easier
+SERVICE=qmtp
+
+# We run this afterwards to allow appending of values etc.
+[ -s ${QMAIL_CONTROLDIR}/conf-common ] && source ${QMAIL_CONTROLDIR}/conf-common
+[ -s ${QMAIL_CONTROLDIR}/conf-${SERVICE}d ] && source ${QMAIL_CONTROLDIR}/conf-${SERVICE}d
+
+# Now run it all
+exec /usr/bin/softlimit -m 8000000 \
+ ${QMAIL_TCPSERVER_PRE} \
+ /usr/bin/tcpserver -H -R -v -x /etc/tcp.${SERVICE}.cdb -c ${MAXCONN} \
+ -u ${QMAILDUID} -g ${NOFILESGID} \
+ ${TCPSERVER_HOST} ${TCPSERVER_PORT} \
+ ${QMAIL_QMTP_PRE} /var/qmail/bin/qmail-${SERVICE}d ${QMAIL_QMTP_POST} \
+ 2>&1
diff --git a/net-mail/qmail/files/1.03-r12/run-qmailqmtpdlog b/net-mail/qmail/files/1.03-r12/run-qmailqmtpdlog
new file mode 100644
index 000000000000..413a217d7de6
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/run-qmailqmtpdlog
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/setuidgid qmaill /usr/bin/multilog t s2500000 /var/log/qmail/qmail-qmtpd
diff --git a/net-mail/qmail/files/1.03-r12/run-qmailsend b/net-mail/qmail/files/1.03-r12/run-qmailsend
new file mode 100644
index 000000000000..8dbd3adf524f
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/run-qmailsend
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /var/qmail/rc
diff --git a/net-mail/qmail/files/1.03-r12/run-qmailsendlog b/net-mail/qmail/files/1.03-r12/run-qmailsendlog
new file mode 100644
index 000000000000..5ff50d1e7711
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/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-r12/run-qmailsmtpd b/net-mail/qmail/files/1.03-r12/run-qmailsmtpd
new file mode 100644
index 000000000000..8ee797b566fb
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/run-qmailsmtpd
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# This is to make life easier
+SERVICE=smtp
+
+# We run this afterwards to allow appending of values etc.
+[ -s ${QMAIL_CONTROLDIR}/conf-common ] && source ${QMAIL_CONTROLDIR}/conf-common
+[ -s ${QMAIL_CONTROLDIR}/conf-${SERVICE}d ] && source ${QMAIL_CONTROLDIR}/conf-${SERVICE}d
+
+# Now run it all
+exec /usr/bin/softlimit -m 8000000 \
+ ${QMAIL_TCPSERVER_PRE} \
+ /usr/bin/tcpserver -H -R -v -x /etc/tcp.${SERVICE}.cdb -c ${MAXCONN} \
+ -u ${QMAILDUID} -g ${NOFILESGID} \
+ ${TCPSERVER_HOST} ${TCPSERVER_PORT} \
+ ${QMAIL_SMTP_PRE} /var/qmail/bin/qmail-${SERVICE}d ${QMAIL_SMTP_POST} \
+ 2>&1
diff --git a/net-mail/qmail/files/1.03-r12/run-qmailsmtpdlog b/net-mail/qmail/files/1.03-r12/run-qmailsmtpdlog
new file mode 100644
index 000000000000..2d9546146583
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/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/1.03-r12/smtp-auth-close3.patch b/net-mail/qmail/files/1.03-r12/smtp-auth-close3.patch
new file mode 100644
index 000000000000..82fda701fd12
--- /dev/null
+++ b/net-mail/qmail/files/1.03-r12/smtp-auth-close3.patch
@@ -0,0 +1,20 @@
+--- qmail-smtpd.c.orig Sat Jan 18 09:13:50 2003
++++ qmail-smtpd.c Sat Jan 18 19:51:09 2003
+@@ -459,14 +459,14 @@
+ if (!stralloc_0(&resp)) die_nomem();
+
+ if (fd_copy(2,1) == -1) return err_pipe();
+- close(3);
+ if (pipe(pi) == -1) return err_pipe();
+- if (pi[0] != 3) return err_pipe();
+ switch(child = fork()) {
+ case -1:
+ return err_fork();
+ case 0:
+ close(pi[1]);
++ close(3);
++ if (0 > dup2(pi[0],3)) _exit(1);
+ sig_pipedefault();
+ execvp(*childargs, childargs);
+ _exit(1);
+
diff --git a/net-mail/qmail/files/digest-qmail-1.03-r12 b/net-mail/qmail/files/digest-qmail-1.03-r12
new file mode 100644
index 000000000000..b1db88921e23
--- /dev/null
+++ b/net-mail/qmail/files/digest-qmail-1.03-r12
@@ -0,0 +1,12 @@
+MD5 622f65f982e380dbe86e6574f3abcb7c qmail-1.03.tar.gz 220668
+MD5 6b202f71a99fb41e9e32906017270ba0 qmail-smtpd-auth-0.31.tar.gz 8798
+MD5 5a8d7a5863b0c56236af945dedd45754 qmailqueue-patch 2510
+MD5 39b6f70f65056472ff97ab40c1dba7b4 big-todo.103.patch 5546
+MD5 1d5b0aafb651ce2ad02aac6af80758c0 qmail-link-sync.patch 1403
+MD5 2ff58c3570870a8ff9a1d9eb9aec05a6 big-concurrency.patch 9331
+MD5 8edda59102180973dd1bb546da7de160 qmail-0.0.0.0.patch 450
+MD5 4e1f2d8315e7e2a5482798c9d19fac4d sendmail-flagf.patch 863
+MD5 3dc69265a561c7d82ba3e43e89828722 qmail-tls.patch.tbz2 14076
+MD5 122664c38338e5ec35fcac43f33d6927 qmail-1.03-qmtpc.patch 6197
+MD5 24fc1a33089faf12e00b127cd659f317 qmail-smtpd-relay-reject 1230
+MD5 ed5c0ddb6a5cc0386b1e04ced71d26ad qmail-local-tabs.patch 505
diff --git a/net-mail/qmail/qmail-1.03-r12.ebuild b/net-mail/qmail/qmail-1.03-r12.ebuild
new file mode 100644
index 000000000000..f95503f3d37a
--- /dev/null
+++ b/net-mail/qmail/qmail-1.03-r12.ebuild
@@ -0,0 +1,333 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail/qmail-1.03-r12.ebuild,v 1.1 2003/08/11 07:35:15 robbat2 Exp $
+
+inherit eutils
+
+IUSE="ssl"
+DESCRIPTION="A modern replacement for sendmail which uses maildirs and includes SSL/TLS, AUTH SMTP, and queue optimization"
+HOMEPAGE="http://www.qmail.org/
+ http://members.elysium.pl/brush/qmail-smtpd-auth/
+ http://www.jedi.claranet.fr/qmail-tuning.html"
+SRC_URI="mirror://qmail/qmail-1.03.tar.gz
+ http://members.elysium.pl/brush/qmail-smtpd-auth/dist/qmail-smtpd-auth-0.31.tar.gz
+ mirror://qmail/qmailqueue-patch
+ http://qmail.null.dk/big-todo.103.patch
+ http://www.jedi.claranet.fr/qmail-link-sync.patch
+ mirror://qmail/big-concurrency.patch
+ http://www.suspectclass.com/~sgifford/qmail/qmail-0.0.0.0.patch
+ http://david.acz.org/software/sendmail-flagf.patch
+ mirror://gentoo/qmail-tls.patch.tbz2
+ mirror://qmail/qmail-1.03-qmtpc.patch
+ http://qmail.goof.com/qmail-smtpd-relay-reject
+ mirror://gentoo/qmail-local-tabs.patch"
+
+SLOT="0"
+LICENSE="as-is"
+KEYWORDS="~x86 ~ppc ~sparc ~alpha"
+DEPEND="virtual/glibc
+ sys-apps/groff
+ ssl? ( >=dev-libs/openssl-0.9.6g )
+ >=net-mail/queue-fix-1.4-r1"
+
+RDEPEND="!virtual/mta
+ virtual/glibc
+ >=sys-apps/ucspi-tcp-0.88
+ >=sys-apps/daemontools-0.76-r1
+ >=net-mail/checkpassword-0.90
+ >=net-mail/cmd5checkpw-0.22
+ >=net-mail/dot-forward-0.71
+ >=net-mail/queue-fix-1.4-r1"
+
+PROVIDE="virtual/mta
+ virtual/mda"
+
+S=${WORKDIR}/${P}
+
+src_unpack() {
+
+ # This makes life easy
+ EPATCH_OPTS="-d ${S}"
+
+ # unpack the initial stuff
+ unpack ${P}.tar.gz qmail-tls.patch.tbz2 qmail-smtpd-auth-0.31.tar.gz
+
+ # SMTP AUTH
+ cp ${WORKDIR}/qmail-smtpd-auth-0.31/{README.auth,base64.c,base64.h} ${S}
+
+ EPATCH_SINGLE_MSG="Adding SMTP AUTH support" \
+ epatch qmail-smtpd-auth-0.31/auth.patch
+
+ # Fixes a problem when utilizing "morercpthosts"
+ epatch ${FILESDIR}/${PV}-${PR}/smtp-auth-close3.patch
+
+ # TLS support and an EHLO patch
+ if use ssl
+ then
+ #bzcat ${WORKDIR}/tls.patch.bz2 | patch -p1 &>/dev/null || die
+ ebegin "Adding TLS support"
+ bzcat ${WORKDIR}/tls.patch.bz2 | patch -p1 -d ${S} &>/dev/null || die
+ eend $?
+ fi
+
+ # patch so an alternate queue processor can be used
+ # i.e. - qmail-scanner
+ EPATCH_SINGLE_MSG="Adding QMAILQUEUE support" \
+ epatch ${DISTDIR}/qmailqueue-patch
+
+ # a patch for faster queue processing
+ EPATCH_SINGLE_MSG="Patching for large queues" \
+ epatch ${DISTDIR}/big-todo.103.patch
+
+ # Support for remote hosts that have QMTP
+ EPATCH_SINGLE_MSG="Adding support for remote QMTP hosts" \
+ epatch ${DISTDIR}/qmail-1.03-qmtpc.patch
+
+ # Fix for tabs in .qmail bug noted at
+ # http://www.ornl.gov/its/archives/mailing-lists/qmail/2000/10/msg00696.html
+ # gentoo bug #24293
+ epatch ${DISTDIR}/qmail-local-tabs.patch
+
+ # Account for Linux filesystems lack of a synchronus link()
+ epatch ${DISTDIR}/qmail-link-sync.patch
+
+ # Increase limits for large mail systems
+ epatch ${DISTDIR}/big-concurrency.patch
+
+ # Treat 0.0.0.0 as a local address
+ epatch ${DISTDIR}/qmail-0.0.0.0.patch
+
+ # Let the system decide how to define errno
+ epatch ${FILESDIR}/${PV}-${PR}/errno.patch
+
+ # make the qmail 'sendmail' binary behave like sendmail's for -f
+ epatch ${DISTDIR}/sendmail-flagf.patch
+
+ # Reject some bad relaying attempts
+ # gentoo bug #18064
+ epatch ${DISTDIR}/qmail-smtpd-relay-reject
+
+ cd ${S}
+
+ if [ `use ssl` ]; then
+ echo "${CC} ${CFLAGS} -DTLS" > conf-cc
+ else
+ echo "${CC} ${CFLAGS}" > conf-cc
+ fi
+
+ echo "${CC} ${LDFLAGS}" > conf-ld
+ echo "500" > conf-spawn
+
+}
+
+src_compile() {
+ cd ${S}
+ emake it man || die
+}
+
+src_install() {
+
+ cd ${S}
+
+ einfo "Setting up directory hierarchy ..."
+
+ diropts -m 755 -o root -g qmail
+ dodir /var/qmail
+
+ for i in bin boot control
+ do
+ dodir /var/qmail/${i}
+ done
+
+ keepdir /var/qmail/users
+
+ diropts -m 755 -o alias -g qmail
+ dodir /var/qmail/alias
+
+ 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
+
+ dodoc FAQ UPGRADE SENDMAIL INSTALL* TEST* REMOVE* PIC* SECURITY
+ dodoc SYSDEPS TARGETS THANKS THOUGHTS TODO VERSION
+ dodoc ${WORKDIR}/tls-patch.txt
+
+ 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
+ einfo "Installing manpages"
+ doman *.1 *.5 *.8
+
+ # use the correct maildirmake
+ # the courier-imap one has some extensions that are nicer
+ [ -e /usr/bin/maildirmake ] && MAILDIRMAKE="/usr/bin/maildirmake" || MAILDIRMAKE="${D}/var/qmail/bin/maildirmake"
+
+ einfo "Adding env.d entry for qmail"
+ dodir /etc/env.d
+ insinto /etc/env.d
+ doins ${FILESDIR}/${PV}-${PR}/99qmail
+
+ 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
+ ${MAILDIRMAKE} ${D}/var/qmail/alias/.maildir
+ # for good measure
+ keepdir /var/qmail/alias/.maildir/{cur,new,tmp}
+
+ for i in mailer-daemon postmaster root
+ do
+ if [ ! -f ${ROOT}/var/qmail/alias/.qmail-${i} ]; then
+ touch ${D}/var/qmail/alias/.qmail-${i}
+ fowners alias.qmail /var/qmail/alias/.qmail-${i}
+ fi
+ done
+
+ einfo "Setting up maildirs by default in the account skeleton ..."
+ diropts -m 755 -o root -g root
+ insinto /etc/skel
+ ${MAILDIRMAKE} ${D}/etc/skel/.maildir
+ newins ${FILESDIR}/${PV}-${PR}/dot_qmail .qmail
+ fperms 644 /etc/skel/.qmail
+ # for good measure
+ keepdir /etc/skel/.maildir/{cur,new,tmp} /root/.maildir/{cur,new,tmp}
+
+ einfo "Setting up all services (send, smtp, qmtp, qmqp, pop3) ..."
+ insopts -o root -g root -m 755
+ diropts -m 755 -o root -g root
+ dodir /var/qmail/supervise
+
+ for i in send smtpd qmtpd qmqpd pop3d; do
+ insopts -o root -g root -m 755
+ diropts -m 755 -o root -g root
+ dodir /var/qmail/supervise/qmail-${i}{,/log}
+ diropts -m 755 -o qmaill
+ keepdir /var/log/qmail/qmail-${i}
+ fperms +t /var/qmail/supervise/qmail-${i}{,/log}
+ insinto /var/qmail/supervise/qmail-${i}
+ newins ${FILESDIR}/${PV}-${PR}/run-qmail${i} run
+ insinto /var/qmail/supervise/qmail-${i}/log
+ newins ${FILESDIR}/${PV}-${PR}/run-qmail${i}log run
+ done
+
+ 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
+
+ einfo "Insalling some stock configuration files"
+ insinto /var/qmail/control
+ doins ${FILESDIR}/${PV}-${PR}/conf-*
+ newins ${FILESDIR}/${PV}-${PR}/dot_qmail defaultdelivery
+}
+
+pkg_postinst() {
+
+ einfo "Setting up the message queue hierarchy ..."
+ # queue-fix makes life easy!
+ /var/qmail/bin/queue-fix /var/qmail/queue >/dev/null
+
+ # use the correct maildirmake
+ # the courier-imap one has some extensions that are nicer
+ [ -e /usr/bin/maildirmake ] && MAILDIRMAKE="/usr/bin/maildirmake" || MAILDIRMAKE="${D}/var/qmail/bin/maildirmake"
+
+ # make sure root can get some mail
+ [ ! -d /root/.maildir ] && ${MAILDIRMAKE} /root/.maildir
+ [ ! -e /root/.qmail ] && cp ${FILESDIR}/${PV}-${PR}/dot_qmail /root/.qmail
+ [ -e /root/.qmail ] && chmod 644 /root/.qmail
+
+ # for good measure
+ env-update
+
+ einfo "Please do not forget to run, the following syntax :"
+ einfo "ebuild /var/db/pkg/${CATEGORY}/${PN}-${PV}-${PR}/${PN}-${PV}-${PR}.ebuild config"
+ einfo "This will setup qmail to run out-of-the-box on your system."
+ echo
+ einfo "To start qmail at boot you have to enable the /etc/init.d/svscan rc file"
+ einfo "and create the following links :"
+ einfo "ln -s /var/qmail/supervise/qmail-send /service/qmail-send"
+ einfo "ln -s /var/qmail/supervise/qmail-smtpd /service/qmail-smtpd"
+ echo
+ einfo "To start the pop3 server as well, create the following link :"
+ einfo "ln -s /var/qmail/supervise/qmail-pop3d /service/qmail-pop3d"
+ echo
+ einfo "Additionally, the QMTP and QMQP protocols are supported, and can be started as:"
+ einfo "ln -s /var/qmail/supervise/qmail-qmtpd /service/qmail-qmtpd"
+ einfo "ln -s /var/qmail/supervise/qmail-qmqpd /service/qmail-qmqpd"
+ echo
+ einfo "Additionally, if you wish to run qmail right now, you should run:"
+ einfo "source /etc/profile"
+}
+
+pkg_config() {
+
+ export qhost=`hostname --fqdn`
+ if [ ${ROOT} = "/" ] ; then
+ if [ ! -f ${ROOT}/var/qmail/control/me ] ; then
+ ${ROOT}/var/qmail/bin/config-fast $qhost
+ fi
+ fi
+
+ einfo "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=\"\",RBLSMTPD=\"\"" >> /etc/tcp.smtp
+ echo "$ip:allow,RELAYCLIENT=\"\"" >> /etc/tcp.qmtp
+ echo "$ip:allow,RELAYCLIENT=\"\"" >> /etc/tcp.qmqp
+ done
+ echo ":allow" >> /etc/tcp.smtp
+ echo ":allow" >> /etc/tcp.qmtp
+ echo ":deny" >> /etc/tcp.qmqp
+
+ for i in smtp qmtp qmqp; do
+ tcprules /etc/tcp.${i}.cdb /etc/tcp.${i}.tmp < /etc/tcp.${i}
+ done
+
+ if [ `use ssl` ]; then
+ if [ ! -f /var/qmail/control/servercert.pem ]; then
+ echo "Creating a self-signed ssl-cert:"
+ /usr/bin/openssl req -new -x509 -nodes -out /var/qmail/control/servercert.pem -days 366 -keyout /var/qmail/control/servercert.pem
+ chmod 640 /var/qmail/control/servercert.pem
+ chown qmaild.qmail /var/qmail/control/servercert.pem
+ ln -s /var/qmail/control/servercert.pem /var/qmail/control/clientcert.pem
+
+ einfo "If You want to have a signed cert, do the following:"
+ einfo "openssl req -new -nodes -out req.pem \\"
+ einfo "-keyout /var/qmail/control/servercert.pem"
+ einfo "chmod 640 /var/qmail/control/servercert.pem"
+ einfo "chown qmaild.qmail /var/qmail/control/servercert.pem"
+ einfo "ln -s /var/qmail/control/servercert.pem /var/qmail/control/clientcert.pem"
+ einfo "Send req.pem to your CA to obtain signed_req.pem, and do:"
+ einfo "cat signed_req.pem >> /var/qmail/control/servercert.pem"
+ fi
+ fi
+}