summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /mail-mta/qpsmtpd
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
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 <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'mail-mta/qpsmtpd')
-rw-r--r--mail-mta/qpsmtpd/Manifest2
-rw-r--r--mail-mta/qpsmtpd/files/qpsmtpd-0.40-badrcptto_allowrelay.patch10
-rw-r--r--mail-mta/qpsmtpd/files/qpsmtpd-0.83-accept-empty-email.patch44
-rw-r--r--mail-mta/qpsmtpd/files/qpsmtpd-0.83-clamd_conf.patch12
-rw-r--r--mail-mta/qpsmtpd/files/qpsmtpd-0.84-Net-DNS-id.patch28
-rw-r--r--mail-mta/qpsmtpd/files/qpsmtpd.confd25
-rw-r--r--mail-mta/qpsmtpd/files/qpsmtpd.envd2
-rw-r--r--mail-mta/qpsmtpd/files/qpsmtpd.initd62
-rw-r--r--mail-mta/qpsmtpd/files/qpsmtpd.initd-r162
-rw-r--r--mail-mta/qpsmtpd/files/qpsmtpd.xinetd20
-rw-r--r--mail-mta/qpsmtpd/metadata.xml8
-rw-r--r--mail-mta/qpsmtpd/qpsmtpd-0.84-r2.ebuild81
-rw-r--r--mail-mta/qpsmtpd/qpsmtpd-0.95.ebuild93
-rw-r--r--mail-mta/qpsmtpd/qpsmtpd-9999.ebuild76
14 files changed, 525 insertions, 0 deletions
diff --git a/mail-mta/qpsmtpd/Manifest b/mail-mta/qpsmtpd/Manifest
new file mode 100644
index 000000000000..f1274c3de499
--- /dev/null
+++ b/mail-mta/qpsmtpd/Manifest
@@ -0,0 +1,2 @@
+DIST qpsmtpd-0.84.tar.gz 178260 SHA256 a09865816322531edd59d6fecd4bda35a9d583610b69d69a86e44038da841c98 SHA512 a12491c123d21b4e3965105bbe88ad7e7e61551a3ff4e96eee78c83dcb2afae62239fa24d710092a7ccf60097699901c42d70df8183de6454bef4fb26843358d WHIRLPOOL dfc0049faebbbe203949b24fc6d49213c606f5fbe24b4df35b2be8c8cc77d2350719f304a9c7f16782a67d64a5101debb03baa204d91f97adeaa072bf942a3fb
+DIST qpsmtpd-0.95.tar.gz 367400 SHA256 ec5a7d202f4a90ef1df5581c669440082cd5a4c24f5cf4b86f23b323835c7fdb SHA512 4265606ecde68eda92091e2c3c27645baa131db4197f3d135932dc2ad8d76c1fb6c25ce267ab421cab3a4a9902aa682e4be87a1228e41b226705a64e440ffe87 WHIRLPOOL ea927d322d5b5bb82eb80e279e5ca9f461afd42bbb0922470cf97ca8e87578ae968116ccc263eec57676ca2fa3b4b582a11757f6eb9c15c100664451f989d3cd
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 <robbat2@gentoo.org>
+Thanks-To: Jack Bates <ms419@freezone.co.uk>
+
+--- 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 <robbat2@gentoo.org>
+
+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
+}
diff --git a/mail-mta/qpsmtpd/metadata.xml b/mail-mta/qpsmtpd/metadata.xml
new file mode 100644
index 000000000000..3bf0de5331b2
--- /dev/null
+++ b/mail-mta/qpsmtpd/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>net-mail</herd>
+<use>
+ <flag name='postfix'>create user with permissions for proper postfix interaction</flag>
+</use>
+</pkgmetadata>
diff --git a/mail-mta/qpsmtpd/qpsmtpd-0.84-r2.ebuild b/mail-mta/qpsmtpd/qpsmtpd-0.84-r2.ebuild
new file mode 100644
index 000000000000..81ace43134ba
--- /dev/null
+++ b/mail-mta/qpsmtpd/qpsmtpd-0.84-r2.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils perl-app user
+
+DESCRIPTION="qpsmtpd is a flexible smtpd daemon written in Perl"
+HOMEPAGE="http://smtpd.develooper.com"
+SRC_URI="http://smtpd.develooper.com/files/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="postfix ipv6 syslog"
+
+RDEPEND=">=dev-lang/perl-5.8.0
+ >=dev-perl/Net-DNS-0.690.0
+ virtual/perl-MIME-Base64
+ dev-perl/MailTools
+ dev-perl/IPC-Shareable
+ dev-perl/Socket6
+ dev-perl/Danga-Socket
+ dev-perl/ParaDNS
+ ipv6? ( dev-perl/IO-Socket-INET6 )
+ syslog? ( virtual/perl-Sys-Syslog )
+ virtual/inetd"
+
+pkg_setup() {
+ enewgroup smtpd
+ local additional_groups
+ if use postfix; then
+ additional_groups="${additional_groups},postdrop"
+ fi
+ enewuser smtpd -1 -1 /var/spool/qpsmtpd smtpd${additional_groups}
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.40-badrcptto_allowrelay.patch
+ #epatch "${FILESDIR}"/${PN}-0.83-clamd_conf.patch
+ epatch "${FILESDIR}"/${PN}-0.83-accept-empty-email.patch
+ epatch "${FILESDIR}"/${PN}-0.84-Net-DNS-id.patch
+}
+
+src_install() {
+ perl-module_src_install
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/qpsmtpd.xinetd qpsmtpd
+
+ dodir /usr/share/qpsmtpd
+ cp -Rf plugins "${D}"/usr/share/qpsmtpd/
+
+ insinto /etc/qpsmtpd
+ doins config.sample/*
+
+ echo "/usr/share/qpsmtpd/plugins" > "${D}"/etc/qpsmtpd/plugin_dirs
+ echo "/var/spool/qpsmtpd" > "${D}"/etc/qpsmtpd/spool_dir
+ cat >"${D}"/etc/qpsmtpd/logging <<-EOF
+ #logging/syslog loglevel LOGINFO priority LOG_NOTICE
+ #logging/file loglevel LOGINFO /var/log/qpsmtpd/%Y-%m-%d
+ EOF
+ if use syslog; then
+ sed -i -e '/^#logging\/syslog/s,^#,,g' "${D}"/etc/qpsmtpd/logging || die
+ else
+ sed -i -e '/^#logging\/file/s,^#,,g' "${D}"/etc/qpsmtpd/logging || die
+ fi
+
+ newenvd "${FILESDIR}"/qpsmtpd.envd 99qpsmtpd
+
+ newconfd "${FILESDIR}"/qpsmtpd.confd qpsmtpd
+ newinitd "${FILESDIR}"/qpsmtpd.initd-r1 qpsmtpd
+
+ dodoc CREDITS Changes README README.plugins STATUS
+
+ diropts -m 0755 -o smtpd -g smtpd
+ dodir /var/spool/qpsmtpd /var/log/qpsmtpd
+ keepdir /var/spool/qpsmtpd /var/log/qpsmtpd
+
+}
diff --git a/mail-mta/qpsmtpd/qpsmtpd-0.95.ebuild b/mail-mta/qpsmtpd/qpsmtpd-0.95.ebuild
new file mode 100644
index 000000000000..893606941793
--- /dev/null
+++ b/mail-mta/qpsmtpd/qpsmtpd-0.95.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+[[ ${PV} == *9999 ]] && SCM="git-2"
+inherit eutils perl-app user ${SCM}
+
+DESCRIPTION="qpsmtpd is a flexible smtpd daemon written in Perl"
+HOMEPAGE="http://smtpd.develooper.com"
+KEYWORDS=""
+if [[ ${PV} != *9999 ]]; then
+ SRC_URI="https://github.com/smtpd/qpsmtpd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+else
+ # This is a spotted development fork with many improvements
+EGIT_REPO_URI="git://github.com/qpsmtpd-dev/qpsmtpd-dev.git
+ https://github.com/qpsmtpd-dev/qpsmtpd-dev.git"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE="postfix ipv6 syslog"
+
+RDEPEND=">=dev-lang/perl-5.8.0
+ >=dev-perl/Net-DNS-0.690.0
+ virtual/perl-MIME-Base64
+ dev-perl/MailTools
+ dev-perl/IPC-Shareable
+ dev-perl/Socket6
+ dev-perl/Danga-Socket
+ dev-perl/ParaDNS
+ dev-perl/UNIVERSAL-isa
+ ipv6? ( dev-perl/IO-Socket-INET6 )
+ syslog? ( virtual/perl-Sys-Syslog )
+ virtual/inetd"
+
+pkg_setup() {
+ enewgroup smtpd
+ local additional_groups
+ if use postfix; then
+ additional_groups="${additional_groups},postdrop"
+ fi
+ enewuser smtpd -1 -1 /var/spool/qpsmtpd smtpd${additional_groups}
+}
+
+src_unpack() {
+ if [[ ${PV} != *9999 ]]; then
+ unpack ${A}
+ cd "${S}"
+ else
+ git-2_src_unpack
+ cd "${S}"
+ fi
+}
+
+src_install() {
+ perl-module_src_install
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/qpsmtpd.xinetd qpsmtpd
+
+ dodir /usr/share/qpsmtpd
+ cp -Rf plugins "${D}"/usr/share/qpsmtpd/
+
+ diropts -m 0755 -o smtpd -g smtpd
+ dodir /var/spool/qpsmtpd
+ keepdir /var/spool/qpsmtpd
+
+ dodir /etc/qpsmtpd
+ insinto /etc/qpsmtpd
+ doins config.sample/*
+
+ echo "/usr/share/qpsmtpd/plugins" > "${D}"/etc/qpsmtpd/plugin_dirs
+ echo "/var/spool/qpsmtpd" > "${D}"/etc/qpsmtpd/spool_dir
+ if use syslog; then
+ echo "logging/syslog loglevel LOGINFO priority LOG_NOTICE" > "${D}"/etc/qpsmtpd/logging
+ else
+ diropts -m 0755 -o smtpd -g smtpd
+ dodir /var/log/qpsmtpd
+ keepdir /var/log/qpsmtpd
+ echo "logging/file loglevel LOGINFO /var/log/qpsmtpd/%Y-%m-%d" > "${D}"/etc/qpsmtpd/logging
+ fi
+
+ newenvd "${FILESDIR}"/qpsmtpd.envd 99qpsmtpd
+
+ newconfd "${FILESDIR}"/qpsmtpd.confd qpsmtpd
+ newinitd "${FILESDIR}"/qpsmtpd.initd-r1 qpsmtpd
+
+ dodoc CREDITS Changes README.md README.plugins.md STATUS UPGRADING.md
+}
diff --git a/mail-mta/qpsmtpd/qpsmtpd-9999.ebuild b/mail-mta/qpsmtpd/qpsmtpd-9999.ebuild
new file mode 100644
index 000000000000..f9b0d501a8e3
--- /dev/null
+++ b/mail-mta/qpsmtpd/qpsmtpd-9999.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils perl-app user git-2
+
+DESCRIPTION="qpsmtpd is a flexible smtpd daemon written in Perl"
+HOMEPAGE="http://smtpd.develooper.com"
+# This is a spotted development fork with many improvements
+EGIT_REPO_URI="git://github.com/qpsmtpd-dev/qpsmtpd-dev.git
+ https://github.com/qpsmtpd-dev/qpsmtpd-dev.git"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE="postfix ipv6 syslog"
+
+RDEPEND=">=dev-lang/perl-5.8.0
+ >=dev-perl/Net-DNS-0.690.0
+ virtual/perl-MIME-Base64
+ dev-perl/MailTools
+ dev-perl/IPC-Shareable
+ dev-perl/Socket6
+ dev-perl/Danga-Socket
+ dev-perl/ParaDNS
+ dev-perl/UNIVERSAL-isa
+ ipv6? ( dev-perl/IO-Socket-INET6 )
+ syslog? ( virtual/perl-Sys-Syslog )
+ virtual/inetd"
+
+pkg_setup() {
+ enewgroup smtpd
+ local additional_groups
+ if use postfix; then
+ additional_groups="${additional_groups},postdrop"
+ fi
+ enewuser smtpd -1 -1 /var/spool/qpsmtpd smtpd${additional_groups}
+}
+
+src_install() {
+ perl-module_src_install
+
+ insinto /etc/xinetd.d
+ newins "${FILESDIR}"/qpsmtpd.xinetd qpsmtpd
+
+ dodir /usr/share/qpsmtpd
+ cp -Rf plugins "${D}"/usr/share/qpsmtpd/
+
+ diropts -m 0755 -o smtpd -g smtpd
+ dodir /var/spool/qpsmtpd
+ keepdir /var/spool/qpsmtpd
+
+ dodir /etc/qpsmtpd
+ insinto /etc/qpsmtpd
+ doins config.sample/*
+
+ echo "/usr/share/qpsmtpd/plugins" > "${D}"/etc/qpsmtpd/plugin_dirs
+ echo "/var/spool/qpsmtpd" > "${D}"/etc/qpsmtpd/spool_dir
+ if use syslog; then
+ echo "logging/syslog loglevel LOGINFO priority LOG_NOTICE" > "${D}"/etc/qpsmtpd/logging
+ else
+ diropts -m 0755 -o smtpd -g smtpd
+ dodir /var/log/qpsmtpd
+ keepdir /var/log/qpsmtpd
+ echo "logging/file loglevel LOGINFO /var/log/qpsmtpd/%Y-%m-%d" > "${D}"/etc/qpsmtpd/logging
+ fi
+
+ newenvd "${FILESDIR}"/qpsmtpd.envd 99qpsmtpd
+
+ newconfd "${FILESDIR}"/qpsmtpd.confd qpsmtpd
+ newinitd "${FILESDIR}"/qpsmtpd.initd-r1 qpsmtpd
+
+ dodoc CREDITS Changes README.md README.plugins.md STATUS UPGRADING.md
+}