diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2012-02-29 09:33:37 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2012-02-29 09:33:37 +0000 |
commit | abe0d030f3cdfd9fe542ec5a63b9b815a1d38786 (patch) | |
tree | 5b7a9bd02e72e484a9a5b12354278d11c22e3624 /mail-mta | |
parent | Version bump via perl-bump experimental tool. (diff) | |
download | gentoo-2-abe0d030f3cdfd9fe542ec5a63b9b815a1d38786.tar.gz gentoo-2-abe0d030f3cdfd9fe542ec5a63b9b815a1d38786.tar.bz2 gentoo-2-abe0d030f3cdfd9fe542ec5a63b9b815a1d38786.zip |
Version bump and fix for mails with no body (submitted upstream).
(Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
Diffstat (limited to 'mail-mta')
-rw-r--r-- | mail-mta/qpsmtpd/ChangeLog | 10 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/files/qpsmtpd-0.83-accept-empty-email.patch | 44 | ||||
-rw-r--r-- | mail-mta/qpsmtpd/qpsmtpd-0.84.ebuild | 80 |
3 files changed, 132 insertions, 2 deletions
diff --git a/mail-mta/qpsmtpd/ChangeLog b/mail-mta/qpsmtpd/ChangeLog index 1e8f9acc9705..56d378eec3af 100644 --- a/mail-mta/qpsmtpd/ChangeLog +++ b/mail-mta/qpsmtpd/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for mail-mta/qpsmtpd -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/qpsmtpd/ChangeLog,v 1.12 2011/09/20 22:49:28 mgorny Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/qpsmtpd/ChangeLog,v 1.13 2012/02/29 09:33:37 robbat2 Exp $ + +*qpsmtpd-0.84 (29 Feb 2012) + + 29 Feb 2012; Robin H. Johnson <robbat2@gentoo.org> + +files/qpsmtpd-0.83-accept-empty-email.patch, +qpsmtpd-0.84.ebuild: + Version bump and fix for mails with no body (submitted upstream). 20 Sep 2011; Michał Górny <mgorny@gentoo.org> qpsmtpd-9999.ebuild: Migrate to git-2. 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/qpsmtpd-0.84.ebuild b/mail-mta/qpsmtpd/qpsmtpd-0.84.ebuild new file mode 100644 index 000000000000..e8324d860e38 --- /dev/null +++ b/mail-mta/qpsmtpd/qpsmtpd-0.84.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/qpsmtpd/qpsmtpd-0.84.ebuild,v 1.1 2012/02/29 09:33:37 robbat2 Exp $ + +EAPI=2 + +inherit eutils perl-app + +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="as-is" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="postfix ipv6 syslog" + +RDEPEND=">=dev-lang/perl-5.8.0 + dev-perl/Net-DNS + 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 +} + +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 + else + sed -i -e '/^#logging\/file/s,^#,,g' "${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.plugins STATUS + + diropts -m 0755 -o smtpd -g smtpd + dodir /var/spool/qpsmtpd /var/run/qpsmtpd /var/log/qpsmtpd + keepdir /var/spool/qpsmtpd /var/run/qpsmtpd /var/log/qpsmtpd + +} |