diff options
author | Markus Ullmann <jokey@gentoo.org> | 2008-09-28 19:36:16 +0000 |
---|---|---|
committer | Markus Ullmann <jokey@gentoo.org> | 2008-09-28 19:36:16 +0000 |
commit | 20e9fcf1ec26c0252ae0ec50c590b129f42b552b (patch) | |
tree | 0ae39f1176c90f66fcb60e7f0101ee2da3ee3dc3 /mail-mta/qpsmtpd | |
parent | Import some init script fixes and ebuild improvements from Daniel Pielmeier. ... (diff) | |
download | historical-20e9fcf1ec26c0252ae0ec50c590b129f42b552b.tar.gz historical-20e9fcf1ec26c0252ae0ec50c590b129f42b552b.tar.bz2 historical-20e9fcf1ec26c0252ae0ec50c590b129f42b552b.zip |
Initial import, also fixes bug #167930. Thanks to various people contributing on bugzie and on irc
Package-Manager: portage-2.2_rc11/cvs/Linux 2.6.26-gentoo-r1 i686
Diffstat (limited to 'mail-mta/qpsmtpd')
-rw-r--r-- | mail-mta/qpsmtpd/ChangeLog | 17 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/Manifest | 22 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/files/qpsmtpd-0.40-badhelo_disconnect.patch | 11 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/files/qpsmtpd-0.40-badrcptto_allowrelay.patch | 10 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/files/qpsmtpd-0.40-clamd_conf.patch | 12 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/files/qpsmtpd-0.40-peer_hooks.patch | 36 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/files/qpsmtpd-0.43-peer_hooks.patch | 36 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/files/qpsmtpd.confd | 25 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/files/qpsmtpd.envd | 2 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/files/qpsmtpd.initd | 60 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/files/qpsmtpd.xinetd | 20 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/metadata.xml | 13 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/qpsmtpd-0.43_rc2_pre945.ebuild | 86 |
13 files changed, 350 insertions, 0 deletions
diff --git a/mail-mta/qpsmtpd/ChangeLog b/mail-mta/qpsmtpd/ChangeLog new file mode 100644 index 000000000000..8dd65b5af6b3 --- /dev/null +++ b/mail-mta/qpsmtpd/ChangeLog @@ -0,0 +1,17 @@ +# ChangeLog for mail-mta/qpsmtpd +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/qpsmtpd/ChangeLog,v 1.1 2008/09/28 19:36:15 jokey Exp $ + +*qpsmtpd-0.43_rc2_pre945 (28 Sep 2008) + + 28 Sep 2008; Markus Ullmann <jokey@gentoo.org> + +files/qpsmtpd-0.40-badhelo_disconnect.patch, + +files/qpsmtpd-0.40-badrcptto_allowrelay.patch, + +files/qpsmtpd-0.40-clamd_conf.patch, + +files/qpsmtpd-0.40-peer_hooks.patch, + +files/qpsmtpd-0.43-peer_hooks.patch, +files/qpsmtpd.confd, + +files/qpsmtpd.envd, +files/qpsmtpd.initd, +files/qpsmtpd.xinetd, + +metadata.xml, +qpsmtpd-0.43_rc2_pre945.ebuild: + Initial import, also fixes bug #167930. Thanks to various people + contributing on bugzie and on irc + diff --git a/mail-mta/qpsmtpd/Manifest b/mail-mta/qpsmtpd/Manifest new file mode 100644 index 000000000000..029af57abc09 --- /dev/null +++ b/mail-mta/qpsmtpd/Manifest @@ -0,0 +1,22 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX qpsmtpd-0.40-badhelo_disconnect.patch 520 RMD160 f4e72cbe1d769206f719d0f3eff3c14a9216a1b8 SHA1 24ec87ae2cf9e95a8850640081b1a6594a030360 SHA256 f93dff30d7a6837b8b3e5b4b6ef9b02bb4fdeb58499e54f4d94d43668ad82970 +AUX qpsmtpd-0.40-badrcptto_allowrelay.patch 498 RMD160 8afc719f895da5aeb9a8333daaf0b690eb44d56b SHA1 2f5d4d34560415000bc0319b5bfe993f6734ea43 SHA256 f0bc5f9d4865084ef673e5271725dd01ec1d3fbfcf4ea47988d728c5acd14acf +AUX qpsmtpd-0.40-clamd_conf.patch 707 RMD160 819b17f489ca014d3552243af15084ea6ec4fa56 SHA1 9dd3aed08fa07e7748342c9743bc29a5440e5f50 SHA256 bedc83603a4411670d4926366d0c23b0ebcf5ec00aed4621135e66c25319d927 +AUX qpsmtpd-0.40-peer_hooks.patch 1681 RMD160 8aef8e002662b833b4cb44b02bd5de5439c2fa8f SHA1 d60bb457648a66c1e85649ad9d3a414bcf4a9cad SHA256 f2b73ddd6c27b40738b15092db6c5557e0444f2ce3e93687256ad7c2e97283f3 +AUX qpsmtpd-0.43-peer_hooks.patch 1698 RMD160 c9b270b43978fcdd570a288accd548c121b626ec SHA1 118b2c20e3566400a333af090b7299bce8dde4f7 SHA256 2eb53a921f01811ca6cdd550337c63c395f6ff48d809c0f9960ba8005505e363 +AUX qpsmtpd.confd 617 RMD160 3b95ace716df3f61f9280ca783dbef43e6ee23ac SHA1 b409a52c77fad35b1a6f3c4e7eb65a7fb78cea89 SHA256 7748b525d9c3a3e8cbeec66b8b5df48510a44a1d624168278ce71720e7de8bc0 +AUX qpsmtpd.envd 74 RMD160 963ae15c132be3f99226bf5efed7da5b8f3c2570 SHA1 3a9975274ee6b8cbf2158b5643bd692291625fe8 SHA256 bbf8f40198e8a87ff6103b5dc98cae561f0dc9738a6cda3492b00468fbfdfd8e +AUX qpsmtpd.initd 2068 RMD160 5a809569722c8930bd4cc4d6b8bfd458fca2056d SHA1 2ebdb7ef090fcf56a6eb69540bef88600edf15b6 SHA256 13473280234660bb314289d79c79c57a5e25a2be913469cdb4ab66fefcfc14ce +AUX qpsmtpd.xinetd 526 RMD160 040c159e3c637dc00f1816088852207766c286fa SHA1 81deb67094386ab4ae341572270c47c140f16e89 SHA256 45729911251be13007d95bb9e25b6c9c951a6419b8badae4e4097dfc603edcdd +EBUILD qpsmtpd-0.43_rc2_pre945.ebuild 2524 RMD160 4797f81615a919d37cee33737bede69963bdb9c2 SHA1 a149c7bb046de0ad3596d61fb813486fe77b135f SHA256 1655989978cf503ff715ec4c838f1f40045b498141696edbc13b6079a6c0b621 +MISC ChangeLog 755 RMD160 bd8dd95565b3193a0a8abd54bb63ab976000fe15 SHA1 519168d5294526301c8a39d58367cc02c8bfc0e2 SHA256 ca1f034bcffc430e9fd163bb7411f52941d04389cc754975d53f69247be1a3cc +MISC metadata.xml 457 RMD160 ef0bc86d5d36b2c521734032affd9ce12bb49f41 SHA1 a09d61be78d136276722c8aaa9982753f29cf8c9 SHA256 e96e57b03697623fd678d14bc74f6597990f2cb3083db4b64b18eb2671c6f5d5 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.9 (GNU/Linux) + +iEYEARECAAYFAkjf3LIACgkQz974XjDVpbl+KACg2dCDguI4vW7dlHJmvOiXSca6 +V/oAn2WMsV5Uzvr2+feQosqA9C4vPhnj +=RxGz +-----END PGP SIGNATURE----- diff --git a/mail-mta/qpsmtpd/files/qpsmtpd-0.40-badhelo_disconnect.patch b/mail-mta/qpsmtpd/files/qpsmtpd-0.40-badhelo_disconnect.patch new file mode 100644 index 000000000000..6d8b88ca6966 --- /dev/null +++ b/mail-mta/qpsmtpd/files/qpsmtpd-0.40-badhelo_disconnect.patch @@ -0,0 +1,11 @@ +--- qpsmtpd-0.40/plugins/check_spamhelo.badhelo_disconnect 2007-06-14 11:57:24.000000000 -0600 ++++ qpsmtpd-0.40/plugins/check_spamhelo 2007-06-14 13:21:45.000000000 -0600 +@@ -23,7 +23,7 @@ + for my $bad ($self->qp->config('badhelo')) { + if ($host eq lc $bad) { + $self->log(LOGDEBUG, "Denying HELO from host claiming to be $bad"); +- return (DENY, "Sorry, I don't believe that you are $host."); ++ return (DENY_DISCONNECT, "Sorry, I don't believe that you are $host."); + } + } + return DECLINED; 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.40-clamd_conf.patch b/mail-mta/qpsmtpd/files/qpsmtpd-0.40-clamd_conf.patch new file mode 100644 index 000000000000..b1e0f8079def --- /dev/null +++ b/mail-mta/qpsmtpd/files/qpsmtpd-0.40-clamd_conf.patch @@ -0,0 +1,12 @@ +diff -Nur -x '*.orig' -x '*.rej' qpsmtpd-0.40/plugins/virus/clamav mezzanine_patched_qpsmtpd-0.40/plugins/virus/clamav +--- qpsmtpd-0.40/plugins/virus/clamav 2007-06-14 11:57:23.000000000 -0600 ++++ mezzanine_patched_qpsmtpd-0.40/plugins/virus/clamav 2007-06-15 13:37:26.000000000 -0600 +@@ -148,7 +148,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 + + unless ($self->{_spool_dir}) { + $self->log(LOGERROR, "No spool dir configuration found"); diff --git a/mail-mta/qpsmtpd/files/qpsmtpd-0.40-peer_hooks.patch b/mail-mta/qpsmtpd/files/qpsmtpd-0.40-peer_hooks.patch new file mode 100644 index 000000000000..fd6ccbfc79ad --- /dev/null +++ b/mail-mta/qpsmtpd/files/qpsmtpd-0.40-peer_hooks.patch @@ -0,0 +1,36 @@ +--- qpsmtpd-0.40/lib/Qpsmtpd/SMTP.pm.peer_hooks 2007-06-14 11:57:27.000000000 -0600 ++++ qpsmtpd-0.40/lib/Qpsmtpd/SMTP.pm 2007-06-14 13:44:52.000000000 -0600 +@@ -95,6 +95,11 @@ + my $self = shift; + # this should maybe be called something else than "connect", see + # lib/Qpsmtpd/TcpServer.pm for more confusion. ++ my ($rc, $msg) = $self->run_hooks("set_hooks"); ++ if ($rc == DENY) { ++ $self->respond(550, ($msg || 'Connection from you denied, bye bye.')); ++ return $rc; ++ } + $self->run_hooks("connect"); + return DONE; + } +@@ -278,7 +283,9 @@ + + # if we don't have a plugin implementing this auth mechanism, 504 + if( exists $auth_mechanisms{uc($mechanism)} ) { +- return $self->{_auth} = Qpsmtpd::Auth::SASL( $self, $mechanism, @stuff ); ++ $self->{_auth} = Qpsmtpd::Auth::SASL( $self, $mechanism, @stuff ); ++ $self->run_hooks("valid_auth") if $self->{_auth} == OK; ++ return $self->{_auth}; + } else { + $self->respond( 504, "Unimplemented authentification mechanism: $mechanism" ); + return DENY; +--- qpsmtpd-0.40/lib/Qpsmtpd/Plugin.pm.peer_hooks 2007-06-14 11:57:27.000000000 -0600 ++++ qpsmtpd-0.40/lib/Qpsmtpd/Plugin.pm 2007-06-14 13:43:53.000000000 -0600 +@@ -6,7 +6,7 @@ + our @hooks = qw( + logging config pre-connection connect ehlo_parse ehlo + helo_parse helo auth_parse auth auth-plain auth-login auth-cram-md5 +- rcpt_parse rcpt_pre rcpt mail_parse mail mail_pre ++ valid_auth set_hooks rcpt_parse rcpt_pre rcpt mail_parse mail mail_pre + data data_post queue_pre queue queue_post + quit reset_transaction disconnect post-connection + unrecognized_command deny ok received_line diff --git a/mail-mta/qpsmtpd/files/qpsmtpd-0.43-peer_hooks.patch b/mail-mta/qpsmtpd/files/qpsmtpd-0.43-peer_hooks.patch new file mode 100644 index 000000000000..f959bb0678a8 --- /dev/null +++ b/mail-mta/qpsmtpd/files/qpsmtpd-0.43-peer_hooks.patch @@ -0,0 +1,36 @@ +--- qpsmtpd-0.40/lib/Qpsmtpd/SMTP.pm.peer_hooks 2007-06-14 11:57:27.000000000 -0600 ++++ qpsmtpd-0.40/lib/Qpsmtpd/SMTP.pm 2007-06-14 13:44:52.000000000 -0600 +@@ -95,6 +95,11 @@ + my $self = shift; + # this should maybe be called something else than "connect", see + # lib/Qpsmtpd/TcpServer.pm for more confusion. ++ my ($rc, $msg) = $self->run_hooks("set_hooks"); ++ if ($rc == DENY) { ++ $self->respond(550, ($msg || 'Connection from you denied, bye bye.')); ++ return $rc; ++ } + $self->run_hooks("connect"); + return DONE; + } +@@ -278,7 +283,9 @@ + + # if we don't have a plugin implementing this auth mechanism, 504 + if( exists $auth_mechanisms{uc($mechanism)} ) { +- return $self->{_auth} = Qpsmtpd::Auth::SASL( $self, $mechanism, @stuff ); ++ $self->{_auth} = Qpsmtpd::Auth::SASL( $self, $mechanism, @stuff ); ++ $self->run_hooks("valid_auth") if $self->{_auth} == OK; ++ return $self->{_auth}; + } else { + $self->respond( 504, "Unimplemented authentification mechanism: $mechanism" ); + return DENY; +--- qpsmtpd-0.40/lib/Qpsmtpd//Plugin.pm.peer_hooks 2008-03-25 02:02:37.000000000 +0000 ++++ qpsmtpd-0.40/lib/Qpsmtpd//Plugin.pm 2008-03-25 02:04:00.000000000 +0000 +@@ -6,7 +6,7 @@ + our @hooks = qw( + logging config pre-connection connect ehlo_parse ehlo + helo_parse helo auth_parse auth auth-plain auth-login auth-cram-md5 +- rcpt_parse rcpt_pre rcpt mail_parse mail mail_pre ++ valid_auth set_hooks rcpt_parse rcpt_pre rcpt mail_parse mail mail_pre + data data_post queue_pre queue queue_post vrfy noop + quit reset_transaction disconnect post-connection + unrecognized_command deny ok received_line help 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..4624304884f4 --- /dev/null +++ b/mail-mta/qpsmtpd/files/qpsmtpd.initd @@ -0,0 +1,60 @@ +#!/sbin/runscript + +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 /var/run/qpsmtpd.pid" + myopts="${myopts} --make-pidfile --pidfile /var/run/qpsmtpd.pid" + ;; + async) + QPSMTPD_SERVER_BIN="/usr/sbin/qpsmtpd-async" + myopts="${myopts} --background --make-pidfile --pidfile /var/run/qpsmtpd.pid" + ;; + 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 /var/run/qpsmtpd.pid --detach" + myopts="${myopts} --pidfile /dev/null" + ;; + 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 /var/run/qpsmtpd.pid + 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..f9e5fe681d13 --- /dev/null +++ b/mail-mta/qpsmtpd/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>net-mail</herd> +<maintainer> + <email>jokey@gentoo.org</email> + <name>Markus Ullmann</name> +</maintainer> +<use> + <flag name='async'>Add deps + support for asynchronous mail reception/processing</flag> + <flag name='postfix'>create user with permissions for proper postfix interaction</flag> +</use> +</pkgmetadata> diff --git a/mail-mta/qpsmtpd/qpsmtpd-0.43_rc2_pre945.ebuild b/mail-mta/qpsmtpd/qpsmtpd-0.43_rc2_pre945.ebuild new file mode 100644 index 000000000000..0db37c0004a3 --- /dev/null +++ b/mail-mta/qpsmtpd/qpsmtpd-0.43_rc2_pre945.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/qpsmtpd/qpsmtpd-0.43_rc2_pre945.ebuild,v 1.1 2008/09/28 19:36:15 jokey Exp $ + +inherit eutils subversion +REVNO=${PV/0.43_rc2_pre} +DESCRIPTION="qpsmtpd is a flexible smtpd daemon written in Perl" +HOMEPAGE="http://gatling.ikk.sztaki.hu/~kissg/pd/pista/pista.html" +ESVN_REPO_URI="http://svn.perl.org/qpsmtpd/trunk@${REVNO}" +ESVN_PROJECT="qpsmtpd" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="" +IUSE="postfix async ipv6 syslog" + +RDEPEND=">=dev-lang/perl-5.8.0 + dev-perl/Net-DNS + virtual/perl-MIME-Base64 + dev-perl/MailTools + async? ( 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_unpack() { + subversion_src_unpack + epatch "${FILESDIR}"/${PN}-0.40-badhelo_disconnect.patch + epatch "${FILESDIR}"/${PN}-0.40-badrcptto_allowrelay.patch + epatch "${FILESDIR}"/${PN}-0.43-peer_hooks.patch + epatch "${FILESDIR}"/${PN}-0.40-clamd_conf.patch +} + +src_compile() { + perl Makefile.PL PREFIX=/usr || die "Running Makefile.PL failed" + emake || die "make failed" +} + +src_install() { + emake install DESTDIR="${D}" || die "emake install failed" + + 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 || die "Installing conf.d file" + newinitd "${FILESDIR}"/qpsmtpd.initd qpsmtpd || die "Installing init.d file" + + dodoc CREDITS Changes README README.authentication README.logging README.plugins STATUS +} |