Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: splitting email messages from /var/spoolio...

by madbombX (Hermit)
on Jul 20, 2006 at 19:22 UTC ( [id://562683]=note: print w/replies, xml ) Need Help??


in reply to splitting email messages from /var/spoolio...

I would have to say that your best bet (assuming I understand you correctly) is Mail::Box or Mail::Box::Manager. It's located here.

Assuming that you are using mbox format for your mailboxes:

use Mail::Box::Manager; my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open(folder => $ARGV[0]) or die("Mailbox open error: $!"); print $folder->name. ": ".$folder->messages ." Total Messages\n"; # Iterate over the messages foreach (@$folder) { print "Message $_"; } $mgr->close() or die("Mailbox close error: $!");

Untested.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://562683]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-03-29 12:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found