From 56bd759df1d0c750a065b8c845e93d5dfa6b549d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 8 Aug 2015 13:49:04 -0700 Subject: proj/gentoo: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson X-Thanks: Alec Warner - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring - wrote much python to improve cvs2svn X-Thanks: Rich Freeman - validation scripts X-Thanks: Patrick Lauer - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed --- .../files/qpsmtpd-0.40-badrcptto_allowrelay.patch | 10 ++++ .../files/qpsmtpd-0.83-accept-empty-email.patch | 44 +++++++++++++++ .../qpsmtpd/files/qpsmtpd-0.83-clamd_conf.patch | 12 +++++ .../qpsmtpd/files/qpsmtpd-0.84-Net-DNS-id.patch | 28 ++++++++++ mail-mta/qpsmtpd/files/qpsmtpd.confd | 25 +++++++++ mail-mta/qpsmtpd/files/qpsmtpd.envd | 2 + mail-mta/qpsmtpd/files/qpsmtpd.initd | 62 ++++++++++++++++++++++ mail-mta/qpsmtpd/files/qpsmtpd.initd-r1 | 62 ++++++++++++++++++++++ mail-mta/qpsmtpd/files/qpsmtpd.xinetd | 20 +++++++ 9 files changed, 265 insertions(+) create mode 100644 mail-mta/qpsmtpd/files/qpsmtpd-0.40-badrcptto_allowrelay.patch create mode 100644 mail-mta/qpsmtpd/files/qpsmtpd-0.83-accept-empty-email.patch create mode 100644 mail-mta/qpsmtpd/files/qpsmtpd-0.83-clamd_conf.patch create mode 100644 mail-mta/qpsmtpd/files/qpsmtpd-0.84-Net-DNS-id.patch create mode 100644 mail-mta/qpsmtpd/files/qpsmtpd.confd create mode 100644 mail-mta/qpsmtpd/files/qpsmtpd.envd create mode 100644 mail-mta/qpsmtpd/files/qpsmtpd.initd create mode 100644 mail-mta/qpsmtpd/files/qpsmtpd.initd-r1 create mode 100644 mail-mta/qpsmtpd/files/qpsmtpd.xinetd (limited to 'mail-mta/qpsmtpd/files') diff --git a/mail-mta/qpsmtpd/files/qpsmtpd-0.40-badrcptto_allowrelay.patch b/mail-mta/qpsmtpd/files/qpsmtpd-0.40-badrcptto_allowrelay.patch new file mode 100644 index 000000000000..1f9f33f9a148 --- /dev/null +++ b/mail-mta/qpsmtpd/files/qpsmtpd-0.40-badrcptto_allowrelay.patch @@ -0,0 +1,10 @@ +--- qpsmtpd-0.40/plugins/check_badrcptto.badrcptto_allowrelay 2007-06-14 11:57:24.000000000 -0600 ++++ qpsmtpd-0.40/plugins/check_badrcptto 2007-06-14 13:26:42.000000000 -0600 +@@ -3,6 +3,7 @@ + + sub hook_rcpt { + my ($self, $transaction, $recipient, %param) = @_; ++ return (DECLINED) if $self->qp->connection->relay_client; + my @badrcptto = $self->qp->config("badrcptto") or return (DECLINED); + return (DECLINED) unless $recipient->host && $recipient->user; + my $host = lc $recipient->host; diff --git a/mail-mta/qpsmtpd/files/qpsmtpd-0.83-accept-empty-email.patch b/mail-mta/qpsmtpd/files/qpsmtpd-0.83-accept-empty-email.patch new file mode 100644 index 000000000000..2e1dcacc46c3 --- /dev/null +++ b/mail-mta/qpsmtpd/files/qpsmtpd-0.83-accept-empty-email.patch @@ -0,0 +1,44 @@ +Accept messages with no body. + +If a message has no body, there is nothing in the RFC spec that says it +needs to have a trailing \n for a blank line after the headers. + +Thumderbird 10 generates some emails like this, which will always cause +plugin errors when $transaction->header is accessed otherwise, as there +is almost no checking that $transaction->header is defined before usage. + +Signed-off-by: Robin H. Johnson +Thanks-To: Jack Bates + +--- qpsmtpd-0.83.orig/lib/Qpsmtpd/SMTP.pm 2009-04-03 06:24:21.000000000 +0000 ++++ qpsmtpd-0.83/lib/Qpsmtpd/SMTP.pm 2012-02-25 05:52:14.000000000 +0000 +@@ -632,7 +632,7 @@ + + my $timeout = $self->config('timeout'); + while (defined($_ = $self->getline($timeout))) { +- $complete++, last if $_ eq ".\r\n"; ++ $complete++, $_ = '' if $_ eq ".\r\n"; + $i++; + + # should probably use \012 and \015 in these checks instead of \r and \n ... +@@ -648,7 +648,7 @@ + unless (($max_size and $size > $max_size)) { + s/\r\n$/\n/; + s/^\.\./\./; +- if ($in_header and m/^$/) { ++ if ($in_header and (m/^$/ or $complete > 0)) { + $in_header = 0; + my @headers = split /^/m, $buffer; + +@@ -691,9 +691,10 @@ + + # copy all lines into the spool file, including the headers + # we will create a new header later before sending onwards +- $self->transaction->body_write($_); ++ $self->transaction->body_write($_) unless $complete; + $size += length $_; + } ++ last if $complete > 0; + #$self->log(LOGDEBUG, "size is at $size\n") unless ($i % 300); + } + diff --git a/mail-mta/qpsmtpd/files/qpsmtpd-0.83-clamd_conf.patch b/mail-mta/qpsmtpd/files/qpsmtpd-0.83-clamd_conf.patch new file mode 100644 index 000000000000..801dc477df9f --- /dev/null +++ b/mail-mta/qpsmtpd/files/qpsmtpd-0.83-clamd_conf.patch @@ -0,0 +1,12 @@ +diff -Nuar --exclude '*.orig' --exclude '*.rej' qpsmtpd-0.83.orig/plugins/virus/clamav qpsmtpd-0.83/plugins/virus/clamav +--- qpsmtpd-0.83.orig/plugins/virus/clamav 2009-07-20 15:36:17.000000000 +0000 ++++ qpsmtpd-0.83/plugins/virus/clamav 2009-09-16 01:14:22.903329780 +0000 +@@ -151,7 +151,7 @@ + $self->{_max_size} ||= 512 * 1024; + $self->{_spool_dir} ||= $self->spool_dir(); + $self->{_back_compat} ||= ''; # make sure something is set +- $self->{_clamd_conf} ||= '/etc/clamd/conf'; # make sure something is set ++ $self->{_clamd_conf} ||= '/etc/clamd.conf'; # make sure something is set + $self->{_declined_on_fail} ||= 0; # decline the message on clamav failure + + unless ($self->{_spool_dir}) { diff --git a/mail-mta/qpsmtpd/files/qpsmtpd-0.84-Net-DNS-id.patch b/mail-mta/qpsmtpd/files/qpsmtpd-0.84-Net-DNS-id.patch new file mode 100644 index 000000000000..6331e98cb48b --- /dev/null +++ b/mail-mta/qpsmtpd/files/qpsmtpd-0.84-Net-DNS-id.patch @@ -0,0 +1,28 @@ +Net::DNS function nextid() changed to id(). + +Signed-off-by: Robin H. Johnson + +diff -Nuar qpsmtpd-0.84.orig/qpsmtpd-async qpsmtpd-0.84/qpsmtpd-async +--- qpsmtpd-0.84.orig/qpsmtpd-async 2009-04-03 05:48:34.000000000 +0000 ++++ qpsmtpd-0.84/qpsmtpd-async 2013-04-15 23:01:49.952857659 +0000 +@@ -145,7 +145,7 @@ + # print "Next DNS ID: $Net::DNS::Resolver::global{id}\n"; + }; + if ($@) { +- # print "Next DNS ID: " . Net::DNS::Header::nextid() . "\n"; ++ # print "Next DNS ID: " . Net::DNS::Header::id() . "\n"; + } + + # Fixup lost kqueue after fork +diff -Nuar qpsmtpd-0.84.orig/qpsmtpd-forkserver qpsmtpd-0.84/qpsmtpd-forkserver +--- qpsmtpd-0.84.orig/qpsmtpd-forkserver 2010-04-08 05:29:52.000000000 +0000 ++++ qpsmtpd-0.84/qpsmtpd-forkserver 2013-04-15 23:01:49.952857659 +0000 +@@ -285,7 +285,7 @@ + # all children should have different seeds, to prevent conflicts + srand(); + for (0 .. rand(65536)) { +- Net::DNS::Header::nextid(); ++ Net::DNS::Header::id(); + } + + close $_ for $select->handles; diff --git a/mail-mta/qpsmtpd/files/qpsmtpd.confd b/mail-mta/qpsmtpd/files/qpsmtpd.confd new file mode 100644 index 000000000000..9a82c7100e21 --- /dev/null +++ b/mail-mta/qpsmtpd/files/qpsmtpd.confd @@ -0,0 +1,25 @@ +# Config file for /etc/init.d/qpsmtpd +# + +QPSMTPD_CONFIG="/etc/qpsmtpd" +QPSMTPD_NICELEVEL="0" + +# Select QPSMTPD server type +# - async +# Not all plugins work without problems with the async mode. +# - forkserver (default) +# - prefork +# Does not work 100%. Use at your own risk. +QPSMTPD_SERVER_TYPE="forkserver" + +# QPSMTPD options. This can be different depending on +# what QPSMTPD server you run. +# +# Typical forkserver +QPSMTPD_OPTIONS="-l 0.0.0.0 -p 25 -u smtpd" +# +# Typical prefork +# QPSMTPD_OPTIONS="--interface 0.0.0.0 --port 25 --user smtpd" +# +# Typical async +# QPSMTPD_OPTIONS="-l 0.0.0.0 -p 25 -u smtpd" diff --git a/mail-mta/qpsmtpd/files/qpsmtpd.envd b/mail-mta/qpsmtpd/files/qpsmtpd.envd new file mode 100644 index 000000000000..3665116f34ea --- /dev/null +++ b/mail-mta/qpsmtpd/files/qpsmtpd.envd @@ -0,0 +1,2 @@ +QPSMTPD_CONFIG="/etc/qpsmtpd" +CONFIG_PROTECT="/usr/share/qpsmtpd/plugins" diff --git a/mail-mta/qpsmtpd/files/qpsmtpd.initd b/mail-mta/qpsmtpd/files/qpsmtpd.initd new file mode 100644 index 000000000000..b9500b6713ca --- /dev/null +++ b/mail-mta/qpsmtpd/files/qpsmtpd.initd @@ -0,0 +1,62 @@ +#!/sbin/runscript + +pidfile=/var/run/qpsmtpd/qpsmtpd.pid + +depend() { + use logger dns ypbind amavisd mysql postgresql antivirus postfix_greylist net saslauthd + provide mta +} + +checkconfig() { + if ! [ -d "${QPSMTPD_CONFIG:-/etc/qpsmtpd}" ]; then + eerror "Configuration directory ${QPSMTPD_CONFIG:-/etc/qpsmtpd} does not exist." + return 1 + fi + return 0 +} + +start() { + checkconfig || return 1 + ebegin "Starting qpsmtpd [${QPSMTPD_SERVER_TYPE}] server" + HOME="/var/spool/qpsmtpd" + local QPSMTPD_SERVER_BIN="" + local myopts="" + export QPSMTPD_CONFIG=${QPSMTPD_CONFIG} + for foo in PERL_UNICODE LANG LC_TIME LC_ALL BASH_ENV ENV CDPATH IFS + do + unset ${foo} + done + case "${QPSMTPD_SERVER_TYPE}" in + prefork) + QPSMTPD_SERVER_BIN="/usr/bin/qpsmtpd-prefork" + QPSMTPD_OPTIONS="$(echo "${QPSMTPD_OPTIONS}" | sed "s:\-\-pid\-file[\t ]\{1,99\}[^ ]*::gI")" + # Option --pid-file is mentioned in the help of the prefork server + # but does not work when specified. + # QPSMTPD_OPTIONS="${QPSMTPD_OPTIONS} --pid-file ${pidfile}" + myopts="${myopts} --make-pidfile --pidfile ${pidfile}" + ;; + async) + QPSMTPD_SERVER_BIN="/usr/sbin/qpsmtpd-async" + myopts="${myopts} --background --make-pidfile --pidfile ${pidfile}" + ;; + forkserver|*) + QPSMTPD_SERVER_BIN="/usr/bin/qpsmtpd-forkserver" + QPSMTPD_OPTIONS="$(echo "${QPSMTPD_OPTIONS}" | sed "s:\-\-pid\-file[\t ]\{1,99\}[^ ]*::gI")" + QPSMTPD_OPTIONS="$(echo "${QPSMTPD_OPTIONS}" | sed "s:[\t ]\{0,99\}\-d[\t ]\{1,99\}|[\t ]\{1,99\}\-d[\t ]\{0,99\}::gI")" + QPSMTPD_OPTIONS="$(echo "${QPSMTPD_OPTIONS}" | sed "s:[\t ]\{0,99\}\-\detach[\t ]\{1,99\}|[\t ]\{1,99\}\-\-detach[\t ]\{0,99\}::gI")" + QPSMTPD_OPTIONS="${QPSMTPD_OPTIONS} --pid-file ${pidfile} --detach" + myopts="${myopts} --pidfile ${pidfile}" + ;; + esac + start-stop-daemon --start --nicelevel ${QPSMTPD_NICELEVEL:-0} \ + --quiet ${myopts} \ + --exec ${QPSMTPD_SERVER_BIN} \ + -- ${QPSMTPD_OPTIONS} + eend $? +} + +stop() { + ebegin "Stopping qpsmtpd [${QPSMTPD_SERVER_TYPE}] server" + start-stop-daemon --stop --quiet --pidfile ${pidfile} + eend $? +} diff --git a/mail-mta/qpsmtpd/files/qpsmtpd.initd-r1 b/mail-mta/qpsmtpd/files/qpsmtpd.initd-r1 new file mode 100644 index 000000000000..1844dfce9080 --- /dev/null +++ b/mail-mta/qpsmtpd/files/qpsmtpd.initd-r1 @@ -0,0 +1,62 @@ +#!/sbin/runscript + +pidfile=/run/qpsmtpd/qpsmtpd.pid + +depend() { + use logger dns ypbind amavisd mysql postgresql antivirus postfix_greylist net saslauthd + provide mta +} + +checkconfig() { + if ! [ -d "${QPSMTPD_CONFIG:-/etc/qpsmtpd}" ]; then + eerror "Configuration directory ${QPSMTPD_CONFIG:-/etc/qpsmtpd} does not exist." + return 1 + fi + return 0 +} + +start() { + checkconfig || return 1 + ebegin "Starting qpsmtpd [${QPSMTPD_SERVER_TYPE}] server" + HOME="/var/spool/qpsmtpd" + local QPSMTPD_SERVER_BIN="" + local myopts="" + export QPSMTPD_CONFIG=${QPSMTPD_CONFIG} + for foo in PERL_UNICODE LANG LC_TIME LC_ALL BASH_ENV ENV CDPATH IFS + do + unset ${foo} + done + case "${QPSMTPD_SERVER_TYPE}" in + prefork) + QPSMTPD_SERVER_BIN="/usr/bin/qpsmtpd-prefork" + QPSMTPD_OPTIONS="$(echo "${QPSMTPD_OPTIONS}" | sed "s:\-\-pid\-file[\t ]\{1,99\}[^ ]*::gI")" + # Option --pid-file is mentioned in the help of the prefork server + # but does not work when specified. + # QPSMTPD_OPTIONS="${QPSMTPD_OPTIONS} --pid-file ${pidfile}" + myopts="${myopts} --make-pidfile --pidfile ${pidfile}" + ;; + async) + QPSMTPD_SERVER_BIN="/usr/sbin/qpsmtpd-async" + myopts="${myopts} --background --make-pidfile --pidfile ${pidfile}" + ;; + forkserver|*) + QPSMTPD_SERVER_BIN="/usr/bin/qpsmtpd-forkserver" + QPSMTPD_OPTIONS="$(echo "${QPSMTPD_OPTIONS}" | sed "s:\-\-pid\-file[\t ]\{1,99\}[^ ]*::gI")" + QPSMTPD_OPTIONS="$(echo "${QPSMTPD_OPTIONS}" | sed "s:[\t ]\{0,99\}\-d[\t ]\{1,99\}|[\t ]\{1,99\}\-d[\t ]\{0,99\}::gI")" + QPSMTPD_OPTIONS="$(echo "${QPSMTPD_OPTIONS}" | sed "s:[\t ]\{0,99\}\-\detach[\t ]\{1,99\}|[\t ]\{1,99\}\-\-detach[\t ]\{0,99\}::gI")" + QPSMTPD_OPTIONS="${QPSMTPD_OPTIONS} --pid-file ${pidfile} --detach" + myopts="${myopts} --pidfile ${pidfile}" + ;; + esac + start-stop-daemon --start --nicelevel ${QPSMTPD_NICELEVEL:-0} \ + --quiet ${myopts} \ + --exec ${QPSMTPD_SERVER_BIN} \ + -- ${QPSMTPD_OPTIONS} + eend $? +} + +stop() { + ebegin "Stopping qpsmtpd [${QPSMTPD_SERVER_TYPE}] server" + start-stop-daemon --stop --quiet --pidfile ${pidfile} + eend $? +} diff --git a/mail-mta/qpsmtpd/files/qpsmtpd.xinetd b/mail-mta/qpsmtpd/files/qpsmtpd.xinetd new file mode 100644 index 000000000000..71cb21c2b98e --- /dev/null +++ b/mail-mta/qpsmtpd/files/qpsmtpd.xinetd @@ -0,0 +1,20 @@ +# default: off +# description: The telnet server serves telnet sessions; it uses \ +# unencrypted username/password pairs for authentication. + +service smtp +{ + flags = REUSE + socket_type = stream + wait = no + user = smtpd + group = smtpd + groups = yes + log_on_failure += USERID HOST + disable = yes + rlimit_as = 128M + instances = 40 + per_source = 10 + cps = 50 10 + server = /usr/bin/qpsmtpd +} -- cgit v1.2.3-65-gdbad