Created
March 29, 2010 08:32
-
-
Save willert/347603 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use Mail::Box::Mbox; | |
| use Encode; | |
| use open ':std' => ':utf8'; | |
| my $inbox = Mail::Box::Mbox->new( | |
| access => 'rw', | |
| folder => '/var/mail/willert', | |
| lock_type => 'NONE', | |
| ); | |
| my @messages = $inbox->messages; | |
| my $i = 0; | |
| for ( @messages ) { | |
| $_->head->set( 'X-Export-Status' => '1' ) | |
| unless $_->head->get('X-Export-Status') or $i++; | |
| printf STDERR "Subject: %s [%s]\n", $_->subject, | |
| $_->head->get('X-Export-Status') || 'N/A'; | |
| } | |
| $inbox->close; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment