diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2003-08-05 11:46:18 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2003-08-05 11:46:18 +0000 |
commit | 3f5fe4bfe1e873e4e8dbbb7eb7b18ad473f21fbc (patch) | |
tree | fb82fdbba167ee3451ab14fd24d45f9d972cdb45 /net-mail/qmail | |
parent | major update (diff) | |
download | historical-3f5fe4bfe1e873e4e8dbbb7eb7b18ad473f21fbc.tar.gz historical-3f5fe4bfe1e873e4e8dbbb7eb7b18ad473f21fbc.tar.bz2 historical-3f5fe4bfe1e873e4e8dbbb7eb7b18ad473f21fbc.zip |
major update
Diffstat (limited to 'net-mail/qmail')
25 files changed, 614 insertions, 8 deletions
diff --git a/net-mail/qmail/Manifest b/net-mail/qmail/Manifest index 9c4eab9dc2c0..6f6528a82d2f 100644 --- a/net-mail/qmail/Manifest +++ b/net-mail/qmail/Manifest @@ -1,9 +1,9 @@ -MD5 ad8ff84774d0d7363a010ee2f4c4933c qmail-1.03-r11.ebuild 10874 +MD5 cb137de4b67f6ab3fc6959057664396d qmail-1.03-r11.ebuild 10970 MD5 30ae1187a48ebe4c70c38c08c5706d76 qmail-1.03-r9.ebuild 9991 MD5 2d5e1e44905fc1776d083088d6bef177 qmail-1.03-r10.ebuild 11181 MD5 19dd9b9232eb66c5adb8263df11c2873 qmail-1.03-r8.ebuild 8143 -MD5 18ba2458ab1f62d326c07e52d8ed9d15 ChangeLog 4962 -MD5 5721b86fd871bdfab77231abc6e02f68 metadata.xml 161 +MD5 c6e06b79c71aa3158772a1c04e052c19 ChangeLog 5981 +MD5 ff596e74b015e067a180fc78855aa87a metadata.xml 360 MD5 5897cb300c3233c91c7e221c8b4b8501 files/digest-qmail-1.03-r8 245 MD5 48a1e168db29ab4e6c57f1ac135ee2bf files/digest-qmail-1.03-r9 323 MD5 1fa33b460954492678129c60520e9cba files/digest-qmail-1.03-r10 442 @@ -57,11 +57,11 @@ MD5 795f633858c0919b6e201cf2b845779e files/1.03-r11/run-qmailqmtpdlog 97 MD5 b24f4dbd450d2d4eddc75ba19cebb915 files/1.03-r11/defaultdelivery 34 MD5 c378c5845848ee31d70f0d05cbcf86be files/1.03-r11/dot_qmail 12 MD5 f43900d79a0aacb5e0d71b0bb6c06fea files/1.03-r11/run-qmailsmtpdlog 97 -MD5 3167ebcc6bb59febdda17e2546994ce5 files/1.03-r11/conf-qmqpd 379 -MD5 ecd7700b509eb6d03e334d9a61f8754f files/1.03-r11/conf-qmtpd 471 +MD5 1095fccd39b78e8534c0554c45d5b6f8 files/1.03-r11/conf-qmqpd 485 +MD5 d5d4a21a9048ec6dc580d3929e7dfd10 files/1.03-r11/conf-qmtpd 577 MD5 5b2334c4a3d2490abec42ad84b398162 files/1.03-r11/conf-smtpd 338 MD5 834dad5113515d0f00981fdc1d07fa84 files/1.03-r11/run-qmailsendlog 96 -MD5 530caa19a2faaaca98338bf7b8857f0c files/1.03-r11/qmail-control 858 -MD5 57e3397200627ef3d4fc550de8f41d24 files/1.03-r11/conf-common 614 +MD5 f3ef132c6ead81c42cea91da37c4db73 files/1.03-r11/qmail-control 859 +MD5 d6c50f1256736801a215a57c3af668ec files/1.03-r11/conf-common 721 MD5 23a2babf3049fe012de21c17e550b3e5 files/1.03-r11/run-qmailsend 29 MD5 0e97c0b031776f40cacdfbf3114af574 files/1.03-r11/run-qmailpop3dlog 97 diff --git a/net-mail/qmail/files/1.03-r11/99qmail b/net-mail/qmail/files/1.03-r11/99qmail new file mode 100644 index 000000000000..1a44a1255a30 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/99qmail @@ -0,0 +1,3 @@ +PATH="/var/qmail/bin" +ROOTPATH="/var/qmail/bin" +CONFIG_PROTECT="/var/qmail/control /var/qmail/alias" diff --git a/net-mail/qmail/files/1.03-r11/conf-common b/net-mail/qmail/files/1.03-r11/conf-common new file mode 100644 index 000000000000..5d62af1851a6 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/conf-common @@ -0,0 +1,24 @@ +#!/bin/sh +# Configuration file for all qmail daemons +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail/files/1.03-r11/conf-common,v 1.1 2003/08/05 11:46:12 robbat2 Exp $ + +# Qmail User IDS to run daemons as +QMAILDUID=`id -u qmaild` +NOFILESGID=`id -g qmaild` + +# Qmail Control Dir +CONTROLDIR=/var/qmail/control + +# Host and port to listen on +TCPSERVER_HOST=0 +TCPSERVER_PORT=${SERVICE} + +# tcpserver maximum concurrency, defaults to 40 in tcpserver +[ -e ${CONTROLDIR}/concurrencyincoming ] && MAXCONN=$(<${CONTROLDIR}/concurrencyincoming) || MAXCONN=40 + +# A quick sanity check +if [ -z "${QMAILDUID}" -o -z "${NOFILESGID}" -o "${SERVICE}" ]; then + echo SERVICE, QMAILDUID or NOFILESGID is unset in + echo $0 + exit 1 +fi diff --git a/net-mail/qmail/files/1.03-r11/conf-qmqpd b/net-mail/qmail/files/1.03-r11/conf-qmqpd new file mode 100644 index 000000000000..9963ff8c1204 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/conf-qmqpd @@ -0,0 +1,18 @@ +#!/bin/sh +# Configuration file for qmail-qmqpd +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail/files/1.03-r11/conf-qmqpd,v 1.1 2003/08/05 11:46:12 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-r11/conf-qmtpd b/net-mail/qmail/files/1.03-r11/conf-qmtpd new file mode 100644 index 000000000000..04849658d918 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/conf-qmtpd @@ -0,0 +1,21 @@ +#!/bin/sh +# Configuration file for qmail-qmtpd +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail/files/1.03-r11/conf-qmtpd,v 1.1 2003/08/05 11:46:12 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-r11/conf-smtpd b/net-mail/qmail/files/1.03-r11/conf-smtpd new file mode 100644 index 000000000000..2f398c4222e5 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/conf-smtpd @@ -0,0 +1,16 @@ +#!/bin/sh + +# Stuff to run before tcpserver +QMAIL_TCPSERVER_PRE="" + +# Stuff to run qmail-smtpd +QMAIL_SMTP_PRE="rblsmtpd" + +# Stuff to after qmail-smtpd +QMAIL_SMTP_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=25 diff --git a/net-mail/qmail/files/1.03-r11/defaultdelivery b/net-mail/qmail/files/1.03-r11/defaultdelivery new file mode 100644 index 000000000000..d0ef7de8b590 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/defaultdelivery @@ -0,0 +1,2 @@ +|dot-forward .forward +./.maildir/ diff --git a/net-mail/qmail/files/1.03-r11/dot_qmail b/net-mail/qmail/files/1.03-r11/dot_qmail new file mode 100644 index 000000000000..7c9e5d08f067 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/dot_qmail @@ -0,0 +1 @@ +./.maildir/ diff --git a/net-mail/qmail/files/1.03-r11/errno.patch b/net-mail/qmail/files/1.03-r11/errno.patch new file mode 100644 index 000000000000..f9b77b91e065 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/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-r11/qmail-control b/net-mail/qmail/files/1.03-r11/qmail-control new file mode 100644 index 000000000000..0709feecd171 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/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-r11/qmail-control,v 1.1 2003/08/05 11:46:12 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-r11/rc b/net-mail/qmail/files/1.03-r11/rc new file mode 100644 index 000000000000..a7bbdc986766 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/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-r11/run-qmailpop3d b/net-mail/qmail/files/1.03-r11/run-qmailpop3d new file mode 100644 index 000000000000..174d47ad310f --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/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-r11/run-qmailpop3dlog b/net-mail/qmail/files/1.03-r11/run-qmailpop3dlog new file mode 100644 index 000000000000..b1fcb8f4af22 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/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-r11/run-qmailqmqpd b/net-mail/qmail/files/1.03-r11/run-qmailqmqpd new file mode 100644 index 000000000000..3c2967cb33a1 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/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 ${CONTROLDIR}/conf-common ] && source ${CONTROLDIR}/conf-common +[ -s ${CONTROLDIR}/conf-${SERVICE}d ] && source ${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-r11/run-qmailqmqpdlog b/net-mail/qmail/files/1.03-r11/run-qmailqmqpdlog new file mode 100644 index 000000000000..d759fbcbcfe1 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/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-r11/run-qmailqmtpd b/net-mail/qmail/files/1.03-r11/run-qmailqmtpd new file mode 100644 index 000000000000..144f8fba5f21 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/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 ${CONTROLDIR}/conf-common ] && source ${CONTROLDIR}/conf-common +[ -s ${CONTROLDIR}/conf-${SERVICE}d ] && source ${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-r11/run-qmailqmtpdlog b/net-mail/qmail/files/1.03-r11/run-qmailqmtpdlog new file mode 100644 index 000000000000..413a217d7de6 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/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-r11/run-qmailsend b/net-mail/qmail/files/1.03-r11/run-qmailsend new file mode 100644 index 000000000000..8dbd3adf524f --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/run-qmailsend @@ -0,0 +1,2 @@ +#!/bin/sh +exec /var/qmail/rc diff --git a/net-mail/qmail/files/1.03-r11/run-qmailsendlog b/net-mail/qmail/files/1.03-r11/run-qmailsendlog new file mode 100644 index 000000000000..5ff50d1e7711 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/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-r11/run-qmailsmtpd b/net-mail/qmail/files/1.03-r11/run-qmailsmtpd new file mode 100644 index 000000000000..e7d4ee047616 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/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 ${CONTROLDIR}/conf-common ] && source ${CONTROLDIR}/conf-common +[ -s ${CONTROLDIR}/conf-${SERVICE}d ] && source ${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-r11/run-qmailsmtpdlog b/net-mail/qmail/files/1.03-r11/run-qmailsmtpdlog new file mode 100644 index 000000000000..2d9546146583 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/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-r11/smtp-auth-close3.patch b/net-mail/qmail/files/1.03-r11/smtp-auth-close3.patch new file mode 100644 index 000000000000..82fda701fd12 --- /dev/null +++ b/net-mail/qmail/files/1.03-r11/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-r11 b/net-mail/qmail/files/digest-qmail-1.03-r11 new file mode 100644 index 000000000000..b1db88921e23 --- /dev/null +++ b/net-mail/qmail/files/digest-qmail-1.03-r11 @@ -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/metadata.xml b/net-mail/qmail/metadata.xml index 51f94e3fbe0e..b3562a9a0c06 100644 --- a/net-mail/qmail/metadata.xml +++ b/net-mail/qmail/metadata.xml @@ -1,5 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<herd>net-mail</herd> + <herd>net-mail</herd> + <maintainer> + <email>robbat2@gentoo.org</email> + <name>Robin H. Johnson</name> + <description>Maintainer until somebody better comes along</description> + </maintainer> </pkgmetadata> diff --git a/net-mail/qmail/qmail-1.03-r11.ebuild b/net-mail/qmail/qmail-1.03-r11.ebuild new file mode 100644 index 000000000000..79fdb2d65201 --- /dev/null +++ b/net-mail/qmail/qmail-1.03-r11.ebuild @@ -0,0 +1,343 @@ +# 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-r11.ebuild,v 1.1 2003/08/05 11:46:12 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 )" + +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" + +PROVIDE="virtual/mta + virtual/mda" + +S=${WORKDIR}/${P} + +src_unpack() { + unpack ${P}.tar.gz qmail-tls.patch.tbz2 + + # SMTP AUTH + unpack qmail-smtpd-auth-0.31.tar.gz + cd ${WORKDIR}/qmail-smtpd-auth-0.31 + cp README.auth base64.c base64.h ${S} + cd ${S} + 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 + ebegin "Applying tls.patch.bz2..." + bzcat ${WORKDIR}/tls.patch.bz2 | patch -p1 &>/dev/null || die + eend $? + fi + + # patch so an alternate queue processor can be used + # i.e. - qmail-scanner + epatch ${DISTDIR}/qmailqueue-patch + + # a patch for faster queue processing + epatch ${DISTDIR}/big-todo.103.patch + + # Support for remote hosts that have QMTP + 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() + cd ${S} + 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 + + 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 + for i in *.1 *.5 *.8 + do + doman $i + done + + einfo "Adding /var/qmail/bin to PATH and ROOTPATH" + 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 + ${D}/var/qmail/bin/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 + ${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 + # 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}/{defaultdelivery,conf-*} +} + +pkg_postinst() { + + einfo "Setting up the message queue hierarchy ..." + + install -d -m 750 -o qmailq -g qmail ${ROOT}/var/qmail/queue + install -d -m 750 -o qmailq -g qmail ${ROOT}/var/qmail/queue/todo + install -d -m 700 -o qmailq -g qmail ${ROOT}/var/qmail/queue/pid + install -d -m 700 -o qmails -g qmail ${ROOT}/var/qmail/queue/bounce + install -d -m 750 -o qmailq -g qmail ${ROOT}/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 + install -d -m 750 -o qmailq -g qmail ${ROOT}/var/qmail/queue/{mess,todo,intd}/${i} + done + + for i in info local remote + do + install -d -m 700 -o qmails -g qmail ${ROOT}/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 + install -d -m 700 -o qmails -g qmail ${ROOT}/var/qmail/queue/{info,local,remote}/${i} + done + + install -d -m 750 -o qmailq -g qmail ${ROOT}/var/qmail/queue/lock + + [ -e ${ROOT}/var/qmail/queue/lock/tcpto ] || dd if=/dev/zero of=${ROOT}/var/qmail/queue/lock/tcpto bs=1024 count=1 + chmod 644 ${ROOT}/var/qmail/queue/lock/tcpto + chown qmailr.qmail ${ROOT}/var/qmail/queue/lock/tcpto + + + [ -e ${ROOT}/var/qmail/queue/lock/sendmutex ] || touch ${ROOT}/var/qmail/queue/lock/sendmutex + chmod 600 ${ROOT}/var/qmail/queue/lock/sendmutex + chown qmails.qmail ${ROOT}/var/qmail/queue/lock/sendmutex + + [ -e ${ROOT}/var/qmail/queue/lock/trigger ] || mkfifo ${ROOT}/var/qmail/queue/lock/trigger + chmod 622 ${ROOT}/var/qmail/queue/lock/trigger + chown qmails.qmail ${ROOT}/var/qmail/queue/lock/trigger + + 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" +} + +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 +} |