/usr/share/perl5/Mail/Box.pm is in libmail-box-perl 2.099-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 | # Copyrights 2001-2011 by Mark Overmeer.
# For other contributors see ChangeLog.
# See the manual pages for details on the licensing terms.
# Pod stripped from pm file by OODoc 2.00.
use strict;
use warnings;
package Mail::Box;
use vars '$VERSION';
$VERSION = '2.099';
use base 'Mail::Reporter';
use Mail::Box::Message;
use Mail::Box::Locker;
use File::Spec;
use Carp;
use Scalar::Util 'weaken';
use List::Util qw/sum first/;
#-------------------------------------------
use overload '@{}' => sub { shift->{MB_messages} }
, '""' => 'name'
, 'cmp' => sub {$_[0]->name cmp "${_[1]}"};
#-------------------------------------------
sub new(@)
{ my $class = shift;
if($class eq __PACKAGE__)
{ my $package = __PACKAGE__;
croak <<USAGE;
You should not instantiate $package directly, but rather one of the
sub-classes, such as Mail::Box::Mbox. If you need automatic folder
type detection then use Mail::Box::Manager.
USAGE
}
my %args = @_;
weaken $args{manager}; # otherwise, the manager object may live too long
my $self = $class->SUPER::new
( @_
, init_options => \%args # for clone
) or return;
$self->read or return
if $self->{MB_access} =~ /r|a/;
$self;
}
sub init($)
{ my ($self, $args) = @_;
return unless defined $self->SUPER::init($args);
my $class = ref $self;
my $foldername = $args->{folder} || $ENV{MAIL};
unless($foldername)
{ $self->log(ERROR => "No folder name specified.");
return;
}
$self->{MB_foldername} = $foldername;
$self->{MB_init_options} = $args->{init_options};
$self->{MB_coerce_opts} = $args->{coerce_options} || [];
$self->{MB_access} = $args->{access} || 'r';
$self->{MB_remove_empty}
= defined $args->{remove_when_empty} ? $args->{remove_when_empty} : 1;
$self->{MB_save_on_exit}
= defined $args->{save_on_exit} ? $args->{save_on_exit} : 1;
$self->{MB_messages} = [];
$self->{MB_msgid} = {};
$self->{MB_organization} = $args->{organization} || 'FILE';
$self->{MB_linesep} = "\n";
$self->{MB_keep_dups} = !$self->writable || $args->{keep_dups};
$self->{MB_fix_headers} = $args->{fix_headers};
my $folderdir = $self->folderdir($args->{folderdir});
$self->{MB_trusted} = exists $args->{trusted} ? $args->{trusted}
: substr($foldername, 0, 1) eq '=' ? 1
: !defined $folderdir ? 0
: substr($foldername, 0, length $folderdir) eq $folderdir;
if(exists $args->{manager})
{ $self->{MB_manager} = $args->{manager};
weaken($self->{MB_manager});
}
my $message_type = $self->{MB_message_type}
= $args->{message_type} || $class . '::Message';
$self->{MB_body_type}
= $args->{body_type} || 'Mail::Message::Body::Lines';
$self->{MB_body_delayed_type}
= $args->{body_delayed_type}|| 'Mail::Message::Body::Delayed';
$self->{MB_head_delayed_type}
= $args->{head_delayed_type}|| 'Mail::Message::Head::Delayed';
$self->{MB_multipart_type}
= $args->{multipart_type} || 'Mail::Message::Body::Multipart';
$self->{MB_field_type} = $args->{field_type};
my $headtype = $self->{MB_head_type}
= $args->{head_type} || 'Mail::Message::Head::Complete';
my $extract = $args->{extract} || 'extractDefault';
$self->{MB_extract}
= ref $extract eq 'CODE' ? $extract
: $extract eq 'ALWAYS' ? sub {1}
: $extract eq 'LAZY' ? sub {0}
: $extract eq 'NEVER' ? sub {1} # compatibility
: $extract =~ m/\D/ ? sub {no strict 'refs';shift->$extract(@_)}
: sub { my $size = $_[1]->guessBodySize;
defined $size && $size < $extract;
};
#
# Create a locker.
#
$self->{MB_locker}
= $args->{locker}
|| Mail::Box::Locker->new
( folder => $self
, method => $args->{lock_type}
, timeout => $args->{lock_timeout}
, expires => $args->{lock_wait}
, file => ($args->{lockfile} || $args->{lock_file})
, $self->logSettings
);
$self;
}
#-------------------------------------------
sub folderdir(;$)
{ my $self = shift;
$self->{MB_folderdir} = shift if @_;
$self->{MB_folderdir};
}
sub foundIn($@) { shift->notImplemented }
sub name() {shift->{MB_foldername}}
sub type() {shift->notImplemented}
sub url()
{ my $self = shift;
$self->type . ':' . $self->name;
}
sub size() { sum map { $_->size } shift->messages('ACTIVE') }
sub update(@)
{ my $self = shift;
$self->updateMessages
( trusted => $self->{MB_trusted}
, head_type => $self->{MB_head_type}
, field_type => $self->{MB_field_type}
, message_type => $self->{MB_message_type}
, body_delayed_type => $self->{MB_body_delayed_type}
, head_delayed_type => $self->{MB_head_delayed_type}
, @_
);
$self;
}
sub organization() { shift->notImplemented }
sub addMessage($@)
{ my $self = shift;
my $message = shift or return $self;
my %args = @_;
confess <<ERROR if $message->can('folder') && defined $message->folder;
You cannot add a message which is already part of a folder to a new
one. Please use moveTo or copyTo.
ERROR
# Force the message into the right folder-type.
my $coerced = $self->coerce($message);
$coerced->folder($self);
unless($coerced->head->isDelayed)
{ # Do not add the same message twice, unless keep_dups.
my $msgid = $coerced->messageId;
unless($self->{MB_keep_dups})
{ if(my $found = $self->messageId($msgid))
{ $coerced->label(deleted => 1);
return $found;
}
}
$self->messageId($msgid, $coerced);
$self->toBeThreaded($coerced);
}
$self->storeMessage($coerced);
$coerced;
}
sub addMessages(@)
{ my $self = shift;
map {$self->addMessage($_)} @_;
}
sub copyTo($@)
{ my ($self, $to, %args) = @_;
my $select = $args{select} || 'ACTIVE';
my $subfolders = exists $args{subfolders} ? $args{subfolders} : 1;
my $can_recurse = not $self->isa('Mail::Box::POP3');
my ($flatten, $recurse)
= $subfolders eq 'FLATTEN' ? (1, 0)
: $subfolders eq 'RECURSE' ? (0, 1)
: !$subfolders ? (0, 0)
: $can_recurse ? (0, 1)
: (1, 0);
my $delete = $args{delete_copied} || 0;
my $share = $args{share} || 0;
$self->_copy_to($to, $select, $flatten, $recurse, $delete, $share);
}
# Interface may change without warning.
sub _copy_to($@)
{ my ($self, $to, @options) = @_;
my ($select, $flatten, $recurse, $delete, $share) = @options;
$self->log(ERROR => "Destination folder $to is not writable."),
return unless $to->writable;
# Take messages from this folder.
my @select = $self->messages($select);
$self->log(PROGRESS =>
"Copying ".@select." messages from $self to $to.");
foreach my $msg (@select)
{ if($msg->copyTo($to, share => $share))
{ $msg->label(deleted => 1) if $delete }
else { $self->log(ERROR => "Copying failed for one message.") }
}
return $self unless $flatten || $recurse;
# Take subfolders
SUBFOLDER:
foreach ($self->listSubFolders(check => 1))
{ my $subfolder = $self->openSubFolder($_, access => 'r');
$self->log(ERROR => "Unable to open subfolder $_"), next
unless defined $subfolder;
if($flatten) # flatten
{ unless($subfolder->_copy_to($to, @options))
{ $subfolder->close;
return;
}
}
else # recurse
{ my $subto = $to->openSubFolder($_, create => 1, access => 'rw');
unless($subto)
{ $self->log(ERROR => "Unable to create subfolder $_ of $to");
next SUBFOLDER;
}
unless($subfolder->_copy_to($subto, @options))
{ $subfolder->close;
$subto->close;
return;
}
$subto->close;
}
$subfolder->close;
}
$self;
}
sub close(@)
{ my ($self, %args) = @_;
my $force = $args{force} || 0;
return 1 if $self->{MB_is_closed};
$self->{MB_is_closed}++;
# Inform manager that the folder is closed.
my $manager = delete $self->{MB_manager};
$manager->close($self, close_by_self =>1)
if defined $manager && !$args{close_by_manager};
my $write;
for($args{write} || 'MODIFIED')
{ $write = $_ eq 'MODIFIED' ? $self->isModified
: $_ eq 'ALWAYS' ? 1
: $_ eq 'NEVER' ? 0
: croak "Unknown value to folder->close(write => $_).";
}
if($write && !$force && !$self->writable)
{ $self->log(WARNING => "Changes not written to read-only folder $self.
Suggestion: \$folder->close(write => 'NEVER')");
$self->locker->unlock;
$self->{MB_messages} = []; # Boom!
return 0;
}
my $rc = !$write
|| $self->write
( force => $force
, save_deleted => $args{save_deleted} || 0
);
$self->locker->unlock;
$self->{MB_messages} = []; # Boom!
$rc;
}
sub delete(@)
{ my ($self, %args) = @_;
my $recurse = exists $args{recursive} ? $args{recursive} : 1;
# Extra protection: do not remove read-only folders.
unless($self->writable)
{ $self->log(ERROR => "Folder $self not deleted: not writable.");
$self->close(write => 'NEVER');
return;
}
# Sub-directories need to be removed first.
if($recurse)
{ foreach ($self->listSubFolders)
{ my $sub = $self->openRelatedFolder
(folder => "$self/$_", access => 'd', create => 0);
defined $sub && $sub->delete(%args);
}
}
$self->close(write => 'NEVER');
$self;
}
#-------------------------------------------
sub appendMessages(@) {shift->notImplemented}
#-------------------------------------------
sub writable() {shift->{MB_access} =~ /w|a|d/ }
sub writeable() {shift->writable} # compatibility [typo]
sub readable() {1} # compatibility
sub access() {shift->{MB_access}}
sub modified(;$)
{ my $self = shift;
return $self->isModified unless @_; # compat 2.036
return
if $self->{MB_modified} = shift; # force modified flag
# unmodify all messages
$_->modified(0) foreach $self->messages;
0;
}
sub isModified()
{ my $self = shift;
return 1 if $self->{MB_modified};
foreach (@{$self->{MB_messages}})
{ return $self->{MB_modified} = 1
if $_->isDeleted || $_->isModified;
}
0;
}
#-------------------------------------------
sub message(;$$)
{ my ($self, $index) = (shift, shift);
@_ ? $self->{MB_messages}[$index] = shift : $self->{MB_messages}[$index];
}
sub messageId($;$)
{ my ($self, $msgid) = (shift, shift);
if($msgid =~ m/\<([^>]+)\>/s )
{ $msgid = $1;
$msgid =~ s/\s//gs;
$self->log(WARNING => "Message-id '$msgid' does not contain a domain.")
unless index($msgid, '@') >= 0;
}
return $self->{MB_msgid}{$msgid} unless @_;
my $message = shift;
# Undefine message?
unless($message)
{ delete $self->{MB_msgid}{$msgid};
return;
}
my $double = $self->{MB_msgid}{$msgid};
if(defined $double && !$self->{MB_keep_dups})
{ my $head1 = $message->head;
my $head2 = $double->head;
my $subj1 = $head1->get('subject') || '';
my $subj2 = $head2->get('subject') || '';
my $to1 = $head1->get('to') || '';
my $to2 = $head2->get('to') || '';
# Auto-delete doubles.
return $message->label(deleted => 1)
if $subj1 eq $subj2 && $to1 eq $to2;
$self->log(WARNING => "Different messages with id $msgid");
$msgid = $message->takeMessageId(undef);
}
$self->{MB_msgid}{$msgid} = $message;
weaken($self->{MB_msgid}{$msgid});
$message;
}
sub messageID(@) {shift->messageId(@_)} # compatibility
sub find($)
{ my ($self, $msgid) = (shift, shift);
my $msgids = $self->{MB_msgid};
if($msgid =~ m/\<([^>]*)\>/s)
{ $msgid = $1;
$msgid =~ s/\s//gs;
}
else
{ # Illegal message-id
$msgid =~ s/\s/+/gs;
}
$self->scanForMessages(undef, $msgid, 'EVER', 'ALL')
unless exists $msgids->{$msgid};
$msgids->{$msgid};
}
sub messages($;$)
{ my $self = shift;
return @{$self->{MB_messages}} unless @_;
my $nr = @{$self->{MB_messages}};
if(@_==2) # range
{ my ($begin, $end) = @_;
$begin += $nr if $begin < 0;
$begin = 0 if $begin < 0;
$end += $nr if $end < 0;
$end = $nr-1 if $end >= $nr;
return () if $begin > $end;
my @range = @{$self->{MB_messages}}[$begin..$end];
return @range;
}
my $what = shift;
my $action
= ref $what eq 'CODE'? $what
: $what eq 'DELETED' ? sub {$_[0]->isDeleted}
: $what eq 'ACTIVE' ? sub {not $_[0]->isDeleted}
: $what eq 'ALL' ? sub {1}
: $what =~ s/^\!// ? sub {not $_[0]->label($what)}
: sub {$_[0]->label($what)};
grep {$action->($_)} @{$self->{MB_messages}};
}
sub nrMessages(@) { scalar shift->messages(@_) }
sub messageIds() { map {$_->messageId} shift->messages }
sub allMessageIds() {shift->messageIds} # compatibility
sub allMessageIDs() {shift->messageIds} # compatibility
sub current(;$)
{ my $self = shift;
unless(@_)
{ return $self->{MB_current}
if exists $self->{MB_current};
# Which one becomes current?
my $current
= $self->findFirstLabeled(current => 1)
|| $self->findFirstLabeled(seen => 0)
|| $self->message(-1)
|| return undef;
$current->label(current => 1);
$self->{MB_current} = $current;
return $current;
}
my $next = shift;
if(my $previous = $self->{MB_current})
{ $previous->label(current => 0);
}
($self->{MB_current} = $next)->label(current => 1);
$next;
}
sub scanForMessages($$$$)
{ my ($self, $startid, $msgids, $moment, $window) = @_;
# Set-up msgid-list
my %search = map {($_ => 1)} ref $msgids ? @$msgids : $msgids;
return () unless keys %search;
# do not run on empty folder
my $nr_messages = $self->messages
or return keys %search;
my $startmsg = defined $startid ? $self->messageId($startid) : undef;
# Set-up window-bound.
my $bound = 0;
if($window ne 'ALL' && defined $startmsg)
{ $bound = $startmsg->seqnr - $window;
$bound = 0 if $bound < 0;
}
my $last = ($self->{MBM_last} || $nr_messages) -1;
return keys %search if defined $bound && $bound > $last;
# Set-up time-bound
my $after = $moment eq 'EVER' ? 0
: $moment =~ m/^\d+$/ ? $moment
: !$startmsg ? 0
: $startmsg->timestamp - $self->timespan2seconds($moment);
while($last >= $bound)
{ my $message = $self->message($last);
my $msgid = $message->messageId; # triggers load
if(delete $search{$msgid}) # where we looking for this one?
{ last unless keys %search;
}
last if $message->timestamp < $after;
$last--;
}
$self->{MBM_last} = $last;
keys %search;
}
sub findFirstLabeled($;$$)
{ my ($self, $label, $set, $msgs) = @_;
if(!defined $set || $set)
{ my $f = first { $_->label($label) }
(defined $msgs ? @$msgs : $self->messages);
}
else
{ return first { not $_->label($label) }
(defined $msgs ? @$msgs : $self->messages);
}
}
#-------------------------------------------
sub listSubFolders(@) { () } # by default no sub-folders
sub openRelatedFolder(@)
{ my $self = shift;
my @options = (%{$self->{MB_init_options}}, @_);
$self->{MB_manager}
? $self->{MB_manager}->open(type => ref($self), @options)
: (ref $self)->new(@options);
}
sub openSubFolder($@)
{ my $self = shift;
my $name = $self->nameOfSubFolder(shift);
$self->openRelatedFolder(@_, folder => $name);
}
sub nameOfSubFolder($;$)
{ my ($thing, $name) = (shift, shift);
my $parent = @_ ? shift : ref $thing ? $thing->name : undef;
defined $parent ? "$parent/$name" : $name;
}
sub topFolderWithMessages() { 1 }
#-------------------------------------------
sub read(@)
{ my $self = shift;
$self->{MB_open_time} = time;
local $self->{MB_lazy_permitted} = 1;
# Read from existing folder.
return unless $self->readMessages
( trusted => $self->{MB_trusted}
, head_type => $self->{MB_head_type}
, field_type => $self->{MB_field_type}
, message_type => $self->{MB_message_type}
, body_delayed_type => $self->{MB_body_delayed_type}
, head_delayed_type => $self->{MB_head_delayed_type}
, @_
);
if($self->{MB_modified})
{ $self->log(INTERNAL => "Modified $self->{MB_modified}");
$self->{MB_modified} = 0; #after reading, no changes found yet.
}
$self;
}
#-------------------------------------------
sub write(@)
{ my ($self, %args) = @_;
unless($args{force} || $self->writable)
{ $self->log(ERROR => "Folder $self is opened read-only.");
return;
}
my (@keep, @destroy);
if($args{save_deleted})
{ @keep = $self->messages;
}
else
{ foreach ($self->messages)
{ if($_->isDeleted)
{ push @destroy, $_;
$_->diskDelete;
}
else {push @keep, $_}
}
}
unless(@destroy || $self->isModified)
{ $self->log(PROGRESS => "Folder $self not changed, so not updated.");
return $self;
}
$args{messages} = \@keep;
unless($self->writeMessages(\%args))
{ $self->log(WARNING => "Writing folder $self failed.");
return undef;
}
$self->modified(0);
$self->{MB_messages} = \@keep;
$self;
}
sub determineBodyType($$)
{ my ($self, $message, $head) = @_;
return $self->{MB_body_delayed_type}
if $self->{MB_lazy_permitted}
&& ! $message->isPart
&& ! $self->{MB_extract}->($self, $head);
my $bodytype = $self->{MB_body_type};
ref $bodytype ? $bodytype->($head) : $bodytype;
}
sub extractDefault($)
{ my ($self, $head) = @_;
my $size = $head->guessBodySize;
defined $size ? $size < 10000 : 0 # immediately extract < 10kb
}
sub lazyPermitted($)
{ my $self = shift;
$self->{MB_lazy_permitted} = shift;
}
sub storeMessage($)
{ my ($self, $message) = @_;
push @{$self->{MB_messages}}, $message;
$message->seqnr( @{$self->{MB_messages}} -1);
$message;
}
my %seps = (CR => "\015", LF => "\012", CRLF => "\015\012");
sub lineSeparator(;$)
{ my $self = shift;
return $self->{MB_linesep} unless @_;
my $sep = shift;
$sep = $seps{$sep} if exists $seps{$sep};
$self->{MB_linesep} = $sep;
$_->lineSeparator($sep) foreach $self->messages;
$sep;
}
sub create($@) {shift->notImplemented}
sub coerce($@)
{ my ($self, $message) = (shift, shift);
my $mmtype = $self->{MB_message_type};
$message->isa($mmtype) ? $message : $mmtype->coerce($message, @_);
}
sub readMessages(@) {shift->notImplemented}
sub updateMessages(@) { shift }
sub writeMessages(@) {shift->notImplemented}
sub locker() { shift->{MB_locker} }
sub toBeThreaded(@)
{ my $self = shift;
my $manager = $self->{MB_manager}
or return $self;
$manager->toBeThreaded($self, @_);
$self;
}
sub toBeUnthreaded(@)
{ my $self = shift;
my $manager = $self->{MB_manager}
or return $self;
$manager->toBeThreaded($self, @_);
$self;
}
#-------------------------------------------
sub timespan2seconds($)
{
if( $_[1] =~ /^\s*(\d+\.?\d*|\.\d+)\s*(hour|day|week)s?\s*$/ )
{ $2 eq 'hour' ? $1 * 3600
: $2 eq 'day' ? $1 * 86400
: $1 * 604800; # week
}
else
{ $_[0]->log(ERROR => "Invalid timespan '$_' specified.");
undef;
}
}
#-------------------------------------------
sub DESTROY
{ my $self = shift;
$self->close unless $self->inGlobalDestruction || $self->{MB_is_closed};
}
#-------------------------------------------
# Instance variables
# MB_access: new(access)
# MB_body_type: new(body_type)
# MB_coerce_opts: Options which have to be applied to the messages which
# are coerced into this folder.
# MB_current: Used by some mailbox-types to save last read message.
# MB_field_type: new(field_type)
# MB_folderdir: new(folderdir)
# MB_foldername: new(folder)
# MB_head_type: new(head_type)
# MB_init_options: A copy of all the arguments given to the constructor
# MB_is_closed: Whether or not the mailbox is closed
# MB_extract: When to extract the body on the moment the header is read
# MB_keep_dups: new(keep_dups)
# MB_locker: A reference to the mail box locker.
# MB_manager: new(manager)
# MB_messages: A list of all the messages in the folder
# MB_message_type: new(message_type)
# MB_modified: true when the message is modified for sure
# MB_msgid: A hash of all the messages in the mailbox, keyed on message ID
# MB_open_time: The time at which a mail box is first opened
# MB_organization: new(organization)
# MB_remove_empty: new(remove_when_empty)
# MB_save_on_exit: new(save_on_exit)
#-------------------------------------------
1;
|