r64813 - in /trunk/libmail-deliverystatus-bounceparser-perl: ./ debian/ inc/Module/ inc/Module/Install/ lib/Mail/DeliveryStatus/ t/ t/corpus/

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Fri Nov 12 21:57:40 UTC 2010


Author: gregoa
Date: Fri Nov 12 21:57:33 2010
New Revision: 64813

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=64813
Log:
New upstream release.

Added:
    trunk/libmail-deliverystatus-bounceparser-perl/t/aol-vacation.t
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/aol-vacation.t
    trunk/libmail-deliverystatus-bounceparser-perl/t/autoreply.t
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/autoreply.t
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/aol-vacation.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/aol-vacation.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/autoreply.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/autoreply.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/cam-unknown.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/cam-unknown.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/deactivated-mailbox.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/deactivated-mailbox.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/mailbox-unknown.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/mailbox-unknown.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/malformed-dns.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/malformed-dns.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/me-user-unknown.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/me-user-unknown.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/message-too-large.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/message-too-large.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/no-such-domain.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/no-such-domain.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/polish-autoreply.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/polish-autoreply.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/polish-unknown.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/polish-unknown.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/quota-5.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/quota-5.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/rcpt-dne.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/rcpt-dne.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/rcpthosts.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/rcpthosts.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/spam-rejection4.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/spam-rejection4.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/spam-rejection5.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/spam-rejection5.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/spam-rejection6.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/spam-rejection6.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/spam-rejection7.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/spam-rejection7.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/user-unknown-dne.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/user-unknown-dne.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/user-unknown-polish.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/user-unknown-polish.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/warning-8.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/warning-8.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/whitelist.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/whitelist.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/corpus/yahoo-user-unknown.msg
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/corpus/yahoo-user-unknown.msg
    trunk/libmail-deliverystatus-bounceparser-perl/t/malformed-dns.t
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/malformed-dns.t
    trunk/libmail-deliverystatus-bounceparser-perl/t/message-too-large.t
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/message-too-large.t
    trunk/libmail-deliverystatus-bounceparser-perl/t/polish-autoreply.t
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/polish-autoreply.t
    trunk/libmail-deliverystatus-bounceparser-perl/t/quota-5.t
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/quota-5.t
    trunk/libmail-deliverystatus-bounceparser-perl/t/rcpthosts.t
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/rcpthosts.t
    trunk/libmail-deliverystatus-bounceparser-perl/t/spam-rejection4.t
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/spam-rejection4.t
    trunk/libmail-deliverystatus-bounceparser-perl/t/spam-rejection5.t
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/spam-rejection5.t
    trunk/libmail-deliverystatus-bounceparser-perl/t/spam-rejection6.t
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/spam-rejection6.t
    trunk/libmail-deliverystatus-bounceparser-perl/t/spam-rejection7.t
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/spam-rejection7.t
    trunk/libmail-deliverystatus-bounceparser-perl/t/whitelist.t
      - copied unchanged from r64812, branches/upstream/libmail-deliverystatus-bounceparser-perl/current/t/whitelist.t
Removed:
    trunk/libmail-deliverystatus-bounceparser-perl/META.yml
Modified:
    trunk/libmail-deliverystatus-bounceparser-perl/Changes
    trunk/libmail-deliverystatus-bounceparser-perl/MANIFEST
    trunk/libmail-deliverystatus-bounceparser-perl/README
    trunk/libmail-deliverystatus-bounceparser-perl/debian/changelog
    trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install.pm
    trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Base.pm
    trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Can.pm
    trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Fetch.pm
    trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Makefile.pm
    trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Metadata.pm
    trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Win32.pm
    trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/WriteAll.pm
    trunk/libmail-deliverystatus-bounceparser-perl/lib/Mail/DeliveryStatus/BounceParser.pm
    trunk/libmail-deliverystatus-bounceparser-perl/lib/Mail/DeliveryStatus/Report.pm
    trunk/libmail-deliverystatus-bounceparser-perl/t/various-domain.t
    trunk/libmail-deliverystatus-bounceparser-perl/t/various-unknown.t
    trunk/libmail-deliverystatus-bounceparser-perl/t/warnings.t

Modified: trunk/libmail-deliverystatus-bounceparser-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/Changes?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/Changes (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/Changes Fri Nov 12 21:57:33 2010
@@ -1,4 +1,11 @@
 Revision history for Perl extension Mail::DeliveryStatus::BounceParser.
+
+1.525   2010-10-30
+        (all changes by mstevens)
+
+        domain_error now reported for bounces due to DNS error (5.4.4, etc)
+        message_too_large now reported for oversize deliveries
+        messages from challenge/response systems should be identified
 
 1.524   2010-06-10
         test for more cases of over quota and spam (mstevens)

Modified: trunk/libmail-deliverystatus-bounceparser-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/MANIFEST?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/MANIFEST (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/MANIFEST Fri Nov 12 21:57:33 2010
@@ -12,7 +12,6 @@
 LICENSE
 Makefile.PL
 MANIFEST
-META.yml
 README
 t/00-load.t
 t/aol-attachment.t
@@ -21,21 +20,29 @@
 t/corpus/aol-senderblock.msg
 t/corpus/aol.attachment.msg
 t/corpus/aol.unknown.msg
+t/corpus/aol-vacation.msg
 t/corpus/att-via-sendmail.unknown.msg
 t/corpus/bluebottle.msg
 t/corpus/comcast-via-sendmail.unknown.msg
 t/corpus/cox-via-sendmail.unknown.msg
+t/corpus/deactivated-mailbox.msg
 t/corpus/domino.unknown.msg
 t/corpus/exchange.unknown.msg
 t/corpus/generic-postfix-via-sendmail.unknown.msg
 t/corpus/gmail-via-sendmail.unknown.msg
 t/corpus/hotmail-via-sendmail.unknown.msg
 t/corpus/iis-multiple-bounce.msg
+t/corpus/malformed-dns.msg
+t/corpus/mailbox-unknown.msg
+t/corpus/message-too-large.msg
 t/corpus/misidentified-recipient.msg
 t/corpus/msn-via-sendmail.unknown.msg
+t/corpus/no-such-domain.msg
 t/corpus/non-autoreply.msg
 t/corpus/not-a-relay.msg
 t/corpus/novell-with-rhs.msg
+t/corpus/polish-unknown.msg
+t/corpus/polish-autoreply.msg
 t/corpus/postfix-host-unknown.msg
 t/corpus/postfix-malformed.msg
 t/corpus/postfix-orig.msg
@@ -45,6 +52,7 @@
 t/corpus/quota-2.msg
 t/corpus/quota-3.msg
 t/corpus/quota-4.msg
+t/corpus/quota-5.msg
 t/corpus/quota.msg
 t/corpus/relaying-denied.msg
 t/corpus/sendmail-host-unknown.msg
@@ -53,6 +61,10 @@
 t/corpus/spam-rejection.msg
 t/corpus/spam-rejection2.msg
 t/corpus/spam-rejection3.msg
+t/corpus/spam-rejection4.msg
+t/corpus/spam-rejection5.msg
+t/corpus/spam-rejection6.msg
+t/corpus/spam-rejection7.msg
 t/corpus/spam-with-badly-parsed-email.msg
 t/corpus/spam-with-image.msg
 t/corpus/spamassassin.msg
@@ -66,20 +78,36 @@
 t/corpus/warning-5.msg
 t/corpus/warning-6.msg
 t/corpus/warning-7.msg
+t/corpus/warning-8.msg
 t/corpus/yahoo-via-sendmail.unknown.msg
+t/corpus/yahoo-user-unknown.msg
+t/corpus/user-unknown-polish.msg
+t/corpus/autoreply.msg
+t/corpus/me-user-unknown.msg
+t/corpus/cam-unknown.msg
+t/corpus/whitelist.msg
+t/corpus/rcpthosts.msg
+t/corpus/rcpt-dne.msg
+t/corpus/user-unknown-dne.msg
+t/autoreply.t
 t/email_addr_regex.t
 t/iis-multiple-bounce.t
+t/malformed-dns.t
+t/message-too-large.t
 t/misidentified-recipient.t
 t/non-autoreply.t
 t/not-a-relay.t
 t/orig-message.t
+t/polish-autoreply.t
 t/pod-coverage.t
 t/pod.t
 t/postfix-malformed.t
 t/postfix.t
+t/rcpthosts.t
 t/quota-2.t
 t/quota-3.t
 t/quota-4.t
+t/quota-5.t
 t/quota.t
 t/relaying-denied.t
 t/spam-bogus-email-in-report.t
@@ -87,6 +115,10 @@
 t/spam-rejection.t
 t/spam-rejection2.t
 t/spam-rejection3.t
+t/spam-rejection4.t
+t/spam-rejection5.t
+t/spam-rejection6.t
+t/spam-rejection7.t
 t/spam-with-image.t
 t/spamassassin.t
 t/spambouncer.t
@@ -96,3 +128,5 @@
 t/various-unknown.t
 t/virus-caused-multiple-weird-reports.t
 t/warnings.t
+t/aol-vacation.t
+t/whitelist.t

Modified: trunk/libmail-deliverystatus-bounceparser-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/README?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/README (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/README Fri Nov 12 21:57:33 2010
@@ -22,6 +22,14 @@
   Mail::Address
   MIME::Tools
 
+TESTS
+
+Test cases have been mostly anonymised a fair bit to hide details
+of the original emails being tested.
+
+They retain enough essence to form a test case but if you're looking
+to examine more detail they may no longer be there.
+
 COPYRIGHT AND LICENCE
 
     Copyright (C) 2003-2006 IC Group, Inc.

Modified: trunk/libmail-deliverystatus-bounceparser-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/debian/changelog?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/debian/changelog (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/debian/changelog Fri Nov 12 21:57:33 2010
@@ -1,3 +1,9 @@
+libmail-deliverystatus-bounceparser-perl (1.525-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- gregor herrmann <gregoa at debian.org>  Fri, 12 Nov 2010 22:55:45 +0100
+
 libmail-deliverystatus-bounceparser-perl (1.524-1) unstable; urgency=low
 
   * Initial release (closes: #580096).

Modified: trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install.pm?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install.pm (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install.pm Fri Nov 12 21:57:33 2010
@@ -31,7 +31,7 @@
 	# This is not enforced yet, but will be some time in the next few
 	# releases once we can make sure it won't clash with custom
 	# Module::Install extensions.
-	$VERSION = '0.99';
+	$VERSION = '1.00';
 
 	# Storage for the pseudo-singleton
 	$MAIN    = undef;
@@ -230,8 +230,12 @@
 sub new {
 	my ($class, %args) = @_;
 
-    delete $INC{'FindBin.pm'};
-    require FindBin;
+	delete $INC{'FindBin.pm'};
+	{
+		# to suppress the redefine warning
+		local $SIG{__WARN__} = sub {};
+		require FindBin;
+	}
 
 	# ignore the prefix on extension modules built from top level.
 	my $base_path = Cwd::abs_path($FindBin::Bin);

Modified: trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Base.pm?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Base.pm (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Base.pm Fri Nov 12 21:57:33 2010
@@ -4,7 +4,7 @@
 use strict 'vars';
 use vars qw{$VERSION};
 BEGIN {
-	$VERSION = '0.99';
+	$VERSION = '1.00';
 }
 
 # Suspend handler for "redefined" warnings

Modified: trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Can.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Can.pm?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Can.pm (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Can.pm Fri Nov 12 21:57:33 2010
@@ -9,7 +9,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.99';
+	$VERSION = '1.00';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Fetch.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Fetch.pm?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Fetch.pm (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Fetch.pm Fri Nov 12 21:57:33 2010
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.99';
+	$VERSION = '1.00';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Makefile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Makefile.pm?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Makefile.pm (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Makefile.pm Fri Nov 12 21:57:33 2010
@@ -8,7 +8,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.99';
+	$VERSION = '1.00';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Metadata.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Metadata.pm?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Metadata.pm (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Metadata.pm Fri Nov 12 21:57:33 2010
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.99';
+	$VERSION = '1.00';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Win32.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Win32.pm?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Win32.pm (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/Win32.pm Fri Nov 12 21:57:33 2010
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.99';
+	$VERSION = '1.00';
 	@ISA     = 'Module::Install::Base';
 	$ISCORE  = 1;
 }

Modified: trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/WriteAll.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/WriteAll.pm?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/WriteAll.pm (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/inc/Module/Install/WriteAll.pm Fri Nov 12 21:57:33 2010
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-	$VERSION = '0.99';
+	$VERSION = '1.00';
 	@ISA     = qw{Module::Install::Base};
 	$ISCORE  = 1;
 }

Modified: trunk/libmail-deliverystatus-bounceparser-perl/lib/Mail/DeliveryStatus/BounceParser.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/lib/Mail/DeliveryStatus/BounceParser.pm?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/lib/Mail/DeliveryStatus/BounceParser.pm (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/lib/Mail/DeliveryStatus/BounceParser.pm Fri Nov 12 21:57:33 2010
@@ -25,8 +25,8 @@
 Mail::DeliveryStatus::BounceParser analyzes RFC822 bounce messages and returns
 a structured description of the addresses that bounced and the reason they
 bounced; it also returns information about the original returned message
-	including the Message-ID.  It works best with RFC1892 delivery reports, but
-	will gamely attempt to understand any bounce message no matter what MTA
+including the Message-ID.  It works best with RFC1892 delivery reports, but
+will gamely attempt to understand any bounce message no matter what MTA
 generated it.
 
 =head1 DESCRIPTION
@@ -42,7 +42,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '1.524';
+our $VERSION = '1.525';
 $VERSION = eval $VERSION;
 
 use MIME::Parser;
@@ -113,8 +113,10 @@
   # my $bounce = Mail::DeliveryStatus::BounceParser->new( \*STDIN | $fh |
   # "entire\nmessage" | ["array","of","lines"] );
 
-  my $parser = new MIME::Parser;
+  my $parser = MIME::Parser->new;
      $parser->output_to_core(1);
+     $parser->decode_headers(1);
+
   my $message;
 
   if (not $data) {
@@ -174,12 +176,19 @@
   }
 
   {
-	last unless ($message->head->get("X-Bluebottle-Request") and $first_part->stringify_body =~ /This account is protected by Bluebottle/);
-	$self->log("looks like a challenge/response autoresponse; ignoring.");
+    last unless ($message->head->get("X-Bluebottle-Request") and $first_part->stringify_body =~ /This account is protected by Bluebottle/);
+    $self->log("looks like a challenge/response autoresponse; ignoring.");
     $self->{type} = "Challenge / Response system autoreply";
     $self->{is_bounce} = 0;
     return $self;
-
+  }
+
+  {
+    last unless $first_part->stringify_body =~ /Your server requires confirmation/;
+    $self->log("Looks like a challenge/response autoresponse; ignoring.");
+    $self->{type} = "Challenge / Response system autoreply";
+    $self->{is_bounce} = 0;
+    return $self;
   }
 
   # we'll deem autoreplies to be usually less than a certain size.
@@ -198,7 +207,7 @@
     my $string = $first_part->as_string;
     last if length($string) > 3000;
     # added return receipt (fix for bug #41870)
-    last if $string !~ /auto.{0,20}reply|return receipt|vacation|(out|away|on holiday).*office/i;
+    last if $string !~ /auto.{0,20}(reply|response)|return receipt|vacation|(out|away|on holiday).*office/i;
     $self->log("looks like a vacation autoreply, ignoring.");
     $self->{type} = "vacation autoreply";
     $self->{is_bounce} = 0;
@@ -209,12 +218,25 @@
   {
     last if $message->effective_type eq 'multipart/report';
     last if !$first_part || $first_part->effective_type ne 'text/plain';
-	my $subject = $message->head->get('Subject');
-	last if !defined($subject);
-	last if $subject !~ /^AUTO/;
-	last if $subject !~ /is out of the office/;
+    my $subject = $message->head->get('Subject');
+    last if !defined($subject);
+    last if $subject !~ /^AUTO/;
+    last if $subject !~ /is out of the office/;
     $self->log("looks like a vacation autoreply, ignoring.");
     $self->{type} = "vacation autoreply";
+    $self->{is_bounce} = 0;
+    return $self;
+  }
+
+  # Polish auto-reply
+  {
+    last if $message->effective_type eq 'multipart/report';
+    last if !$first_part || $first_part->effective_type ne 'text/plain';
+    my $subject = $message->head->get('Subject');
+    last if !defined($subject);
+    last if $subject !~ /Automatyczna\s+odpowied/;
+    $self->log("looks like a polish autoreply, ignoring.");
+    $self->{type} = "polish autoreply";
     $self->{is_bounce} = 0;
     return $self;
   }
@@ -299,12 +321,12 @@
     ) {
       # see MIME::Entity regarding REPLACE
       my $orig_message_id = $orig_message->parts(0)->head->get("message-id");
-	  if ($orig_message_id) {
-		chomp $orig_message_id;
+      if ($orig_message_id) {
+        chomp $orig_message_id;
         $self->log("extracted original message-id $orig_message_id from the original rfc822/message");
-	  } else {
+      } else {
         $self->log("Couldn't extract original message-id from the original rfc822/message");
-	  }
+      }
       $self->{orig_message_id} = $orig_message_id;
       $self->{orig_message} = $orig_message->parts(0);
     }
@@ -314,14 +336,17 @@
     # message/rfc822.  yow!
 
     if (! $self->{orig_message_id}
-	     and
-	     my ($rfc822_headers) =
+      and
+      my ($rfc822_headers) =
          grep { lc $_->effective_type eq "text/rfc822-headers" } $message->parts
     ) {
       my $orig_head = Mail::Header->new($rfc822_headers->body);
-      chomp ($self->{orig_message_id} = $orig_head->get("message-id"));
-      $self->{orig_header} = $orig_head;
-      $self->log("extracted original message-id $self->{orig_message_id} from text/rfc822-headers");
+      my $message_id = $orig_head->get("message-id");
+      if ($message_id) {
+        chomp ($self->{orig_message_id} = $orig_head->get("message-id"));
+        $self->{orig_header} = $orig_head;
+        $self->log("extracted original message-id $self->{orig_message_id} from text/rfc822-headers");
+      }
     }
   }
 
@@ -401,9 +426,9 @@
 
       for my $hdr (qw(Reporting-MTA Arrival-Date)) {
         my $val = $global{$hdr} ||= $report->get($hdr);
-		if (defined($val)) {
-			$report->replace($hdr => $val)
-		}
+        if (defined($val)) {
+          $report->replace($hdr => $val)
+        }
       }
 
       my $email;
@@ -424,18 +449,18 @@
       my $reason = $report->get("diagnostic-code");
 
       $email  =~ s/[^;]+;\s*//; # strip leading RFC822; or LOCAL; or system;
-	  if (defined $reason) {
-		$reason =~ s/[^;]+;\s*//; # strip leading X-Postfix;
-	  }
+      if (defined $reason) {
+        $reason =~ s/[^;]+;\s*//; # strip leading X-Postfix;
+      }
 
       $email = _cleanup_email($email);
 
       $report->replace(email      => $email);
-	  if (defined $reason) {
-		$report->replace(reason     => $reason);
-	  } else {
-		$report->delete("reason");
-	  }
+      if (defined $reason) {
+        $report->replace(reason     => $reason);
+      } else {
+        $report->delete("reason");
+      }
 
       if (my $status = $report->get('Status')) {
         # RFC 1893... prefer Status: if it exists and is something we know
@@ -447,6 +472,11 @@
           $report->replace(std_reason => "domain_error");
         } elsif ($status eq "5.2.2") {
           $report->replace(std_reason => "over_quota");
+          # this fits my reading of RFC 3463
+          # FIXME: I suspect there's something wrong with the parsing earlier
+          # that this has to be a regexp rather than a straight comparison
+        } elsif ($status =~ /^5\.4\.4/) {
+          $report->replace(std_reason => "domain_error");
         } else {
           $report->replace(
             std_reason => _std_reason($report->get("diagnostic-code"))
@@ -457,32 +487,32 @@
           std_reason => _std_reason($report->get("diagnostic-code"))
         );
       }
-	  my $diag_code = $report->get("diagnostic-code");
-
-	  my $host;
-	  if (defined $diag_code) {
-		 ($host) = $diag_code =~ /\bhost\s+(\S+)/;
-	  }
+      my $diag_code = $report->get("diagnostic-code");
+
+      my $host;
+      if (defined $diag_code) {
+        ($host) = $diag_code =~ /\bhost\s+(\S+)/;
+      }
 
       $report->replace(host => ($host)) if $host;
 
       my ($code);
-	 
-	  if (defined $diag_code) {
-		 ($code) = $diag_code =~
+
+      if (defined $diag_code) {
+        ($code) = $diag_code =~
          m/ ( ( [245] \d{2} ) \s | \s ( [245] \d{2} ) (?!\.) ) /x;
-	  }
+      }
 
       if ($code) {
-		$report->replace(smtp_code => $code);
-	  }
+        $report->replace(smtp_code => $code);
+      }
 
       if (not $report->get("host")) {
-		my $email = $report->get("email");
-		if (defined $email) {
-			my $host = ($email =~ /\@(.+)/)[0];
-			$report->replace(host => $host) if $host;
-		}
+        my $email = $report->get("email");
+        if (defined $email) {
+          my $host = ($email =~ /\@(.+)/)[0];
+          $report->replace(host => $host) if $host;
+        }
       }
 
       if ($report->get("smtp_code") and ($report->get("smtp_code") =~ /^2../)) {
@@ -619,10 +649,10 @@
       next;
     }
 
-	if($split[$i-1] =~ /A message sent by/) {
-		# sender block
-		next;
-	}
+    if($split[$i-1] =~ /A message sent by/) {
+      # sender block
+      next;
+    }
 
     my $std_reason = "unknown";
     $std_reason = _std_reason($split[$i+1]) if $#split > $i;
@@ -638,14 +668,14 @@
       ne "unknown" and $std_reason eq "unknown"
     );
 
-	my $reason = $split[$i-1];
-	$reason =~ s/(.*?). (Your mail to the following recipients could not be delivered)/$2/;
+    my $reason = $split[$i-1];
+    $reason =~ s/(.*?). (Your mail to the following recipients could not be delivered)/$2/;
 
     $by_email{$email} = {
       email => $email,
       raw   => join ("", @split[$i-1..$i+1]),
       std_reason => $std_reason,
-	  reason => $reason
+      reason => $reason
     };
   }
 
@@ -715,17 +745,19 @@
   over_quota
   domain_error
   spam
+  message_too_large
   unknown
   no_problemo
 
-The "spam" standard reason indicates that the message bounced because the recipient
-considered it spam.
+The "spam" standard reason indicates that the message bounced because
+the recipient considered it spam.
 
 (no_problemo will only appear if you set {report_non_bounces=>1})
 
-If the bounce message is not structured according to RFC1892, BounceParser will
-still try to return as much information as it can; in particular, you can count
-on "email" and "std_reason" to be present.
+If the bounce message is not structured according to RFC1892,
+BounceParser will still try to return as much information as it can;
+in particular, you can count on "email" and "std_reason" to be
+present.
 
 =cut
 
@@ -855,7 +887,7 @@
 =head1 COPYRIGHT AND LICENSE
 
   Copyright (C) 2003-2006, IC Group, Inc.
-	pobox.com permanent email forwarding with spam filtering
+  pobox.com permanent email forwarding with spam filtering
   listbox.com mailing list services for announcements and discussion
 
 This library is free software; you can redistribute it and/or modify
@@ -872,11 +904,15 @@
   local $_ = shift;
 
   if (!defined $_) {
-	  return "unknown";
+    return "unknown";
   }
 
   if (/(?:domain|host|service)\s+(?:not\s+found|unknown|not\s+known)/i) {
     return "domain_error"
+  }
+
+  if (/sorry,\s+that\s+domain\s+isn't\s+in\s+my\s+list\s+of\s+allowed\s+rcpthosts/i) {
+    return "domain_error";
   }
 
   if (
@@ -886,10 +922,10 @@
     /quota/i            or
     /\s552\s/           or
     /\s#?5\.2\.2\s/     or                                # rfc 1893
-	/User\s+mailbox\s+exceeds\s+allowed\s+size/i or
-	/Mailbox\s+size\s+limit\s+exceeded/i or
-	/message\s+size\s+\d+\s+exceeds\s+size\s+limit\s+\d+/i or
-	/max\s+message\s+size\s+exceeded/i
+    /User\s+mailbox\s+exceeds\s+allowed\s+size/i or
+    /Mailbox\s+size\s+limit\s+exceeded/i or
+    /message\s+size\s+\d+\s+exceeds\s+size\s+limit\s+\d+/i or
+    /max\s+message\s+size\s+exceeded/i
   ) {
     return "over_quota";
   }
@@ -925,7 +961,16 @@
     /not\s+listed\s+in\s+Domino/i or                    # Domino
     /account not activated/i or                         # usa.net
     /not\s+our\s+customer/i or                          # Comcast
-    /doesn't handle mail for that user/i                # mailfoundry
+    /doesn't handle mail for that user/i or             # mailfoundry
+    /Address\s+does\s+not\s+exist/i or
+    /Recipient\s+<?$EMAIL_ADDR_REGEX>?\s+does\s+not\s+exist/i or
+    /recipient\s+no\s+longer\s+on\s+server/i or # me.com
+    /is\s+not\s+a\s+known\s+user\s+on\s+this\s+system/i or # cam.ac.uk
+    /Rcpt\s+<?$EMAIL_ADDR_REGEX>?\s+does\s+not\s+exist/i or
+    /Mailbox\s+not\s+available/i or
+    /No\s+mailbox\s+found/i or
+    /<?$EMAIL_ADDR_REGEX>?\s+is\s+a\s+deactivated\s+mailbox/i or
+    /Recipient\s+does\s+not\s+exist\s+on\s+this\s+system/i
   ) {
     return "user_unknown";
   }
@@ -936,31 +981,42 @@
     /route\s+to\s+host/i or
     /connection\s+refused/i or
     /no\s+data\s+record\s+of\s+requested\s+type/i or
-	/Malformed name server reply/i or
-	/as\s+a\s+relay,\s+but\s+I\s+have\s+not\s+been\s+configured\s+to\s+let/i or
-	/550\s+relay\s+not\s+permitted/i or
-	/550\s+relaying\s+denied/i or
-	/Relay\s+access\s+denied/i or
-	/Relaying\s+denied/i
+    /Malformed name server reply/i or
+    /as\s+a\s+relay,\s+but\s+I\s+have\s+not\s+been\s+configured\s+to\s+let/i or
+    /550\s+relay\s+not\s+permitted/i or
+    /550\s+relaying\s+denied/i or
+    /Relay\s+access\s+denied/i or
+    /Relaying\s+denied/i or
+    /No\s+such\s+domain\s+at\s+this\s+location/i
   ) {
     return "domain_error";
   }
 
   if (
     /Blocked\s+by\s+SpamAssassin/i or
-	/spam\s+rejection/i or
-	/identified\s+SPAM,\s+message\s+permanently\s+rejected/i or
-	/Mail\s+appears\s+to\s+be\s+unsolicited/i or
-	/Message\s+rejected\s+as\s+spam\s+by\s+Content\s+Filtering/i 
+    /spam\s+rejection/i or
+    /identified\s+SPAM,\s+message\s+permanently\s+rejected/i or
+    /Mail\s+appears\s+to\s+be\s+unsolicited/i or
+    /Message\s+rejected\s+as\s+spam\s+by\s+Content\s+Filtering/i or
+    /message\s+looks\s+like\s+SPAM\s+to\s+me/i or
+    /your\s+message\s+has\s+triggered\s+a\s+SPAM\s+block/i or
+    /Spam\s+detected/i or
+    /Message\s+looks\s+like\s+spam/i
   ) {
     return "spam";
   }
 
+  if (
+    /RESOLVER.RST.RecipSizeLimit/i
+  ) {
+    return "message_too_large";
+  }
+
   return "unknown";
 }
 
 # ---------------------------------------------------------------------
-# 		       preprocessors
+# preprocessors
 # ---------------------------------------------------------------------
 
 sub p_ims {
@@ -1199,9 +1255,9 @@
   for (split /\n\n|(?=>>>)/, $plain_smtp_transcript) {
     $email = _cleanup_email($1) if /RCPT TO:\s*(\S+)/im;
 
-	if (/The\s+following\s+addresses\s+had\s+permanent\s+fatal\s+errors\s+-----\s+\<(.*)\>/im) {
-	  $email = _cleanup_email($1);
-	}
+    if (/The\s+following\s+addresses\s+had\s+permanent\s+fatal\s+errors\s+-----\s+\<(.*)\>/im) {
+      $email = _cleanup_email($1);
+    }
 
     $by_email{$email}->{host} = $host if $email;
 

Modified: trunk/libmail-deliverystatus-bounceparser-perl/lib/Mail/DeliveryStatus/Report.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/lib/Mail/DeliveryStatus/Report.pm?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/lib/Mail/DeliveryStatus/Report.pm (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/lib/Mail/DeliveryStatus/Report.pm Fri Nov 12 21:57:33 2010
@@ -1,6 +1,6 @@
 package Mail::DeliveryStatus::Report;
 
-our $VERSION = '1.524';
+our $VERSION = '1.525';
 $VERSION = eval $VERSION;
 
 use Mail::Header;

Modified: trunk/libmail-deliverystatus-bounceparser-perl/t/various-domain.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/t/various-domain.t?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/t/various-domain.t (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/t/various-domain.t Fri Nov 12 21:57:33 2010
@@ -1,7 +1,7 @@
 #!perl -wT
 use strict;
 
-use Test::More tests => 12;
+use Test::More tests => 18;
 
 use Mail::DeliveryStatus::BounceParser;
 
@@ -29,6 +29,11 @@
     "reason"      => '[dest.example.com]: Name or service not known',
     "smtp_code"   =>  '',
     "recipient"   => 'bounce at dest.example.com'
+  },
+  "no-such-domain.msg" => {
+	"reason"	=> '550 No such domain at this location (recipient at example.net)',
+	"smtp_code"	=> "550",
+	"recipient"	=> 'recipient at example.net',
   },
 );
 

Modified: trunk/libmail-deliverystatus-bounceparser-perl/t/various-unknown.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/t/various-unknown.t?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/t/various-unknown.t (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/t/various-unknown.t Fri Nov 12 21:57:33 2010
@@ -1,7 +1,7 @@
 #!perl -wT
 use strict;
 
-use Test::More tests => 78;
+use Test::More tests => 132;
 
 use Mail::DeliveryStatus::BounceParser;
 
@@ -98,6 +98,43 @@
     # Can't really get this since it DNE
     "smtp_code"   =>  '',
   },
+  "yahoo-user-unknown.msg" => {
+	  "reason" => '553 5.3.0 <recipient at example.net>... Address does not     exist',
+	  "smtp_code" => "553",
+  },
+  "user-unknown-polish.msg" => {
+	  # reason is a little ugly
+	  "reason" => '501 5.1.3 Odbiorca <recipient at example.net> nie     istnieje / Recipient <recipient at example.net> does not exist',
+	  "smtp_code" => "501",
+	  },
+  "me-user-unknown.msg" => {
+	  "reason" => '550 5.1.6 recipient no longer on server: recipient at example.net',
+	  "smtp_code" => "550",
+  },
+  "cam-unknown.msg" => {
+	  "reason" => '550-<recipient at example.net> is not a known user on this     system; 550 see http://www.example.net/cs/email/bounce.html',
+	  "smtp_code" => '550',
+  },
+  "rcpt-dne.msg" => {
+	  "reason" => '554 Rcpt <recipient at example.net> does not exist',
+	  "smtp_code" => "554",
+  },
+  "polish-unknown.msg" => {
+		"reason" => "550 5.2.1 Mailbox not available / Konto niedostepne",
+		"smtp_code" => "550"
+	},
+  "mailbox-unknown.msg" => {
+		"reason" => "550 5.7.1 No mailbox found",
+		"smtp_code" => "550",
+	},
+  "deactivated-mailbox.msg" => {
+		"reason" => '551 <recipient at example.net> is a deactivated mailbox',
+		"smtp_code" => "551",
+	},
+	"user-unknown-dne.msg" => {
+		"reason" => "550 Recipient does not exist on this system",
+		"smtp_code" => "550"
+	},
 );
 
 foreach my $file (keys %files_and_responses) {

Modified: trunk/libmail-deliverystatus-bounceparser-perl/t/warnings.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmail-deliverystatus-bounceparser-perl/t/warnings.t?rev=64813&op=diff
==============================================================================
--- trunk/libmail-deliverystatus-bounceparser-perl/t/warnings.t (original)
+++ trunk/libmail-deliverystatus-bounceparser-perl/t/warnings.t Fri Nov 12 21:57:33 2010
@@ -1,7 +1,7 @@
 #!perl -wT
 use strict;
 
-use Test::More tests => 20;
+use Test::More tests => 22;
 
 use Mail::DeliveryStatus::BounceParser;
 
@@ -98,3 +98,11 @@
 my $std_reason7 = $report7->get("std_reason");
 
 is($std_reason7, "over_quota", "std reason is over_quota");
+
+my $message8 = readfile('t/corpus/warning-8.msg');
+my $bounce8 = Mail::DeliveryStatus::BounceParser->new($message8);
+
+isa_ok($bounce8, 'Mail::DeliveryStatus::BounceParser');
+
+# it's not a bounce - transient nonfatal error
+ok(!$bounce8->is_bounce, "This is a bounce");




More information about the Pkg-perl-cvs-commits mailing list