diff options
author | 2003-11-29 09:28:10 +0000 | |
---|---|---|
committer | 2003-11-29 09:28:10 +0000 | |
commit | 74b1255dbe67c8dda642ea67174da96b8d0655a9 (patch) | |
tree | 7f589179aaea09a4317fb3bea431df036ce67fc2 /net-mail/qmail-mysql/files | |
parent | new revision, major changes. now integerates -r13 of main qmail package. bug ... (diff) | |
download | historical-74b1255dbe67c8dda642ea67174da96b8d0655a9.tar.gz historical-74b1255dbe67c8dda642ea67174da96b8d0655a9.tar.bz2 historical-74b1255dbe67c8dda642ea67174da96b8d0655a9.zip |
new revision, major changes. now integerates -r13 of main qmail package. bug #20899 fixed. package hardmasked for more testing
Diffstat (limited to 'net-mail/qmail-mysql/files')
33 files changed, 756 insertions, 0 deletions
diff --git a/net-mail/qmail-mysql/files/1.03-r13/99qmail b/net-mail/qmail-mysql/files/1.03-r13/99qmail new file mode 100644 index 000000000000..d9d929e4892b --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/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-mysql/files/1.03-r13/conf-common b/net-mail/qmail-mysql/files/1.03-r13/conf-common new file mode 100644 index 000000000000..7daf4be6830c --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/conf-common @@ -0,0 +1,29 @@ +# Common Configuration file for all qmail daemons +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-mysql/files/1.03-r13/conf-common,v 1.1 2003/11/29 09:28:09 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} + +# you do not need to specify -x, -c, -u or -g in this variable as those are +# added later +TCPSERVER_OPTS="-p -v" + +# we limit data and stack segments to 8mbytes, you may need to raise this if +# you are using a filter in QMAILQUEUE +SOFTLIMIT_OPTS="-m 8000000" + +# We don't have anything to set QMAILQUEUE to at the moment, so we leave it alone +#QMAILQUEUE="" + +# tcpserver maximum concurrency, defaults to 40 in tcpserver +# this controls the maximum number of incoming connections that it will accept +[ -e ${QMAIL_CONTROLDIR}/concurrencyincoming ] && MAXCONN=$(<${QMAIL_CONTROLDIR}/concurrencyincoming) || MAXCONN=40 diff --git a/net-mail/qmail-mysql/files/1.03-r13/conf-pop3d b/net-mail/qmail-mysql/files/1.03-r13/conf-pop3d new file mode 100644 index 000000000000..d9a0981007b7 --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/conf-pop3d @@ -0,0 +1,25 @@ +# Configuration file for qmail-pop3d +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-mysql/files/1.03-r13/conf-pop3d,v 1.1 2003/11/29 09:28:09 robbat2 Exp $ + +# Stuff to run before tcpserver +#QMAIL_TCPSERVER_PRE="" +# Stuff to run before the authenticator +#QMAIL_POP3_PREAUTH="" +# Stuff to run after the user has authenticated successfully +#QMAIL_POP3_POSTAUTH="" + +# this should contain the FQDN of your server +# by default it pulls the value from qmail +# which should be correct +QMAIL_POP3_POP3HOST="$(<${QMAIL_CONTROLDIR}/me)" + +# If you want POP3 before SMTP, and you are using this POP3 daemon +# uncomment the next two lines +#QMAIL_TCPSERVER_PRE="${QMAIL_TCPSERVER_PRE} envdir /etc/relay-ctrl relay-ctrl-chdir" +#QMAIL_POP3_POSTAUTH="${QMAIL_POP3_POSTAUTH} /usr/bin/relay-ctrl-allow" + +# This controls what password authentication tool POP3 uses +# It must support DJB's checkpassword interface (http://cr.yp.to/checkpwd.html) +QMAIL_POP3_CHECKPASSWORD="/bin/checkpassword" +# cmd5checkpw only validates passwords from /etc/poppasswd +#QMAIL_POP3_CHECKPASSWORD="/bin/cmd5checkpw" diff --git a/net-mail/qmail-mysql/files/1.03-r13/conf-qmqpd b/net-mail/qmail-mysql/files/1.03-r13/conf-qmqpd new file mode 100644 index 000000000000..dc05f4cf25cb --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/conf-qmqpd @@ -0,0 +1,15 @@ +# Configuration file for qmail-qmqpd +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-mysql/files/1.03-r13/conf-qmqpd,v 1.1 2003/11/29 09:28:09 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="" + +# this turns off the IDENT grab attempt on connecting +TCPSERVER_OPTS="${TCPSERVER_OPTS} -R" + +# I don't trust /etc/services to have obscure ports +TCPSERVER_PORT=628 diff --git a/net-mail/qmail-mysql/files/1.03-r13/conf-qmtpd b/net-mail/qmail-mysql/files/1.03-r13/conf-qmtpd new file mode 100644 index 000000000000..fb17bc131fab --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/conf-qmtpd @@ -0,0 +1,18 @@ +# Configuration file for qmail-qmtpd +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-mysql/files/1.03-r13/conf-qmtpd,v 1.1 2003/11/29 09:28:09 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="" + +# this turns off the IDENT grab attempt on connecting +TCPSERVER_OPTS="${TCPSERVER_OPTS} -R" + +# I don't trust /etc/services to have obscure ports +TCPSERVER_PORT=209 diff --git a/net-mail/qmail-mysql/files/1.03-r13/conf-smtpd b/net-mail/qmail-mysql/files/1.03-r13/conf-smtpd new file mode 100644 index 000000000000..15d21b4aae54 --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/conf-smtpd @@ -0,0 +1,37 @@ +# Configuration file for qmail-smtpd +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-mysql/files/1.03-r13/conf-smtpd,v 1.1 2003/11/29 09:28:09 robbat2 Exp $ + +# Stuff to run before tcpserver +#QMAIL_TCPSERVER_PRE="" +# Stuff to run qmail-smtpd +#QMAIL_SMTP_PRE="" +# Stuff to after qmail-smtpd +#QMAIL_SMTP_POST="" + +# this turns off the IDENT grab attempt on connecting +TCPSERVER_OPTS="${TCPSERVER_OPTS} -R" + +# 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 POP or IMAP before SMTP type 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" + +# This next block is for SMTP-AUTH +# This provides the LOGIN, PLAIN and CRAM-MD5 types +# the 'cmd5checkpw' used in $QMAIL_SMTP_AUTHCHECKPASSWORD supports CRAM-MD5 +# and reads it's data from /etc/poppasswd +# see the manpage for cmd5checkpw for details on the passwords +# uncomment the next four lines to enable SMTP-AUTH +#QMAIL_SMTP_AUTHHOST=$(<${QMAIL_CONTROLDIR}/me) +#[ -z "${QMAIL_SMTP_POST}" ] && QMAIL_SMTP_POST=/bin/true +#QMAIL_SMTP_CHECKPASSWORD="/bin/cmd5checkpw" +#QMAIL_SMTP_POST="${QMAIL_SMTP_AUTHHOST} ${QMAIL_SMTP_CHECKPASSWORD} ${QMAIL_SMTP_POST}" diff --git a/net-mail/qmail-mysql/files/1.03-r13/config-sanity-check b/net-mail/qmail-mysql/files/1.03-r13/config-sanity-check new file mode 100644 index 000000000000..72ede2c604df --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/config-sanity-check @@ -0,0 +1,23 @@ +#!/bin/sh +# Configuration Sanity Checking for qmail +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-mysql/files/1.03-r13/config-sanity-check,v 1.1 2003/11/29 09:28:09 robbat2 Exp $ +# This is intended solely to stop qmail eating up all your hard disk space with logs + +CONFIG_SANITY_GOOD=1 + +# check simple stuff first +if [ -z "${QMAILDUID}" -o -z "${NOFILESGID}" -o -z "${SERVICE}" ]; then + echo "SERVICE(${SERVICE}), QMAILDUID(${QMAILDUID}) or NOFILESGID(${NOFILESGID}) is unset in $0" + CONFIG_SANITY_GOOD=0 +fi + +# now make sure we are are on a port that is resolable to a port number +if [ -z "`getent services ${TCPSERVER_PORT}`" ]; then + CONFIG_SANITY_GOOD=0 +fi + +if [ ! "${CONFIG_SANITY_GOOD}" -eq "1" ]; then + echo "Some error detected, sleeping for 30 seconds for safety" + sleep 30s + exit 1 +fi diff --git a/net-mail/qmail-mysql/files/1.03-r13/dot_qmail b/net-mail/qmail-mysql/files/1.03-r13/dot_qmail new file mode 100644 index 000000000000..81a15fc5c50c --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/dot_qmail @@ -0,0 +1,3 @@ +# Uncomment the next line for .forward support +#|dot-forward .forward +./.maildir/ diff --git a/net-mail/qmail-mysql/files/1.03-r13/errno.patch b/net-mail/qmail-mysql/files/1.03-r13/errno.patch new file mode 100644 index 000000000000..f9b77b91e065 --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/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-mysql/files/1.03-r13/maildir-quota-fix.patch b/net-mail/qmail-mysql/files/1.03-r13/maildir-quota-fix.patch new file mode 100644 index 000000000000..70a358166c3b --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/maildir-quota-fix.patch @@ -0,0 +1,13 @@ +diff -ur qmail-1.03.orig/overmaildirquota.c qmail-1.03/overmaildirquota.c +--- qmail-1.03.orig/overmaildirquota.c 2003-08-28 18:44:46.000000000 -0700 ++++ qmail-1.03/overmaildirquota.c 2003-08-28 18:48:06.000000000 -0700 +@@ -12,8 +12,7 @@ + #include <errno.h> + #include <sys/stat.h> + +-static const char rcsid[]="$Id: overquota.c,v 1.0 2002/06/09 16:21:05 mr +-sam Exp $"; ++static const char rcsid[]="$Id: maildir-quota-fix.patch,v 1.1 2003/11/29 09:28:09 robbat2 Exp $"; + + + int user_over_maildirquota( const char *dir, const char *q) diff --git a/net-mail/qmail-mysql/files/1.03-r13/mkservercert b/net-mail/qmail-mysql/files/1.03-r13/mkservercert new file mode 100644 index 000000000000..031727aa4a77 --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/mkservercert @@ -0,0 +1,55 @@ +#! /bin/sh +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-mysql/files/1.03-r13/mkservercert,v 1.1 2003/11/29 09:28:09 robbat2 Exp $ +# Self-signed certificate generator for Qmail under Gentoo +# Robin H. Johnson <robbat2@gentoo.org> - October 17, 2003 +# Based on mkimapdcert from courier-imap. + +test -x /usr/bin/openssl || exit 0 +source /sbin/functions.sh + +filedir="/var/qmail/control" +pemfile="${filedir}/servercert.pem" +randfile="${filedir}/servercert.rand" +conffile="${filedir}/servercert.cnf" + +# file details for pemfile +mode="0640" +uid="qmaild" +gid="qmail" + +# expire on certifcate +days="365" + +if test -f $pemfile +then + eerror "$pemfile already exists." + exit 1 +fi + +ewarn "Please customize ${conffile} before continuing!" +einfo "Press ENTER to continue, or CTRL-C to stop now." +read + +# setup the temp file +cp /dev/null $pemfile +chmod 600 $pemfile +chown root $pemfile + +cleanup() { + rm -f $pemfile + rm -f $randfile + exit 1 +} + +dd if=/dev/urandom of=${randfile} bs=64 count=1 2>/dev/null +chmod 600 ${randfile} +einfo "Creating self-signed certificate" +/usr/bin/openssl req -new -x509 -days ${days} -nodes \ + -config ${conffile} -out $pemfile -keyout $pemfile -rand ${randfile} || cleanup +einfo "Certificate details" +/usr/bin/openssl x509 -subject -dates -fingerprint -noout -in $pemfile || cleanup +chown ${uid}:${gid} ${pemfile} +chmod ${mode} ${pemfile} +#qmail needs an extra item +ln -s ${pemfile} ${filedir}/clientcert.pem +rm -f $randfile diff --git a/net-mail/qmail-mysql/files/1.03-r13/qmail-control b/net-mail/qmail-mysql/files/1.03-r13/qmail-control new file mode 100644 index 000000000000..591f8f757ad2 --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/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-mysql/files/1.03-r13/qmail-control,v 1.1 2003/11/29 09:28:09 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-mysql/files/1.03-r13/qmail-genrsacert.sh b/net-mail/qmail-mysql/files/1.03-r13/qmail-genrsacert.sh new file mode 100644 index 000000000000..f292aff545a5 --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/qmail-genrsacert.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-mysql/files/1.03-r13/qmail-genrsacert.sh,v 1.1 2003/11/29 09:28:09 robbat2 Exp $ +# Robin H. Johnson <robbat2@gentoo.org> - October 17, 2003 +# This file generates the static temporary RSA keys needed for qmail to encrypt messages +# It should be run from a crontab, once a day is ok on low load machines, but +# if you do lots of mail, once per hour is more reasonable +# if you do NOT create the rsa512.pem, qmail will generate it on the fly for +# each connection, which can be VERY slow. + +if [ -z "${ROOT}" -o "${ROOT}" = "/" ]; then +confdir=/var/qmail/control +else +confdir=${ROOT}/var/qmail/control +fi +pemfile="${confdir}/rsa512.pem" +tmpfile="${confdir}/rsa512.pem.tmp" + +# this is the number of bits in the key +# it should be a power of 2 ideally +# and it must be more than 64! +bits="512" + +# the key should be 0600 +# which is readable by qmaild only! +umaskvalue="0077" +uid="qmaild" +gid="qmail" + +umask ${umaskvalue} ; +# we need to make sure that all of the operations succeed +/usr/bin/openssl genrsa -out ${tmpfile} ${bits} 2>/dev/null && \ +/bin/chown ${uid}:${gid} ${tmpfile} && \ +/bin/mv -f ${tmpfile} ${pemfile} diff --git a/net-mail/qmail-mysql/files/1.03-r13/qmail-smtpd-esmtp-size-gentoo.patch b/net-mail/qmail-mysql/files/1.03-r13/qmail-smtpd-esmtp-size-gentoo.patch new file mode 100644 index 000000000000..3409116d57ab --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/qmail-smtpd-esmtp-size-gentoo.patch @@ -0,0 +1,81 @@ +diff -ur qmail-1.03.orig/qmail-smtpd.c qmail-1.03/qmail-smtpd.c +--- qmail-1.03.orig/qmail-smtpd.c 2003-09-01 21:47:32.000000000 -0700 ++++ qmail-1.03/qmail-smtpd.c 2003-09-01 21:48:36.000000000 -0700 +@@ -117,6 +117,7 @@ + void err_nogwcert() { out("553 no valid cert for gatewaying (#5.7.1)\r\n"); } + #endif + void err_unimpl() { out("502 unimplemented (#5.5.1)\r\n"); } ++void err_size() { out("552 sorry, that message size exceeds my databytes limit (#5.3.4)\r\n"); } + void err_syntax() { out("555 syntax error (#5.5.4)\r\n"); } + void err_wantmail() { out("503 MAIL first (#5.5.1)\r\n"); } + void err_wantrcpt() { out("503 RCPT first (#5.5.1)\r\n"); } +@@ -296,6 +297,40 @@ + return 1; + } + ++int sizelimit(arg) ++char *arg; ++{ ++ int i; ++ long r; ++ unsigned long sizebytes = 0; ++ ++ i = str_chr(arg,'<'); ++ if (arg[i]) ++ arg += i + 1; ++ else { ++ arg += str_chr(arg,':'); ++ if (*arg == ':') ++arg; ++ while (*arg == ' ') ++arg; ++ } ++ ++ arg += str_chr(arg,' '); ++ if (*arg == ' ') while (*arg == ' ') ++arg; ++ else return 1; ++ ++ i = str_chr(arg,'='); ++ arg[i] = 0; ++ if (case_equals(arg,"SIZE")) { ++ arg += i; ++ while (*++arg && *arg > 47 && *arg < 58) { ++ sizebytes *= 10; ++ sizebytes += *arg - 48; ++ } ++ r = databytes - sizebytes; ++ if (r < 0) return 0; ++ } ++ return 1; ++} ++ + int bmcheck(which) int which; + { + int i = 0; +@@ -351,6 +386,12 @@ + smtp_greet("250 "); out("\r\n"); + seenmail = 0; dohelo(arg); + } ++char size_buf[FMT_ULONG]; ++void smtp_size() ++{ ++ size_buf[fmt_ulong(size_buf,(unsigned long) databytes)] = 0; ++ out("\r\n250-SIZE "); out(size_buf); ++} + void smtp_ehlo(arg) char *arg; + { + smtp_greet("250-"); +@@ -364,6 +405,7 @@ + #ifdef TLS + if (!ssl) out("\r\n250-STARTTLS"); + #endif ++ smtp_size(); + out("\r\n250-PIPELINING\r\n250 8BITMIME\r\n"); + seenmail = 0; dohelo(arg); + } +@@ -375,6 +417,7 @@ + void smtp_mail(arg) char *arg; + { + if (!addrparse(arg)) { err_syntax(); return; } ++ if (databytes && !sizelimit(arg)) { err_size(); return; } + if (bmfok) flagbarfbmf = bmcheck(BMCHECK_BMF); + seenmail = 1; + if (!stralloc_copys(&rcptto,"")) die_nomem(); diff --git a/net-mail/qmail-mysql/files/1.03-r13/qmail-smtpd-relay-reject.gentoo.patch b/net-mail/qmail-mysql/files/1.03-r13/qmail-smtpd-relay-reject.gentoo.patch new file mode 100644 index 000000000000..e6aab720418c --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/qmail-smtpd-relay-reject.gentoo.patch @@ -0,0 +1,41 @@ +diff -ur -x '*.*orig' qmail-1.03.orig/qmail-smtpd.c qmail-1.03/qmail-smtpd.c +--- qmail-1.03.orig/qmail-smtpd.c 2003-09-01 21:51:08.000000000 -0700 ++++ qmail-1.03/qmail-smtpd.c 2003-09-01 21:52:12.000000000 -0700 +@@ -119,6 +119,7 @@ + void err_unimpl() { out("502 unimplemented (#5.5.1)\r\n"); } + void err_size() { out("552 sorry, that message size exceeds my databytes limit (#5.3.4)\r\n"); } + void err_syntax() { out("555 syntax error (#5.5.4)\r\n"); } ++void err_relay() { out("553 we don't relay (#5.7.1)\r\n"); } + void err_wantmail() { out("503 MAIL first (#5.5.1)\r\n"); } + void err_wantrcpt() { out("503 RCPT first (#5.5.1)\r\n"); } + void err_noop() { out("250 ok\r\n"); } +@@ -374,6 +375,21 @@ + return r; + } + ++int addrrelay() ++{ ++ int j; ++ j = addr.len; ++ while(--j >= 0) ++ if (addr.s[j] == '@') break; ++ if (j < 0) j = addr.len; ++ while(--j >= 0) { ++ if (addr.s[j] == '@') return 1; ++ if (addr.s[j] == '%') return 1; ++ if (addr.s[j] == '!') return 1; ++ } ++ return 0; ++} ++ + + int seenmail = 0; + int flagbarfbmf; /* defined if seenmail */ +@@ -434,6 +450,7 @@ + void smtp_rcpt(arg) char *arg; { + if (!seenmail) { err_wantmail(); return; } + if (!addrparse(arg)) { err_syntax(); return; } ++ if (addrrelay()) { err_relay(); return; } + if ((!flagbarfbmf) && (bmtok)) { flagbarfbmt = bmcheck(BMCHECK_BMT); } + if (flagbarfbmf) { + strerr_warn4("qmail-smtpd: badmailfrom: ",mailfrom.s," at ",remoteip,0); diff --git a/net-mail/qmail-mysql/files/1.03-r13/rc b/net-mail/qmail-mysql/files/1.03-r13/rc new file mode 100644 index 000000000000..74b00778dc60 --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/rc @@ -0,0 +1,4 @@ +#!/bin/sh + +exec env - PATH="/var/qmail/bin:$PATH" \ + qmail-start "`grep -v '^#' /var/qmail/control/defaultdelivery`" diff --git a/net-mail/qmail-mysql/files/1.03-r13/run-qmailpop3d b/net-mail/qmail-mysql/files/1.03-r13/run-qmailpop3d new file mode 100644 index 000000000000..267569b6b880 --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/run-qmailpop3d @@ -0,0 +1,26 @@ +#!/bin/sh +# Gentoo Startup script for qmail's POP3 daemon +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-mysql/files/1.03-r13/run-qmailpop3d,v 1.1 2003/11/29 09:28:09 robbat2 Exp $ +# +# If you need to edit this file, please look at editing conf-pop3d and +# conf-common first. If you still need to change this file, you should +# probably file a bug on the bugzilla saying what you wanted to change so that +# modification can be make possible via the configuration files + +# This is to make life easier +SERVICE=pop3 + +# this is to inherit QMAIL_CONTROLDIR +. /etc/profile + +[ -s ${QMAIL_CONTROLDIR}/conf-common ] && source ${QMAIL_CONTROLDIR}/conf-common +[ -s ${QMAIL_CONTROLDIR}/conf-${SERVICE}d ] && source ${QMAIL_CONTROLDIR}/conf-${SERVICE}d +[ -s /var/qmail/bin/config-sanity-check ] && source /var/qmail/bin/config-sanity-check + +exec /usr/bin/softlimit ${SOFTLIMIT_OPTS} \ + /usr/bin/tcpserver ${TCPSERVER_OPTS} -x /etc/tcp.${SERVICE}.cdb -c ${MAXCONN} \ + ${TCPSERVER_HOST} ${TCPSERVER_PORT} \ + ${QMAIL_POP3_PREAUTH} /var/qmail/bin/qmail-popup ${QMAIL_POP3_POP3HOST} \ + ${QMAIL_POP3_CHECKPASSWORD} ${QMAIL_POP3_POSTAUTH} \ + /var/qmail/bin/qmail-pop3d .maildir 2>&1 + diff --git a/net-mail/qmail-mysql/files/1.03-r13/run-qmailpop3dlog b/net-mail/qmail-mysql/files/1.03-r13/run-qmailpop3dlog new file mode 100644 index 000000000000..b1fcb8f4af22 --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/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-mysql/files/1.03-r13/run-qmailqmqpd b/net-mail/qmail-mysql/files/1.03-r13/run-qmailqmqpd new file mode 100644 index 000000000000..0680d34d0419 --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/run-qmailqmqpd @@ -0,0 +1,27 @@ +#!/bin/sh +# Gentoo Startup script for qmail's QMQP daemon +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-mysql/files/1.03-r13/run-qmailqmqpd,v 1.1 2003/11/29 09:28:09 robbat2 Exp $ +# +# If you need to edit this file, please look at editing conf-qmqpd and +# conf-common first. If you still need to change this file, you should +# probably file a bug on the bugzilla saying what you wanted to change so that +# modification can be make possible via the configuration files + +# This is to make life easier +SERVICE=qmqp + +# this is to inherit QMAIL_CONTROLDIR +. /etc/profile + +[ -s ${QMAIL_CONTROLDIR}/conf-common ] && source ${QMAIL_CONTROLDIR}/conf-common +[ -s ${QMAIL_CONTROLDIR}/conf-${SERVICE}d ] && source ${QMAIL_CONTROLDIR}/conf-${SERVICE}d +[ -s /var/qmail/bin/config-sanity-check ] && source /var/qmail/bin/config-sanity-check + +# Now run it all +exec /usr/bin/softlimit ${SOFTLIMIT_OPTS} \ + ${QMAIL_TCPSERVER_PRE} \ + /usr/bin/tcpserver ${TCPSERVER_OPTS} -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-mysql/files/1.03-r13/run-qmailqmqpdlog b/net-mail/qmail-mysql/files/1.03-r13/run-qmailqmqpdlog new file mode 100644 index 000000000000..d759fbcbcfe1 --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/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-mysql/files/1.03-r13/run-qmailqmtpd b/net-mail/qmail-mysql/files/1.03-r13/run-qmailqmtpd new file mode 100644 index 000000000000..796741cd9f12 --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/run-qmailqmtpd @@ -0,0 +1,27 @@ +#!/bin/sh +# Gentoo Startup script for qmail's QMTP daemon +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-mysql/files/1.03-r13/run-qmailqmtpd,v 1.1 2003/11/29 09:28:09 robbat2 Exp $ +# +# If you need to edit this file, please look at editing conf-qmtpd and +# conf-common first. If you still need to change this file, you should +# probably file a bug on the bugzilla saying what you wanted to change so that +# modification can be make possible via the configuration files + +# This is to make life easier +SERVICE=qmtp + +# this is to inherit QMAIL_CONTROLDIR +. /etc/profile + +[ -s ${QMAIL_CONTROLDIR}/conf-common ] && source ${QMAIL_CONTROLDIR}/conf-common +[ -s ${QMAIL_CONTROLDIR}/conf-${SERVICE}d ] && source ${QMAIL_CONTROLDIR}/conf-${SERVICE}d +[ -s /var/qmail/bin/config-sanity-check ] && source /var/qmail/bin/config-sanity-check + +# Now run it all +exec /usr/bin/softlimit ${SOFTLIMIT_OPTS} \ + ${QMAIL_TCPSERVER_PRE} \ + /usr/bin/tcpserver ${TCPSERVER_OPTS} -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-mysql/files/1.03-r13/run-qmailqmtpdlog b/net-mail/qmail-mysql/files/1.03-r13/run-qmailqmtpdlog new file mode 100644 index 000000000000..413a217d7de6 --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/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-mysql/files/1.03-r13/run-qmailsend b/net-mail/qmail-mysql/files/1.03-r13/run-qmailsend new file mode 100644 index 000000000000..8dbd3adf524f --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/run-qmailsend @@ -0,0 +1,2 @@ +#!/bin/sh +exec /var/qmail/rc diff --git a/net-mail/qmail-mysql/files/1.03-r13/run-qmailsendlog b/net-mail/qmail-mysql/files/1.03-r13/run-qmailsendlog new file mode 100644 index 000000000000..5ff50d1e7711 --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/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-mysql/files/1.03-r13/run-qmailsmtpd b/net-mail/qmail-mysql/files/1.03-r13/run-qmailsmtpd new file mode 100644 index 000000000000..12ab70f6b57e --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/run-qmailsmtpd @@ -0,0 +1,27 @@ +#!/bin/sh +# Gentoo Startup script for qmail's SMTP daemon +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-mysql/files/1.03-r13/run-qmailsmtpd,v 1.1 2003/11/29 09:28:09 robbat2 Exp $ +# +# If you need to edit this file, please look at editing conf-smtpd and +# conf-common first. If you still need to change this file, you should +# probably file a bug on the bugzilla saying what you wanted to change so that +# modification can be make possible via the configuration files + +# This is to make life easier +SERVICE=smtp + +# this is to inherit QMAIL_CONTROLDIR +. /etc/profile + +[ -s ${QMAIL_CONTROLDIR}/conf-common ] && source ${QMAIL_CONTROLDIR}/conf-common +[ -s ${QMAIL_CONTROLDIR}/conf-${SERVICE}d ] && source ${QMAIL_CONTROLDIR}/conf-${SERVICE}d +[ -s /var/qmail/bin/config-sanity-check ] && source /var/qmail/bin/config-sanity-check + +# Now run it all +exec /usr/bin/softlimit ${SOFTLIMIT_OPTS} \ + ${QMAIL_TCPSERVER_PRE} \ + /usr/bin/tcpserver ${TCPSERVER_OPTS} -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-mysql/files/1.03-r13/run-qmailsmtpdlog b/net-mail/qmail-mysql/files/1.03-r13/run-qmailsmtpdlog new file mode 100644 index 000000000000..2d9546146583 --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/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-mysql/files/1.03-r13/servercert.cnf b/net-mail/qmail-mysql/files/1.03-r13/servercert.cnf new file mode 100644 index 000000000000..dea85a8d496a --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/servercert.cnf @@ -0,0 +1,37 @@ +# $Header: /var/cvsroot/gentoo-x86/net-mail/qmail-mysql/files/1.03-r13/servercert.cnf,v 1.1 2003/11/29 09:28:09 robbat2 Exp $ +# Robin H. Johnson <robbat2@gentoo.org> - October 17, 2003 +# This is the openssl config file to generate keys for qmail +# It is read by mkservercert + +[ req ] +# you can increase this value, but be aware that it will make things much slower +# this should be a power of 2! +default_bits = 1024 +# leave the rest of these alone! +encrypt_key = yes +distinguished_name = req_dn +x509_extensions = cert_type +prompt = no + +[ req_dn ] +# 2-Letter ISO country code +C=US +# FULL name of state/province/district +# NO abbreviations! +ST=Alabama +# FULL name of city +# NO abbreviations! +L=Mobile +# Full Name of your organization +# NO abbreviations! +O=Foobar Systems +# Leave this alone unless specifically need to change it! +OU=Automatically-generated Qmail SMTP SSL key +# This should be a FQDN that resolves to the IP of your server +CN=localhost +# This should be the email address for the administrator of the server +emailAddress=postmaster@localhost + +# Leave this alone! +[ cert_type ] +nsCertType = server diff --git a/net-mail/qmail-mysql/files/1.03-r13/smtp-auth-close3.patch b/net-mail/qmail-mysql/files/1.03-r13/smtp-auth-close3.patch new file mode 100644 index 000000000000..e259bbf27977 --- /dev/null +++ b/net-mail/qmail-mysql/files/1.03-r13/smtp-auth-close3.patch @@ -0,0 +1,24 @@ +diff -ur qmail-1.03.orig/qmail-smtpd.c qmail-1.03/qmail-smtpd.c +--- qmail-1.03.orig/qmail-smtpd.c 2003-08-11 20:37:16.000000000 -0700 ++++ qmail-1.03/qmail-smtpd.c 2003-08-11 20:39:52.000000000 -0700 +@@ -519,14 +519,18 @@ + if (!stralloc_0(&resp)) die_nomem(); + + if (fd_copy(2,1) == -1) return err_pipe(); +- close(3); ++ //close(3); + if (pipe(pi) == -1) return err_pipe(); +- if (pi[0] != 3) return err_pipe(); ++ //if (pi[0] != 3) return err_pipe(); + switch(child = fork()) { + case -1: + return err_fork(); + case 0: + close(pi[1]); ++ if (pi[0] != 3) { ++ close(3); ++ if (0 > dup2(pi[0],3)) _exit(1); ++ } + sig_pipedefault(); + execvp(*childargs, childargs); + _exit(1); diff --git a/net-mail/qmail-mysql/files/digest-qmail-mysql-1.03-r13 b/net-mail/qmail-mysql/files/digest-qmail-mysql-1.03-r13 new file mode 100644 index 000000000000..4afd7652e5a8 --- /dev/null +++ b/net-mail/qmail-mysql/files/digest-qmail-mysql-1.03-r13 @@ -0,0 +1,21 @@ +MD5 622f65f982e380dbe86e6574f3abcb7c qmail-1.03.tar.gz 220668 +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 122664c38338e5ec35fcac43f33d6927 qmail-1.03-qmtpc.patch 6197 +MD5 24fc1a33089faf12e00b127cd659f317 qmail-smtpd-relay-reject 1230 +MD5 ed5c0ddb6a5cc0386b1e04ced71d26ad qmail-local-tabs.patch 505 +MD5 7553829a93411cdaffce31a29323697f qmail-maildir++.patch 43510 +MD5 d566e8bd99b33efee0194e855b8d6995 qmail-date-localtime.patch.txt 2603 +MD5 1c4518f780d231bde9745cdd0fa313b2 qmail-limit-bounce-size.patch.txt 1753 +MD5 9140ad2b03017145cd7963c84bb24f16 qmail-103.patch 2104 +MD5 83bf5c4a4aade3c6c15faa9665ccfb71 qregex-starttls-2way-auth.patch 63825 +MD5 1d8b89607d35bfa409f8cfe6d23bc554 qmail-remote-auth-patch-doc.txt 1287 +MD5 fc00be3edc2827f1c93112d7d5147122 qmail-gentoo-1.03-r12-badrcptto-morebadrcptto-accdias.diff.bz2 4524 +MD5 58d912de1ede57062fa8a3e2e0e75abf qmail-popupnofd2close.patch 401 +MD5 d7151dcbeb02eea1c24c1dedffe20e0b qmail-1.03-reread-concurrency.2.patch 1129 +MD5 ad597c93426c0938fdb36d853fbcf40d 08-capa.diff 1323 +MD5 c422674e16bb2209617f5bb5a69197d5 qmail-mysql-1.1.9.patch.gentoo-1.03-r13.bz2 14046 diff --git a/net-mail/qmail-mysql/files/tcp.pop3.sample b/net-mail/qmail-mysql/files/tcp.pop3.sample new file mode 100644 index 000000000000..12405307c5f3 --- /dev/null +++ b/net-mail/qmail-mysql/files/tcp.pop3.sample @@ -0,0 +1,7 @@ +# to update the database after changing this file, run: +# tcprules /etc/tcp.pop3.cdb /etc/.tcp.pop3.tmp < /etc/tcp.pop3 +# Allow any client to connect to us via POP3 +# If people are abusing POP3 such as denial-of-service on POP3, +# you can add their ips here to block them out +:allow + diff --git a/net-mail/qmail-mysql/files/tcp.qmqp.sample b/net-mail/qmail-mysql/files/tcp.qmqp.sample new file mode 100644 index 000000000000..e8536f1f3163 --- /dev/null +++ b/net-mail/qmail-mysql/files/tcp.qmqp.sample @@ -0,0 +1,8 @@ +# to update the database after changing this file, run: +# tcprules /etc/tcp.qmqp.cdb /etc/.tcp.qmqp.tmp < /etc/tcp.qmqp +# QMQP is a bulk protocol +# and we don't want spam to ever come by it +# and it is intended to go between a few servers only +# so we don't trust any default people with it +# see /etc/tcp.smtp.rules for more info +:deny diff --git a/net-mail/qmail-mysql/files/tcp.qmtp.sample b/net-mail/qmail-mysql/files/tcp.qmtp.sample new file mode 100644 index 000000000000..825c3f11f1c0 --- /dev/null +++ b/net-mail/qmail-mysql/files/tcp.qmtp.sample @@ -0,0 +1,8 @@ +# to update the database after changing this file, run: +# tcprules /etc/tcp.qmtp.cdb /etc/.tcp.qmtp.tmp < /etc/tcp.qmtp +# We trust QMTP connections just as SMTP by default +# see /etc/tcp.smtp.rules for more info +# allow relaying from localhost +127.0.0.1:allow,RELAYCLIENT="",RBLSMTPD="" +# everybody else is not allowed to relay, and is subject to RBLSMTPD checks +:allow diff --git a/net-mail/qmail-mysql/files/tcp.smtp.sample b/net-mail/qmail-mysql/files/tcp.smtp.sample new file mode 100644 index 000000000000..5f339073c49e --- /dev/null +++ b/net-mail/qmail-mysql/files/tcp.smtp.sample @@ -0,0 +1,83 @@ +# to update the database after changing this file, run: +# tcprules /etc/tcp.smtp.cdb /etc/.tcp.smtp.tmp < /etc/tcp.smtp +#------------------------------------------------------ +# DESCRIPTION OF THE RULES TO REMIND ME OF HOW THIS FILE WORKS +# +# If you set 'allow', this means that our mail server will allow +# the specified IP range to make a TCP connection to our server +# +# If you set 'deny', this means that our mail server will not allow +# the specified IP range to make a TCP connection to our server +# +# If you set RELAYCLIENT="", this means that the listed IP range is +# allowed to relay mail through our server +# +# If you dont set RELAYCLIENT="", this means that the listed IP range +# will not be able to relay mail through our server +# +# If you set RBLSMTPD="", this means that the listed IP ranges will +# not be checked against any of the RBL databases +# +# If you set RBLSMTPD="some text here", this means that an RBL lookup +# wont be performed, but the mail will be rejected with the specified +# text as a 4xx temp error message +# +# If you set RBLSMTPD="-some text here", this means that an RBL lookup +# wont be performed, but the mail will be rejected with the specified +# text as a 5xx perm error message +# +# If you do not set RBLSMTPD="" or ="some text", then an RBL lookup +# will be performed. If the lookup is successful, then RBLSMTPD will +# return your custom error message (as specified in the -r parameter +# in smtpd supervise script) +# +#----------------------------------------------------- +# HERE ARE THE RULES! : +#----------------------------------------------------- +# BYPASS OPEN RELAY CHECKING FOR THESE IPS : +# +# These IPs are ones that we have setup so that they arent RBL checked. +# We have done this because these particular servers are RBL listed, +# and for whatever reason they can't/won't fix their open relay problem, +# and we still want to be able to receive mail from them. +# +# reminder text goes here for this entry so we know the story... +#111.111.111.111:allow,RBLSMTPD="" +# reminder text goes here for this entry so we know the story... +#222.222.222.222:allow,RBLSMTPD="" +# +#----------------------------------------------------------------- +# DONT ALLOW THESE IPS TO SEND MAIL TO US : +# +# mailXX.offermail.net connecting regularly and sending invalid +# format messages causing exit with status 256 (bare linefeed normally) +# entry added 15/12/2001 +# after looking at the mail coming from these servers it was found to be spam +#216.242.75.100-116:allow,RBLSMTPD="-Connections from this IP have been banned." +# +# heaps of spam from replyto of *@freeamateurhotties.com dec2001 +#64.228.127.:allow,RBLSMTPD="-Connections refused due to spam from freeamateurhotties.com" +#154.20.94.:allow,RBLSMTPD="-Connections refused due to spam from freeamateurhotties.com" +#209.151.132.:allow,RBLSMTPD="-Connections refused due to spam from freeamateurhotties.com" +#216.18.85.:allow,RBLSMTPD="-Connections refused due to spam from freeamateurhotties.com" +# +#----------------------------------------------------------------- +# ALLOW THESE IPS TO RELAY MAIL THROUGH OUR SERVER +# +# Local class-c's from our LAN are allowed to relay, +# and we wont bother doing any RBL checking. +#123.123.123.:allow,RELAYCLIENT="",RBLSMTPD="" +#123.111.111.:allow,RELAYCLIENT="",RBLSMTPD="" +# +# Connections from localhost are allowed to relay +# (because the WebMail server runs on localhost), +# and obviously there is no point trying to perform an RBL check. +127.0.0.1:allow,RELAYCLIENT="",RBLSMTPD="" +# +#----------------------------------------------------------------- +# ALLOW EVERYONE ELSE TO SEND US MAIL +# +# Everyone else can make connections to our server, +# but not allowed to relay +# RBL lookups are performed +:allow |