Commit 133ed11d authored by Mark Overmeer's avatar Mark Overmeer Committed by Mark Overmeer

distribution Mail-Box-3.000.tar.gz

parent 2095bb4b
This source diff could not be displayed because it is too large. You can view the blob instead.
INSTALL Mail::Box
Usually, you install any perl module simply by calling
# perl -MCPAN -e 'install Mail::Box'
but if you want to do it manually, then execute the following.
First unpack the archive:
# tar xzf Mail-Box-2*.tar.gz
# cd Mail-Box-2.*[0-9]
Then
# perl Makefile.PL
# make test
# make install
=== Dependencies
Some modules are not obligatory to Mail::Box, but can improve the
functionality. Obligatory are
Date::Parse used to parse date info in the header
File::Spec to copy files and construct paths
IO::Scalar only required to run the tests
Errno Mail/Box/Locker/File
Scalar::Util to weaken references
Object::Realize::Later implements delay loading
Mail::Address mail address parsing. Will be replaced later
MIME::Types to find required encoding on data-types.
Optionally, you may want to install
Net::SMTP to transport mail without external programs
Mail::Internet when you want to link to packages which require it.
MIME::Entity "
HTML::FormatText to convert HTML to plain text
HTML::FormatPS to convert HTML to PostScript
=== Support
Mark Overmeer <mailbox@overmeer.net>
ChangeLog
LICENSE
MANIFEST
MANIFEST.extra
META.yml
Makefile.PL
README
README.FAQ
README.todo
examples/build.pl
examples/grep.pl
examples/multipart.pl
examples/open.pl
examples/reply.pl
examples/send.pl
examples/smaller.pl
examples/strip-attachments.pl
examples/strip-spam-markup.pl
examples/takelarge.pl
examples/unpack.pl
lib/Mail/Box-Cookbook.pod
lib/Mail/Box-Index.pod
lib/Mail/Box-Overview.pod
lib/Mail/Box-Shorts.pod
lib/Mail/Box.pm
lib/Mail/Box/Collection.pm
lib/Mail/Box/Dir.pm
lib/Mail/Box/Dir/Message.pm
lib/Mail/Box/File.pm
lib/Mail/Box/File/Message.pm
lib/Mail/Box/Identity.pm
lib/Mail/Box/Locker.pm
lib/Mail/Box/Locker/DotLock.pm
lib/Mail/Box/Locker/FcntlLock.pm
lib/Mail/Box/Locker/Flock.pm
lib/Mail/Box/Locker/Multi.pm
lib/Mail/Box/Locker/Mutt.pm
lib/Mail/Box/Locker/NFS.pm
lib/Mail/Box/Locker/POSIX.pm
lib/Mail/Box/MH.pm
lib/Mail/Box/MH/Index.pm
lib/Mail/Box/MH/Labels.pm
lib/Mail/Box/MH/Message.pm
lib/Mail/Box/Maildir.pm
lib/Mail/Box/Maildir/Message.pm
lib/Mail/Box/Manage/User.pm
lib/Mail/Box/Manager.pm
lib/Mail/Box/Mbox.pm
lib/Mail/Box/Mbox/Message.pm
lib/Mail/Box/Message.pm
lib/Mail/Box/Message/Destructed.pm
lib/Mail/Box/Net.pm
lib/Mail/Box/Net/Message.pm
lib/Mail/Box/Search.pm
lib/Mail/Box/Search/Grep.pm
lib/Mail/Box/Search/SpamAssassin.pm
lib/Mail/Box/Test.pm
lib/Mail/Box/Thread/Manager.pm
lib/Mail/Box/Thread/Node.pm
lib/Mail/Box/Tie.pm
lib/Mail/Box/Tie/ARRAY.pm
lib/Mail/Box/Tie/HASH.pm
lib/Mail/Message/Body/Delayed.pm
lib/Mail/Message/Dummy.pm
lib/Mail/Message/Head/Delayed.pm
lib/Mail/Message/Head/Subset.pm
lib/Mail/Message/Wrapper/SpamAssassin.pm
lib/Mail/Server.pm
scripts/lsmail
scripts/mailbox2html
scripts/takemail
t/001use.t
t/010platform-crlf.t
t/100mbox-read.t
t/101mbox-write.t
t/102mbox-delay.t
t/103mbox-append.t
t/104mbox-create.t
t/105mbox-thread.t
t/106mbox-inplace.t
t/107mbox-update.t
t/110mh-read.t
t/111mh-write.t
t/112mh-append.t
t/113mh-create.t
t/114mh-thread.t
t/115mh-seqs.t
t/120maildir-read.t
t/121maildir-write.t
t/122maildir-append.t
t/123maildir-destruct.t
t/200folder-copyto.t
t/201folder-tieary.t
t/202folder-tiehash.t
t/210threads-single.t
t/220search-grep.t
t/230msg-destruct.t
t/300manager-open.t
t/301manager-urlopen.t
t/302manager-user.t
t/303manager-collect.t
t/400locking-dotlock.t
t/401locking-flock.t
t/402locking-nfslock.t
t/403locking-posix.t
t/404locking-mutt.t
t/405locking-multi.t
t/500parser-bodyf.t
t/501parser-head.t
t/502parser-bodys.t
t/503parser-bodyl.t
t/504parser-bodyd.t
t/505parser-bodymp.t
t/folders/lockfiletest22660
t/folders/maildir.src/cur/110000000.localhost.12:2,
t/folders/maildir.src/cur/110000001.l.42:2,
t/folders/maildir.src/cur/110000002.l.42:2,
t/folders/maildir.src/cur/110000002.l.43:2,
t/folders/maildir.src/cur/110000004.l.43:2,
t/folders/maildir.src/cur/110000005.l.43:2,
t/folders/maildir.src/cur/110000006.l.43:2,
t/folders/maildir.src/cur/110000007.l.43:2,D
t/folders/maildir.src/cur/110000008.l.43:2,DF
t/folders/maildir.src/cur/110000009.l.43:2,DFR
t/folders/maildir.src/cur/110000010.l.43:2,DFRS
t/folders/maildir.src/cur/110000011.l.43:2,DFRST
t/folders/maildir.src/cur/110000012.l.43:2,F
t/folders/maildir.src/cur/110000013.l.43:2,FR
t/folders/maildir.src/cur/110000014.l.43:2,FRS
t/folders/maildir.src/cur/110000015.l.43:2,FRST
t/folders/maildir.src/cur/110000016.l.43:2,DR
t/folders/maildir.src/cur/110000017.l.43:2,DRS
t/folders/maildir.src/cur/110000018.l.43:2,DRST
t/folders/maildir.src/cur/110000019.l.43:2,FS
t/folders/maildir.src/cur/110000020.l.43:2,FST
t/folders/maildir.src/cur/110000021.l.43:2,R
t/folders/maildir.src/cur/110000022.l.43:2,RS
t/folders/maildir.src/cur/110000023.l.43:2,RST
t/folders/maildir.src/cur/110000024.l.43:2,S
t/folders/maildir.src/cur/110000025.l.43:2,ST
t/folders/maildir.src/cur/110000026.l.43:2,T
t/folders/maildir.src/cur/110000027.l.43:2,
t/folders/maildir.src/cur/110000028.l.43:2,
t/folders/maildir.src/cur/110000029.l.43:2,
t/folders/maildir.src/cur/110000030.l.43:2,
t/folders/maildir.src/cur/110000031.l.43:2,
t/folders/maildir.src/cur/110000032.l.43:2,
t/folders/maildir.src/cur/110000033.l.43:2,
t/folders/maildir.src/cur/110000034.l.43:2,
t/folders/maildir.src/cur/110000035.l.43:2,
t/folders/maildir.src/cur/110000036.l.43:2,
t/folders/maildir.src/cur/110000037.l.43:2,
t/folders/maildir.src/cur/110000038.l.43
t/folders/maildir.src/cur/8000000.localhost.23:2,
t/folders/maildir.src/cur/90000000.localhost.213:2,
t/folders/maildir.src/new/110000039.l.43
t/folders/maildir.src/new/110000040.l.43
t/folders/maildir.src/new/110000041.l.43
t/folders/maildir.src/new/110000042.l.43
t/folders/mbox.cpy
t/folders/mbox.src
t/folders/mbox.win
MANIFEST.extra
html
bin/count
bin
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Mail-Box
version: undef
version_from: lib/Mail/Box.pm
installdirs: site
requires:
Date::Parse: 0
Digest::HMAC_MD5: 0
Errno: 0
File::Remove: 0.2
File::Spec: 0.7
IO::Scalar: 0
Mail::Address: 0
MIME::Base64: 0
MIME::Types: 1.004
Object::Realize::Later: 0.14
Scalar::Util: 1.13
Sys::Hostname: 0
Test::Harness: 1.38
Test::More: 0.47
Time::Zone: 0
URI: 1.23
User::Identity: 0.9
distribution_type: module
generated_by: ExtUtils::MakeMaker version 6.17
use ExtUtils::MakeMaker;
require 5.008_005;
require 5.010;
use IO::Handle;
my $VERSION = '2.121';
# Usually, Scalar::Util is installed (in core since perl 5.8.0)
# However, sometimes it is (incorrectly) installed without XS, but as
# plain module. In that case, Scalar::Util must be reinstalled.
eval { require Scalar::Util };
unless($@)
{ eval "Scalar::Util->import('dualvar')";
if($@ =~ m/only.*XS/)
{ warn <<'WARN';
!!!! WARNING !!!! On your system, the module Scalar::Util is installed
!!!! WARNING !!!! without use of XS. This means that critical functionality
!!!! WARNING !!!! is missing. Reinstall the module and be sure to get the
!!!! WARNING !!!! correct installation.
!!!! WARNING !!!! perl -MCPAN -e 'shell'
!!!! WARNING !!!! > force install Scalar::Util
WARN
}
}
my @optional =
(
#Not mainted, hence disabled for 2.084.
# [ Mail::Box::Parser::C => '3.006'
# , reason => <<'REASON', warning => <<'WARN' ]
#Speeds-up reading mail folders, though most time is consumed by
#Perl's administration of the processed data.
#REASON
#This module contains XS code, so you need a C compiler.
#WARN
# [ Mail::Transport::Dbx => '0.04', reason => <<'REASON' ]
# The wrapper to the Outlook's dbx files consists of a c-library
# named libdbx (website http://sourceforge.net/project/ol2mbox/),
# and a wrapper which is distributed separately from Mail::Box.
# You get read-only access to the dbx folders.
# REASON
#, [ Mail::SpamAssassin => '2.00', reason => <<'REASON', warning => <<'WARN' ]
#Searching for spam in a mail folder needs the popular spam killer.
#REASON
#This distr is large: installing will take quite a while. You
#can install it later. When your CPAN cache is small, this may
#break your Mail::Box installing process.
#WARN
[ Mail::IMAPClient => '3.22', reason => <<'REASON' ]
Required for IMAP4 support.
REASON
, [ Mail::Internet => '2.01', distr => 'MailTools', reason => <<'REASON' ]
Many existing e-mail applications use Mail::Internet objects. If
you want automatic conversions for compatibility, you need this.
REASON
, [ MIME::Entity => '3.0', distr => 'MIME::Tools', reason => <<'REASON' ]
MIME::Entity extends Mail::Internet messages with multipart handling
and composition. Install this when you want compatibility with
distrs which are based on this kind of messages.
REASON
, [ HTML::TreeBuilder => '3.13', reason => <<'REASON' ]
The tree builder is used by the HTML::Format* packages.
Version 3.12 is wrong, so you should install a newer version
if you want smart html conversions.
REASON
, [ Time::HiRes => '1.51', reason => <<'REASON' ]
When installed, unique message-ids will be created using gettimeofday.
Otherwise, generated message-ids will not be thread/fork safe.
REASON
, [ HTML::FormatText => '2.01', distr => 'HTML::FormatText'
, reason => <<'REASON' ]
Plug-in which converts HTML to Postscript or plain text.
REASON
);
my $VERSION = '3.000';
my %prereq =
( Date::Format => 0
, Date::Parse => 0.0
, Digest::HMAC_MD5 => 0.0
, Encode => 2.26
, Errno => 0.0
, File::Remove => '0.20'
( Carp => 0
, Cwd => 0
, Date::Parse => 0
, Devel::GlobalDestruction => 0.09
, Errno => 0
, Fcntl => 0
, File::Basename => 0
, File::Spec => 0.7
, IO::Scalar => 0.0
, Mail::Address => 2.17
, MIME::Base64 => 0.0
, MIME::Types => 1.004
, File::Compare => 0
, File::Copy => 0
, File::Remove => 0.20
, IO::Scalar => 0
, Mail::Message => 3.0
, Mail::Transport => 3.0
, Object::Realize::Later => 0.19
, POSIX => 0
, Scalar::Util => 1.13
, Sys::Hostname => 0.0
, TAP::Harness => '3.00'
, Test::More => 0.47
, Test::Pod => '1.00'
, Time::Zone => 0
, URI => 1.23
, User::Identity => '0.94'
, Devel::GlobalDestruction => 0.09
);
my $default_install_answer
= $ENV{MAILBOX_INSTALL_OPTIONALS}
|| $ENV{INSTALL_MAILBOX_OPTIONALS}; # deprecated
print <<'INTRO';
*
**** Installing MailBox
*
INTRO
print <<'REQUIRED';
# Currently, it seems to be wise not to depend on these
# Mail::SpamAssassin split-off?
# File::FcntLock
* First, I will check the sanity of all required modules... sometimes
* they do not load, for instance if you have installed a new release
* of Perl without upgrading the libraries.
# Split-off distributions which are probably not often used, but have
# many dependencies
# Mail::Box::IMAP4
# Mail::Box::POP3
);
REQUIRED
my @errors;
foreach my $module (sort keys %prereq)
......@@ -157,100 +67,6 @@ FIX
exit 1;
}
print <<'OPTIONAL';
* Now, let me ask you whether you want some optional modules to be
* installed as well. You can always install these modules later, by
* hand, without a need to re-install MailBox.
*
OPTIONAL
foreach my $optional (sort {$a->[0] cmp $b->[0]} @optional)
{ my ($module, $version, %args) = @$optional;
my $requirements = $args{requires} || sub {1};
next unless $requirements->();
if($module eq 'MIME::Entity')
{ # work-around for awkward development situation at home,
# where the VERSION string is not in the development pre-release.
no warnings;
eval "require Mail::Internet";
unless($@)
{ $Mail::Internet::VERSION ||= '2.00';
$Mail::Field::VERSION ||= '2.00';
$Mail::Header::VERSION ||= '2.00';
}
}
# print "\n";
eval "require $module";
if($@)
{ if($@ =~ m/^Can't locate /)
{ print "**** Optional $module is not installed\n" }
else { print "**** Optional $module compilation failed:\n$@\n" }
}
elsif(eval '$module->VERSION($version)' && $@)
{ my $error = $@ || '';
$error =~ s/[\r\n]+$//;
print "**** Optional $module too old: requires $version but is ",
$module->VERSION,";$error\n";
}
else
{ my $v = $module->VERSION;
my $r = $v eq $version ? ''
: $version eq 0 ? " (any version will do)"
: " (at least $version required)";
print "**** Found optional $module version $v$r\n";
next;
}
my $reason = $args{reason};
$reason =~ s/^/ /gm;
$reason =~ s/\A /Use:/;
print $reason;
if(my $warn = $args{warning})
{ $warn =~ s/^/ /gm;
$warn =~ s/\A /WARN/;
print $warn;
}
my $install = $default_install_answer
|| prompt "Do you want to install $module? yes/no/all/none"
, (-t STDIN ? 'y' : 'n');
$install = $default_install_answer = 'y'
if $install =~ m/^a/i;
$install = $default_install_answer = 'n'
if $install =~ m/^non/i;
next if $install !~ m/^y/i;
my $distr = $args{distr} || $module;
$prereq{$distr} = $version;
print " Added $distr version $version to the requirements\n";
}
my $tests = $ENV{MAILBOX_RUN_TESTS}
|| prompt "Do you want to run the (large set of) tests? yes/no", "yes";
if($tests =~ m/n/i)
{ open F, ">", "skiptests";
close F;
}
else
{ unlink "skiptests";
}
print <<'MAKEFILE';
**** Writing Makefile
MAKEFILE
WriteMakefile
( NAME => 'Mail::Box'
, VERSION => $VERSION
......@@ -268,12 +84,13 @@ RAWDIR = ../public_html/mailbox/raw
DISTDIR = ../public_html/mailbox/source
LICENSE = artistic
EXTENDS = ../UserIdentity:../MimeTypes:../ORL:../MailTools2:../MailBoxC
EXTENDS = ../UserIdentity:../MimeTypes:../ORL:../MailTools2:../MailBoxC:../MailMessage:../MailTransport:../MailIMAP:../MailPOP:../MailDbx
# for POD
FIRST_YEAR = 2001
EMAIL = perl@overmeer.net
WEBSITE = http://perl.overmeer.net/mailbox/
PODTAIL = ../MailBox-shared-podtail
# for HTML
HTML_OUTPUT = ../public_html/mailbox/html
......@@ -281,9 +98,3 @@ HTML_DOCROOT = /mailbox/html
HTML_PACKAGE = ../public_html/mailbox/htmlpkg
__POSTAMBLE
print <<'DONE';
**** Done
DONE
This file lists the things to do
Question marks:
what if appendMessage fails
flock() stacked on flock() by same process on AIX and Solaris
Optional:
References/mozilla-flags
filehandle as folder source
no read for MH index in append mode niet lezen.
Processing folders with non-platform-native line separators.
appendMessage opens folder, but not needed.
fix_header_errors option for Mail::Box::Parser::C
Body::* _data_from_*() may use $. in some cases. This would speed-up
body creation.
Automatic detection of best body-type in Mail::Message::Body::new
can be done better. For instance: use ::Body::Extern for binaries.
Mail::Message::Body::External
Mail::Message::Body::InFolder
Doc re-read.
examples/
Mail::Message::Head::Delayed::read()
guessBodySize in MH can be implemented without trigger
Mail::Message::Body::Scalar can get nrLines from read()
fromBody with nested multiparts at once.
updateMessages for Mail::Box::Mbox
updateMessages for Mail::Box::MH
demoting messages which stay when their folder closes.
concatenate within reply must shape after source message, not prelude
$body->beautify;
Maildir quota
#!/usr/bin/perl
use warnings;
use strict;
use Encode qw/find_encoding/;
sub status($);
open GET, "wget http://www.iana.org/assignments/character-sets --output-document=- |"
or die $!;
while(<GET>)
{
if( m/(Name|Alias)\:\s+(\S+)/ )
{ my $status = status $2;
s/^/$status/e;
}
else
{ s/^/ /;
}
print;
}
sub status($)
{ my $charset = shift;
$charset =~ m/^none$/i and return ' ';
my $enc = find_encoding $charset;
defined $enc ? '+' : '*';
}
This diff is collapsed.
......@@ -29,6 +29,31 @@ slower) if you need the full folder sequentially.
You may want to have a look at the sample scripts in the C<scripts>
directory.
=section Distributions
Upto MailBox v2, all C<Mail::*> modules where released as a single
distribution. From v3, there are a few separate distributions in an
attempt to reduce the dependencies:
=over 4
=item * Mail::Message
=item * Mail::Transfer
=item * Mail::Box
=item * Mail::Box::IMAP4
=item * Mail::Box::POP3
=item * Mail::Box::Parser::C
=back
The names of the classes are not always ideal: the 'Mail' namespace on
CPAN is quite full.
=section The class relations
M<Mail::Box::Manager> objects play a central role in any program which
......