Skip Menu |
 

This queue is for tickets about the libnet CPAN distribution.

Report information
The Basics
Id: 57587
Status: open
Priority: 0/
Queue: libnet

People
Owner: Nobody in particular
Requestors: altoas [...] gmail.com
Cc:
AdminCc:

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



Subject: deleting messages brakes with large number of messages
Download (untitled) / with headers
text/plain 225b
If pop3 mailbox contains large amount of messages to be fetched, this module breaks deletion process. Use of uninitialized value in numeric eq (==) at /usr/share/perl/5.10/Net/POP3.pm line 320. and no messages are deleted
Subject: Re: [rt.cpan.org #57587] deleting messages brakes with large number of messages
Date: Tue, 18 May 2010 08:10:24 -0700
To: bug-libnet [...] rt.cpan.org
From: Graham Barr <gbarr [...] pobox.com>
Can you provide a small script and debug transcript that shows the issue?
Download (untitled) / with headers
text/plain 1.2k
On Tue May 18 11:10:44 2010, gbarr@pobox.com wrote: Show quoted text
> Can you provide a small script and debug transcript that shows the
issue? Show quoted text
>
#connect to pop3 my $pop = Net::POP3->new("$pop3host", Timeout => 60); if ($pop->login($pop3usr, $pop3pass) > 0) { my $msgnums = $pop->list; # hashref of msgnum => size foreach my $msgnum (keys %$msgnums) { my $msg = $pop->get($msgnum); my $p = MsgParse->new(); my $md = $p->read_full($msg); my $bzbody; if ($zoption eq 'yes') { $bzbody = compress( $md->{body}, ['9'] ); } else { $bzbody = $md->{body}; } my $sth = $dbh->prepare("INSERT INTO msg_data(`epoch`,`from`,`to`,`subject`,`body`,`header`) VALUES(?,?,?,?,?,?)"); $sth->execute($md->{date},$md->{from},$md->{to},$md- Show quoted text
>{subject},$bzbody,$md->{header});
$pop->delete($msgnum); } } $pop->quit; MsgParse is using Mail::Message to parse the message. If POP3 box is relatively small - 50-100 messages, the script runes fine. All the messages are deleted at the end. But with 3000 and 16000 messages it breaks and no emails are deleted. I use it to fetch catchall@ email box and store all messages in mysql table for archive purpose


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.