Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Mail-DeliveryStatus-BounceParser CPAN distribution.

Report information
The Basics
Id: 20751
Status: resolved
Priority: 0/
Queue: Mail-DeliveryStatus-BounceParser

People
Owner: Nobody in particular
Requestors: cpan [...] veggiechinese.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: weird message bug
Date: Fri, 28 Jul 2006 19:45:56 -0700
To: bug-Mail-DeliveryStatus-BounceParser [...] rt.cpan.org
From: Will Yardley <cpan [...] veggiechinese.net>
Perl is 5.8.0 on RHEL 3.7 module is latest version (1.511) Problem: Certain junk messages (see attached) make the module barf. I don't think the module should even think that this message IS a bounce, and the results I get from it are really strange. I piped the message to the following simple program: #!/usr/bin/perl use Data::Dumper; use Mail::DeliveryStatus::BounceParser; my $bounce = eval { Mail::DeliveryStatus::BounceParser->new( \*STDIN) }; print Dumper $bounce; Second file attached (mail-deliverystatus-bounceparser-dump.txt) is the output. w

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #20751] AutoReply: weird message bug
Date: Sat, 29 Jul 2006 11:18:39 -0700
To: Bugs in Mail-DeliveryStatus-BounceParser via RT <bug-Mail-DeliveryStatus-BounceParser [...] rt.cpan.org>
From: William Yardley <cpan [...] veggiechinese.net>
I've found a number of these... mostly spam messages. Another one attached.

Message body is not shown because sender requested not to inline it.

On Fri Jul 28 22:46:30 2006, cpan@veggiechinese.net wrote: Show quoted text
> Certain junk messages (see attached) make the module barf.
Tell me about it! This problem plagues us, too, and is one of the reasons this modules is on my "to fix" list. Patches welcome! Seriously. So very, very welcome...
Subject: Re: [rt.cpan.org #20751] weird message bug
Date: Sat, 29 Jul 2006 15:57:24 -0700
To: Ricardo Signes via RT <bug-Mail-DeliveryStatus-BounceParser [...] rt.cpan.org>
From: William Yardley <cpan [...] veggiechinese.net>
On Sat, Jul 29, 2006 at 06:26:30PM -0400, Ricardo Signes via RT wrote: Show quoted text
> On Fri Jul 28 22:46:30 2006, cpan@veggiechinese.net wrote:
Show quoted text
> > Certain junk messages (see attached) make the module barf.
> > Tell me about it! This problem plagues us, too, and is one of the > reasons this modules is on my "to fix" list. > > Patches welcome! Seriously. So very, very welcome...
I'll try, or at least try to figure out a little better what's going on! It's a little beyond my level of expertise though. I'm a little confused how it gets all that garbage data. I guess I'm a little confused why the module thinks it's a bounce at all - there's basically no content in any of the text parts. And I'd assume that the binary attachments (like the image) would just be completely ignored. Maybe certain spam messages have a broken mime structure that MIME::Parser is barfing on? If you didn't notice, you get like 39 separate reports if you try to parse the first example message I posted. Is stuff like "[weirdjunk]@[weirdjunk]" being matched as an email address w/ a regex like \S+@\S+ ? It looks to me like somehow the module is parsing all the text making up the image as text. In that huge Data::Dumper dump I posted, it seems like MIME::Parser is recognizing the PNG bit as a binary file. Then you see: 'mail_hdr_list' => [ 'email: ?@???*?O?[...]' where the question marks represent weird junk. If you look through the raw message string, those strings are are there as well. I'll do my best to send you that bottle of WT on your wishlist if you fix it, if that's any incentive. :P w
Subject: Re: [rt.cpan.org #20751] weird message bug
Date: Sun, 30 Jul 2006 18:10:26 -0700
To: Ricardo Signes via RT <bug-Mail-DeliveryStatus-BounceParser [...] rt.cpan.org>
From: William Yardley <cpan [...] veggiechinese.net>
On Sat, Jul 29, 2006 at 06:26:30PM -0400, Ricardo Signes via RT wrote: Show quoted text
> On Fri Jul 28 22:46:30 2006, cpan@veggiechinese.net wrote:
Show quoted text
> > Certain junk messages (see attached) make the module barf.
> > Tell me about it! This problem plagues us, too, and is one of the > reasons this modules is on my "to fix" list. > > Patches welcome! Seriously. So very, very welcome...
Ok - this is a dirty hack and I'm not recommending this as the real "fix", but the patch attached seems to "fix" the problem for at least the @@ -449,7 +449,7 @@ # my @delivery_status_parts = grep { - $_->effective_type !~ /rfc822|html/ and not $_->is_multipart + $_->effective_type !~ /rfc822|html|image/ and not $_->is_multipart I think the better fix is to see what types we *do* want to accept in this section and then allow those types, rather than just accepting anything that doesn't contain one of those 2 (or 3) strings in its type. w

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #20751] weird message bug
Date: Sun, 30 Jul 2006 18:22:01 -0700
To: Ricardo Signes via RT <bug-Mail-DeliveryStatus-BounceParser [...] rt.cpan.org>
From: William Yardley <cpan [...] veggiechinese.net>
If that patch doesn't work, this one should.

Message body is not shown because sender requested not to inline it.

From: cpan [...] veggiechinese.net
On Sun Jul 30 21:22:14 2006, cpan@veggiechinese.net wrote: Show quoted text
> If that patch doesn't work, this one should.
Updated SVN and committed.
From: cpan [...] veggiechinese.net
On Mon Jul 31 14:12:12 2006, wyardley wrote: Show quoted text
> On Sun Jul 30 21:22:14 2006, cpan@veggiechinese.net wrote:
> > If that patch doesn't work, this one should.
> > Updated SVN and committed.
You can close this.
fixed in svn -- rjbs