Mail-Box-2.118/0000755000175000001440000000000012473604501013655 5ustar00markovusers00000000000000Mail-Box-2.118/tests/0000755000175000001440000000000012473604501015017 5ustar00markovusers00000000000000Mail-Box-2.118/tests/60imap/0000755000175000001440000000000012473604501016113 5ustar00markovusers00000000000000Mail-Box-2.118/tests/60imap/Definition.pm0000644000175000001440000000055612473604424020553 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::60imap::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Server::IMAP; imap server"} sub critical {0} sub skip { undef } 1; Mail-Box-2.118/tests/60imap/10fetch.t0000644000175000001440000001411112473603434017534 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test body-structure capturing for IMAP servers use strict; use warnings; use Test::More; use lib qw(. .. tests); use Tools; use Mail::Message; use Mail::Message::Body::Lines; use Mail::Server::IMAP4::Fetch; my $msif = 'Mail::Server::IMAP4::Fetch'; BEGIN { plan tests => 44; } my $msg = Mail::Message->build ( From => 'I myself and me ' , To => 'you@example.com' , Date => 'now' , Subject => 'Life of Brian' , 'Message-ID' => 'unique' , data => [ "two\n", "lines\n" ] ); ok($msg, "First, simple message built"); my $f = $msif->new($msg); isa_ok($f, $msif); ok($f->part() == $f); ok(!defined $f->part('1')); #use Data::Dumper; #print Dumper $f; is($f->fetchBody(0)."\n", <<__BODY, '...body'); ("TEXT" "PLAIN" ("charset" "utf-8") "" NIL "8BIT" 10 2) __BODY is($f->fetchBody(1)."\n", <<__BODYSTRUCT, '...bodystruct'); ("TEXT" "PLAIN" ("charset" "utf-8") "" NIL "8BIT" 10 2 NIL ("inline") NIL) __BODYSTRUCT is($f->fetchEnvelope."\n", <<__ENVELOPE, '...envelope'); ("now" "Life of Brian" ("I myself and me" NIL "me" "localhost") NIL NIL (NIL NIL "you" "example.com") NIL NIL NIL "") __ENVELOPE # # Simple multipart # my $data = Mail::Message::Body::Lines->new ( mime_type => 'audio/mpeg3' , transfer_encoding => 'base64' , charset => 'utf8' , data => "ABBA\n" ); my $mp = Mail::Message->build ( From => 'me' , Date => 'now' , Subject => 'multi' , 'Message-ID' => 'unique' , data => [ "two\n", "lines\n" ] , attach => $data ); ok(defined $mp, "Simple multipart"); $f = $msif->new($mp); isa_ok($f, $msif); ok($f->part() == $f); is($f->fetchBody(0)."\n", <<__BODY, '...body'); (("TEXT" "PLAIN" ("charset" "utf-8") NIL NIL "8BIT" 10 2)("AUDIO" "MPEG3" () NIL NIL "BASE64" 5 1) "MIXED") __BODY is($f->fetchBody(1)."\n", <<__BODYSTRUCT, '...bodystruct'); (("TEXT" "PLAIN" ("charset" "utf-8") NIL NIL "8BIT" 10 2 NIL ("inline") NIL)("AUDIO" "MPEG3" () NIL NIL "BASE64" 5 1 NIL ("attachment") NIL) "MIXED") __BODYSTRUCT is($f->fetchEnvelope."\n", <<__ENVELOPE, '...envelope'); ("now" "multi" NIL NIL NIL NIL NIL NIL NIL "") __ENVELOPE ok($f->part('1'), "Has two parts"); ok($f->part('2')); ok(!$f->part('3')); ok(!$f->part('1.1')); my $g = $f->part('2'); isa_ok($g, $msif); is($g->fetchBody(0)."\n", <<__BODY, '...body'); ("AUDIO" "MPEG3" () NIL NIL "BASE64" 5 1) __BODY is($g->fetchBody(1)."\n", <<__BODYSTRUCT, '...bodystruct'); ("AUDIO" "MPEG3" () NIL NIL "BASE64" 5 1 NIL ("attachment") NIL) __BODYSTRUCT is($g->fetchEnvelope."\n", <<__ENVELOPE, '...envelope'); (NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL) __ENVELOPE # # All fields in an envelope # my $a = Mail::Message->build ( From => 'FROM ' , To => 'TO ' , Cc => 'CC ' , Bcc => 'BCC ' , Sender => 'SENDER ' , 'Reply-To' => 'RT ' , Date => 'today' , Subject => 'subject' , 'Content-Type' => 'video/vhs' , 'Content-Disposition' => 'attachment; filename="private-video.ras"; size=100' , 'Content-Language' => 'nl-NL, nl-BE' , 'Content-Description' => 'blue movie' , 'Message-ID' => 'unique-id-123' , data => "BINARY data for video" ); ok(defined $a, "Full envelope"); #$a->print(\*STDERR); ##### get should become study ## my $s = $a->study('Content-Disposition'); ## isa_ok($s, 'Mail::Message::Field::Structured'); my $s = $a->head->get('Content-Disposition'); isa_ok($s, 'Mail::Message::Field'); is($s->attribute('filename'), 'private-video.ras', '...one attr'); my %attrs = $s->attributes; cmp_ok(keys %attrs, '==', 2, '...nr attrs'); is($attrs{filename}, 'private-video.ras', '...filename'); is($attrs{size}, 100, '...size'); $f = $msif->new($a); isa_ok($f, $msif); is($f->fetchBody(0)."\n", <<__BODY, "...body"); ("VIDEO" "VHS" () "" "blue movie" "BASE64" 29 1) __BODY is($f->fetchBody(1)."\n", <<__BODYSTRUCT, "...bodystruct"); ("VIDEO" "VHS" () "" "blue movie" "BASE64" 29 1 NIL ("attachment" "filename" "private-video.ras" "size" "100") "nl-NL, nl-BE") __BODYSTRUCT is($f->fetchEnvelope."\n", <<__ENVELOPE, "...envelope"); ("today" "subject" ("FROM" NIL "from" "from.home") ("SENDER" NIL "sender" "sender.home") ("RT" NIL "replyto" "rt.home") ("TO" NIL "to" "to.home") ("CC" NIL "cc" "cc.home") ("BCC" NIL "bcc" "bcc.home") NIL "") __ENVELOPE # # Nested # my $b = Mail::Message->build ( To => 'someelse@somewhere.aq' , 'Message-Id' => 'newid' , Date => 'tomorrow' , attach => $msg ); ok(defined $b, "Constructed nested message"); isa_ok($b, 'Mail::Message'); ok($b->isNested, 'check structure'); $f = $msif->new($b); isa_ok($f, $msif); #$b->print(\*STDERR); is($f->fetchBody(0)."\n", <<__BODY, "...body"); ("MESSAGE" "RFC822" () "" NIL "8BIT" 212 ("now" "Life of Brian" ("I myself and me" NIL "me" "localhost") NIL NIL (NIL NIL "you" "example.com") NIL NIL NIL "") ("TEXT" "PLAIN" ("charset" "utf-8") "" NIL "8BIT" 10 2) 11) __BODY is($f->fetchBody(1)."\n", <<__BODYSTRUCT, "...bodystruct"); ("MESSAGE" "RFC822" () "" NIL "8BIT" 212 ("now" "Life of Brian" ("I myself and me" NIL "me" "localhost") NIL NIL (NIL NIL "you" "example.com") NIL NIL NIL "") ("TEXT" "PLAIN" ("charset" "utf-8") "" NIL "8BIT" 10 2 NIL ("inline") NIL) 11 NIL ("inline") NIL) __BODYSTRUCT is($f->fetchEnvelope."\n", <<__ENVELOPE, "...envelope"); ("tomorrow" NIL NIL NIL NIL (NIL NIL "someelse" "somewhere.aq") NIL NIL NIL "") __ENVELOPE #$b->print(\*STDERR); $g = $f->part('1'); ok(defined $g, "nested info"); isa_ok($g, $msif); ok($f != $g); is($g->fetchBody(0)."\n", <<__BODY, "...body"); ("TEXT" "PLAIN" ("charset" "utf-8") "" NIL "8BIT" 10 2) __BODY is($g->fetchBody(1)."\n", <<__BODYSTRUCT, "...bodystruct"); ("TEXT" "PLAIN" ("charset" "utf-8") "" NIL "8BIT" 10 2 NIL ("inline") NIL) __BODYSTRUCT is($g->fetchEnvelope."\n", <<__ENVELOPE, "...envelope"); ("now" "Life of Brian" ("I myself and me" NIL "me" "localhost") NIL NIL (NIL NIL "you" "example.com") NIL NIL NIL "") __ENVELOPE Mail-Box-2.118/tests/60imap/20list.t0000644000175000001440000001343312473603434017425 0ustar00markovusers00000000000000#!/usr/bin/env perl # Test list command for IMAP servers # # A lot of the basic administration handling is tested in 52manager/30collect.t use strict; use warnings; use Test::More; use lib qw(. .. tests); use Tools; use Mail::Server::IMAP4::List; use Mail::Box::MH; use Mail::Box::Identity; my $msil = 'Mail::Server::IMAP4::List'; my $mbi = 'Mail::Box::Identity'; BEGIN { plan tests => 41; } my @boxes = qw( a1 a1/b1 a1/b2 a1/b2/c1 a1/b2/c2 a1/b2/c3 a1/b2/c3/d1 a1/b2/c3/d2 a1/b3 a2 a3 ); # Create the directory hierarchy my $top = '60imap-test'; clean_dir($top); mkdir $top or die "$top: $!"; foreach my $box (@boxes) { my $dir = "$top/$box"; mkdir $dir or die "$dir: $!"; } # Create the top object my $folders = $mbi->new ( name => '=' , folder_type => 'Mail::Box::MH' , only_subs => 1 ); ok(defined $folders, "Created the top folder"); isa_ok($folders, $mbi); # Load the structure my $count = 0; sub setloc($) { my $node = shift; my $full = $node->fullname; $full =~ s/^\=/$top/; $node->location($full); $count++; } $folders->foreach(\&setloc); cmp_ok($count, '==', @boxes+1, "Succesfully expanded"); ok($folders->onlySubfolders, "top without msgs"); my $a1 = $folders->folder('a1'); ok(defined $a1, "found $a1"); ok(!$a1->onlySubfolders, "other with msgs"); # # Let's do the simple LIST check. # sub str(@) { return '' unless @_; my @lines; foreach my $record (@_) { my($flags, $delim, $rest) = @$record; $rest = '""' unless length $rest; push @lines, "$flags \"$delim\" $rest\n"; } join '', @lines; } my $imap = $msil->new(folders => $folders, delimiter => '#'); isa_ok($imap, $msil); is(str($imap->list('', '')), <<'__DELIM', 'as for delim'); (\Noselect) "#" "" __DELIM is(str($imap->list('#', 'a1')), <<'__DELIM'); () "#" #a1 __DELIM $folders->folder('a1')->deleted(1); is(str($imap->list('#', 'a1')), <<'__DELIM'); (\Noselect) "#" #a1 __DELIM $folders->folder('a1')->deleted(0); is(str($imap->list('#', 'a1')), <<'__DELIM'); () "#" #a1 __DELIM $folders->folder('a1')->onlySubfolders(1); is(str($imap->list('#', 'a1')), <<'__DELIM'); (\Noselect) "#" #a1 __DELIM $folders->folder('a1')->marked(1); is(str($imap->list('#', 'a1')), <<'__DELIM', 'marked'); (\Noselect \Marked) "#" #a1 __DELIM $folders->folder('a1')->marked(0); is(str($imap->list('#', 'a1')), <<'__DELIM', 'unmarked'); (\Noselect \Unmarked) "#" #a1 __DELIM $folders->folder('a1')->marked(undef); is(str($imap->list('#', 'a1')), <<'__DELIM', 'not marked'); (\Noselect) "#" #a1 __DELIM is(str($imap->list('a1', 'b1')), <<'__DELIM', 'straight forward'); () "#" #a1#b1 __DELIM is(str($imap->list('a1', 'none')), <<'__DELIM', 'missing'); __DELIM is(str($imap->list('a1#b2', 'c3')), <<'__DELIM', 'stacking'); () "#" #a1#b2#c3 __DELIM # # Flags # my $abc = $folders->folder('a1', 'b2', 'c3'); ok(defined $abc, 'got abc'); $abc->marked(1); is(str($imap->list('a1#b2', 'c3')), <<'__DELIM', 'abc marked'); (\Marked) "#" #a1#b2#c3 __DELIM $abc->marked(0); is(str($imap->list('a1#b2', 'c3')), <<'__DELIM', 'abc unmarked'); (\Unmarked) "#" #a1#b2#c3 __DELIM $abc->marked(undef); is(str($imap->list('a1#b2', 'c3')), <<'__DELIM', 'abc undef marked'); () "#" #a1#b2#c3 __DELIM $abc->inferiors(0); is(str($imap->list('a1#b2', 'c3')), <<'__DELIM', 'abc no inferiors'); (\Noinferiors) "#" #a1#b2#c3 __DELIM $abc->inferiors(1); is(str($imap->list('a1#b2', 'c3')), <<'__DELIM', 'abc inferiors'); () "#" #a1#b2#c3 __DELIM $abc->inferiors(0); $abc->marked(1); is(str($imap->list('a1#b2', 'c3')), <<'__DELIM', 'abc inferiors'); (\Noinferiors \Marked) "#" #a1#b2#c3 __DELIM $abc->inferiors(1); $abc->marked(1); is(str($imap->list('a1#b2', 'c3')), <<'__DELIM', 'abc inferiors'); (\Marked) "#" #a1#b2#c3 __DELIM # # Now for some real searching # is(str($imap->list('a1#none', '%')), <<'__DELIM', 'find none %'); __DELIM is(str($imap->list('a1#none', '*')), <<'__DELIM', 'find none *'); __DELIM is(str($imap->list('a1#b1', '%')), <<'__DELIM', 'find here %'); () "#" #a1#b1 __DELIM is(str($imap->list('a1#b1', '*')), <<'__DELIM', 'find here *'); () "#" #a1#b1 __DELIM is(str($imap->list('a1#b2', '%')), <<'__DELIM', 'find none %'); () "#" #a1#b2#c1 () "#" #a1#b2#c2 (\Marked) "#" #a1#b2#c3 __DELIM is(str($imap->list('a1#b2', '*')), <<'__DELIM', 'find none *'); () "#" #a1#b2 () "#" #a1#b2#c1 () "#" #a1#b2#c2 (\Marked) "#" #a1#b2#c3 () "#" #a1#b2#c3#d1 () "#" #a1#b2#c3#d2 __DELIM is(str($imap->list('a1', '%#b3')), <<'__DELIM', 'find inside %'); __DELIM is(str($imap->list('a1', '*#b3')), <<'__DELIM', 'find inside *'); () "#" #a1#b3 __DELIM is(str($imap->list('a1', 'b2#*')), <<'__DELIM', 'find inside *'); () "#" #a1#b2 () "#" #a1#b2#c1 () "#" #a1#b2#c2 (\Marked) "#" #a1#b2#c3 () "#" #a1#b2#c3#d1 () "#" #a1#b2#c3#d2 __DELIM is(str($imap->list('a1', '*#c2')), <<'__DELIM', 'find inside *'); () "#" #a1#b2#c2 __DELIM is(str($imap->list('a1', '*#d2')), <<'__DELIM', 'find inside *'); () "#" #a1#b2#c3#d2 __DELIM # # Complicated delimiter, as defined by the RFC. Examples in 6.3.8 # sub combi_delim($) { my $path = shift; my ($delim, $root) = $path =~ m/^(#news\.)/ ? ('.', $1) : $path =~ m!^/! ? ('/', '/') : ('/', ''); wantarray ? ($delim, $root) : $delim; } $folders->onlySubfolders(0); ok(! $folders->onlySubfolders); $imap = $msil->new(folders => $folders, delimiter => \&combi_delim); is(str($imap->list('', '')), <<'__DELIM', 'combi delim'); (\Noselect) "/" "" __DELIM is(str($imap->list('#news.comp.mail.misc', '')), <<'__DELIM'); (\Noselect) "." #news. __DELIM is(str($imap->list('/usr/staff/jones', '')), <<'__DELIM'); (\Noselect) "/" / __DELIM clean_dir($top); Mail-Box-2.118/tests/31fgroups/0000755000175000001440000000000012473604501016650 5ustar00markovusers00000000000000Mail-Box-2.118/tests/31fgroups/Definition.pm0000644000175000001440000000060212473604424021300 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::31fgroups::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Message::Head::FieldGroup; grouping fields"} sub critical {0} sub skip { undef } 1; Mail-Box-2.118/tests/31fgroups/sgfolder0000644000175000001440000011202112473603434020401 0ustar00markovusers00000000000000From melanie.mcdonald_el@freemail.it Mon Aug 11 08:16:21 2003 Return-Path: Delivered-To: markov@speeltuin.atcomputing.nl Received: from pandora.cs.kun.nl (pandora.cs.kun.nl [131.174.33.4]) by speeltuin.ATComputing.nl (Postfix) with ESMTP id 9319C39AD for ; Mon, 11 Aug 2003 08:16:20 +0200 (CEST) Received: from turk.net by pandora.cs.kun.nl via 12-221-78-16.client.insightBB.com [12.221.78.16] with ESMTP for id h7B6KvKc009534 (8.12.9/3.58); Mon, 11 Aug 2003 08:20:59 +0200 (MET DST) Message-ID: <3F3736A8.09D1E60C@freemail.it> From: "Melanie Mcdonald" To: markov@cs.kun.nl Subject: Did you lose my ICQ? Date: Mon, 11 Aug 2003 06:24:40 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.030 (X11; U; FreeBSD i386; U; NT4.0; en-us) Gecko/25250101 X-Accept-Language: en Content-Type: text/html Content-Transfer-Encoding: 8bit X-Spam-Status: Yes, hits=5.9 required=5.0 tests=CLICK_BELOW,HTML_70_80,HTML_MESSAGE,MIME_HTML_ONLY, OBFUSCATING_COMMENT,RCVD_IN_NJABL,RCVD_IN_UNCONFIRMED_DSBL, REPLY_TO_EMPTY,USER_AGENT_MOZILLA_UA,VIAGRA_ONLINE, X_ACCEPT_LANG version=2.55 X-Spam-Level: ***** X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) X-Spam-Report: This mail is probably spam. The original message has been attached along with this report, so you can recognize or block similar unwanted mail in future. See http://spamassassin.org/tag/ for more details. Content preview: Get Viagra online Now ! We are the cheapest supplier on the net 100 % guarantee ! at 3 $ a dose, try it now. URI:http://www.xcellentresults.biz/index.php?id99 Click here URI:http://www.xcellentresults.biz/optout.php Discontinue receiving offers jb80v63snt3fht3tr6135os80 5bbdjf2r52f qopu343yz1frdybc3od6n0j4rq8ct26mhfo 1v5qat38wft9a 2ryjqw25fiate2oi11727 [...] Content analysis details: (5.90 points, 5 required) REPLY_TO_EMPTY (0.5 points) Reply-To: is empty USER_AGENT_MOZILLA_UA (0.0 points) User-Agent header indicates a non-spam MUA (Mozilla) X_ACCEPT_LANG (-0.1 points) Has a X-Accept-Language header VIAGRA_ONLINE (0.7 points) BODY: Fast Viagra Delivery HTML_MESSAGE (0.1 points) BODY: HTML included in message HTML_70_80 (0.5 points) BODY: Message is 70% to 80% HTML RCVD_IN_NJABL (0.9 points) RBL: Received via a relay in dnsbl.njabl.org [RBL check: found 16.78.221.12.dnsbl.njabl.org.,] [type: 127.0.0.9] RCVD_IN_UNCONFIRMED_DSBL (0.5 points) RBL: Received via a relay in unconfirmed.dsbl.org [RBL check: found 16.78.221.12.unconfirmed.dsbl.org.] CLICK_BELOW (0.1 points) Asks you to click below MIME_HTML_ONLY (0.1 points) Message only has text/html MIME parts OBFUSCATING_COMMENT (2.6 points) HTML comments which obfuscate text X-Spam-Flag: YES Content-Length: 1240 Lines: 9

Get Viagra online Now !

We are the cheapest supplier on the net
100 % guarantee !
at 3 $ a dose, try it now. Click here






Discontinue receiving offers jb80v63snt3fht3tr6135os80 5bbdjf2r52f qopu343yz1frdybc3od6n0j4rq8ct26mhfo 1v5qat38wft9a 2ryjqw25fiate2oi11727

From ueybt082vz@terra.es Mon Aug 11 10:00:38 2003 Return-Path: Delivered-To: markov@speeltuin.atcomputing.nl Received: from 195.108.229.26 (unknown [202.109.97.239]) by speeltuin.ATComputing.nl (Postfix) with SMTP id C0D8339AD for ; Mon, 11 Aug 2003 10:00:31 +0200 (CEST) Received: from (HELO llyrfu) [131.190.221.35] by 195.108.229.26 with ESMTP id <288253-09166>; Fri, 01 Mar 2002 14:21:45 +0200 Message-ID: <1-n6o1zyzz1i0b--2aquh-347i@twbg9ccjh> From: "Jewel Jacobson" Reply-To: "Jewel Jacobson" To: mark@overmeer.net Subject: RE:leukemia B anned kcvl jrghbvw Date: Fri, 01 Mar 2002 14:21:45 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="538B6B3B604.0D." X-Spam-Status: No, hits=3.1 required=5.0 tests=BASE64_ENC_TEXT,HTML_50_60,HTML_MESSAGE, MIME_HTML_NO_CHARSET,MIME_HTML_ONLY version=2.55 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Status: RO Content-Length: 3201 Lines: 52 --538B6B3B604.0D. Content-Type: text/html; Content-Transfer-Encoding: base64 PGh0bWw+DQo8Zm9udCBzaXplPSIxIj5kZXJieXNoaXJlIGRpb24gIG8gY2d0aXINCmpkYmdi bnl5a3pwcXl1IGwmbmJzcDsgZWxpemFiZXRoYW48L2ZvbnQ+DQo8dGFibGUgYm9yZGVyPSIw IiB3aWR0aD0iNTclIiBjZWxsc3BhY2luZz0iMCI+DQogIDx0cj4NCiAgICA8dGQgd2lkdGg9 IjEwMCUiPg0KICAgICAgPHAgYWxpZ249ImNlbnRlciI+PGltZyBib3JkZXI9IjAiIHNyYz0i aHR0cDovL21lZHMyNDcuaW5mby9jZC9hZHMuanBnIiBhbHQ9ImFzZGZhc2RmYXNkZmFzZCAg YXNkZmFzZGZhc2QgYXNkZmFzZGZhc2QgYWZzZGZhc2RmYXNkZnNkZiBzZGZzZGZzZGZzZGZz ZCI+PC90ZD4NCiAgPC90cj4NCiAgPHRyPg0KICAgIDx0ZCB3aWR0aD0iMTAwJSI+DQogICAg ICA8cCBhbGlnbj0iY2VudGVyIj4NCiZuYnNwOyBIaSw8Zm9udCBzaXplPSIyIj5NYXJrPC9m b250PiwgSQ0KICAgICAgaGF2ZSBiZWVuIHJlY2VpdmluZyBlbWFpbHMgc2F5aW5nIHRoYXQg SSdtIGNvbnRyaWJ1dGluZyB0byB0aGUgJnF1b3Q7bW9yYWwNCiAgICAgIGRlY2F5IG9mIHNv Y2lldHkmcXVvdDsgYnkgc2VsbGluZyB0aGUgQmFubmVkIEMgRC4gVGhhdCBtYXkgYmUsIGJ1 dCBJIGZlZWwNCiAgICAgIFN0cm9uZ2x5IHRoYXQgeW91IGhhdmUgYSByaWdodCB0byBiZW5l Zml0IGZyb20gdGhpcyBoYXJkLXRvLWZpbmQNCiAgICAgIGluZm9ybWF0aW9uLiBTbyBJIGFt IGdpdmluZyB5b3Ugb25lIGxhc3QgY2hhbmNlIHRvIG9yZGVyIHRoZSBCYW5uZWQgQyBEIQ0K ICAgICAgV2l0aCB0aGlzIHBvd2VyZnVsIEMgRCwgeW91IHdpbGwgYmUgYWJsZSB0byBpbnZl c3RpZ2F0ZSB5b3VyIGZyaWVuZHMsDQogICAgICBlbmVtaWVzIGFuZCBsb3ZlcnMgaW4ganVz dCBtaW51dGVzIHVzaW5nIHRoZSBJbnRlcm5ldC4gWW91IGNhbiB0cmFjayBkb3duDQogICAg ICBvbGQgZmxhbWVzIGZyb20gY29sbGVnZSwgb3IgeW91IGNhbiBkaWcgdXAgc29tZSBkaXJ0 IG9uIHlvdXIgYm9zcyB0byBtYWtlDQogICAgICBzdXJlIHlvdSBnZXQgdGhhdCBuZXh0IHBy b21vdGlvbiEgPGJyPg0KICAgICAgV2h5IGFyZSB0aGV5IHNvIHVwc2V0PyBCZWNhdXNlIHRo aXMgQyBEIGdpdmVzIHlvdSBmcmVlZG9tLiBBbmQgeW91IGNhbid0DQogICAgICBidXkgZnJl ZWRvbSBhdCB5b3VyIGxvY2FsIFdhbG1hcnQuIFlvdSB3aWxsIGhhdmUgdGhlIGZyZWVkb20g dG8gYXZvaWQgYyByZWRpdG9ycywganVkZ21lbnRzLCBsYXdzdWl0cywgSVJTIHRheGNvbGxl Y3RvcnMsIGNyaW1pbmFsIGluZGljdG1lbnRzLA0KICAgICAgeW91ciBncmVlZHkgZXgtd2lm ZSBvciBleC1odXNiYW5kLCBhbmQgbXVjaCBtb3JlISA8YSBocmVmPSJodHRwOi8vbWVkczI0 Ny5pbmZvL0NEL2luZGV4Lmh0bSI+PGZvbnQgc2l6ZT0iMiI+U2VlJm5ic3A7DQogICAgICBO b3c8L2ZvbnQ+PC9hPjxmb250IHNpemU9IjIiPiA8L2ZvbnQ+PC9wPg0KICAgICAgPGRpdiBh bGlnbj0ibGVmdCI+DQogICAgICAgIDxmb250IGNvbG9yPSIjMDAwMDAwIiBmYWNlPSJBcmlh bCIgc2l6ZT0iMSI+IA0KICAgICAgICA8YSBocmVmPSJodHRwOi8vbWVkc2QyNDcuaW5mby9E ZWJ0Mi9ydGgucGhwIj4NCm4mbmJzcDsmbmJzcDsmbmJzcDsgbyZuYnNwOyZuYnNwOyBtJm5i c3A7Jm5ic3A7IGEmbmJzcDsmbmJzcDsgaSZuYnNwOyZuYnNwOyZuYnNwOw0KbDwvYT48L2Zv bnQ+DQogICAgICA8L2Rpdj4NCiAgICAgIDxkaXYgYWxpZ249ImxlZnQiPg0KICAgICAgICA8 Zm9udCBzaXplPSIxIj5hJm5ic3A7Jm5ic3A7IGxhdXJlbmNlJm5ic3A7ICUgUkFORE9NX0NI QVImbmJzcDsNCiAgICAgICAgcXVhZHJpcGFydGl0ZSZuYnNwOzwvZm9udD4NCiAgICAgIDwv ZGl2Pg0KICAgICAgPGRpdiBhbGlnbj0ibGVmdCI+DQogICAgICAgIDxmb250IHNpemU9IjEi PmNsYXNzaWMmbmJzcDsgeWYgYWdzIHVsdQ0KcyB4ICAgYSZuYnNwOyZuYnNwOyBhJm5ic3A7 Jm5ic3A7Jm5ic3A7DQogICAgICAgIGFsYW48L2ZvbnQ+DQogICAgICA8L2Rpdj4NCiAgICAg IDxkaXYgYWxpZ249ImxlZnQiPg0KICAgICAgICA8Zm9udCBzaXplPSIxIj5kb3JvdGh5Jm5i c3A7IGplYmRsY29zc2RyaWFucGsgDQp0aHltZ24NCg0KIGR4IGVkYXJyaSAgJm5ic3A7Jm5i c3A7IHUmbmJzcDsmbmJzcDsmbmJzcDsNCiAgICAgICA8L2ZvbnQ+DQogICAgICA8L2Rpdj4N CiAgICAgIDxkaXYgYWxpZ249ImxlZnQiPg0KICAgICAgPC9kaXY+DQogICAgPC90ZD4NCiAg PC90cj4NCjwvdGFibGU+DQo8L2h0bWw+bCBlcW9paWd5dnNweHpyb2xydncgbSB3c2Z0IGEN CnZpZnBocCBheW9wDQp3empyDQp3dGI= --538B6B3B604.0D.-- From xuzeq307@yahoo.ca Mon Aug 11 10:20:21 2003 Return-Path: Delivered-To: markov@speeltuin.atcomputing.nl Received: from PROXY (unknown [203.197.217.130]) by speeltuin.ATComputing.nl (Postfix) with SMTP id E6C5939AB for ; Mon, 11 Aug 2003 10:20:15 +0200 (CEST) Received: from [169.14.160.200] by PROXY id Sl8tcqcbBmL2; Mon, 11 Aug 2003 02:21:46 -0700 Message-ID: <5225$2$t-9t2dh9vr$14@lcfpb0> From: "Aurelia Grover" Reply-To: "Aurelia Grover" To: Subject: Solutions Free ebay course for you attestation Date: Mon, 11 Aug 03 02:21:46 GMT X-Mailer: Microsoft Outlook, Build 10.0.2616 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="D_FD_0_5E_1" X-Priority: 1 X-MSMail-Priority: High X-Spam-Status: Yes, hits=10.9 required=5.0 tests=CASHCASHCASH,DATE_IN_PAST_06_12,FORGED_MUA_OUTLOOK, FROM_ENDS_IN_NUMS,HTML_30_40,HTML_FONT_BIG, HTML_FONT_COLOR_BLUE,HTML_FONT_COLOR_GREEN, HTML_FONT_COLOR_RED,HTML_FONT_FACE_ODD,HTML_MESSAGE, MIME_HTML_NO_CHARSET,MIME_HTML_ONLY,MISSING_MIMEOLE, X_PRIORITY_HIGH version=2.55 X-Spam-Level: ********** X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) X-Spam-Report: This mail is probably spam. The original message has been attached along with this report, so you can recognize or block similar unwanted mail in future. See http://spamassassin.org/tag/ for more details. Content preview: eBay FREE Training Conference eBay and You Let's Get You making $$$ Stop buying your products from the Middle Man Attend a Free Online Product Sales and Acquisition Conference [...] Content analysis details: (10.90 points, 5 required) X_PRIORITY_HIGH (1.9 points) Sent with 'X-Priority' set to high FROM_ENDS_IN_NUMS (0.7 points) From: ends in numbers HTML_30_40 (0.9 points) BODY: Message is 30% to 40% HTML HTML_FONT_FACE_ODD (0.3 points) BODY: HTML font face is not a commonly used face HTML_FONT_COLOR_RED (0.1 points) BODY: HTML font color is red HTML_MESSAGE (0.1 points) BODY: HTML included in message HTML_FONT_COLOR_GREEN (0.8 points) BODY: HTML font color is green HTML_FONT_BIG (0.3 points) BODY: FONT Size +2 and up or 3 and up HTML_FONT_COLOR_BLUE (0.1 points) BODY: HTML font color is blue MIME_HTML_NO_CHARSET (0.8 points) RAW: Message text in HTML without specified charset DATE_IN_PAST_06_12 (0.8 points) Date: is 6 to 12 hours before Received: date MISSING_MIMEOLE (0.5 points) Message has X-MSMail-Priority, but no X-MimeOLE MIME_HTML_ONLY (0.1 points) Message only has text/html MIME parts FORGED_MUA_OUTLOOK (3.5 points) Forged mail pretending to be from MS Outlook CASHCASHCASH (0.0 points) Contains at least 3 dollar signs in a row X-Spam-Flag: YES Status: RO Content-Length: 2529 Lines: 69 --D_FD_0_5E_1 Content-Type: text/html; Content-Transfer-Encoding: quoted-printable eBay FREE Training Conference
eBay and You
Let's Get You making $$$
Stop buying your products from the Middle Man


Attend a Free Online Product Sa= les and Acquisition Conference


To make money on eBay and the Internet you need to get the source product = at deep discounts. In this free online conference you will
learn how to acquire thousands of products directly from the manufacturers    (cut= the middlemen and buying clubs) at wholesale or less - including overstocks and discontinued items for pennie= s on the dollar.


Who is this conference for?

Beginners - that want to do it the righ= t way from the start
Intermediate - Have had some fun and ma= de a little money and now want to get serious
Advanced - Increase your profit margins= and double or triple the money you make.


Remember this - you make your m= oney when you buy the product - you realize your profit when you sell the product.

In this FREE online training conference you will learn:

  • How to Buy and Sell For Maximum Profits
  • eBay Listing and Launching Secrets of the Experts
  • What licensing is needed to work directly with manufactu= rers
  • How a Web Presence can double your gross revenues
  • Automating your auctions for even larger profits
  • How to generate several streams of auction and Internet = revenue


    Register HERE for the powe= rful training right now - The training is taught live and at the comfort of your own personal computer and it is FREE!

    (You can remove yourself at th= e website.)

  • flmsmybnyvy ddtpfs n hcjkd bx vcut --D_FD_0_5E_1-- From pfx2hdcrd@yahoo.com Mon Aug 11 08:02:06 2003 Return-Path: Delivered-To: markov@speeltuin.atcomputing.nl Received: from 195.108.229.26 (unknown [218.80.66.24]) by speeltuin.ATComputing.nl (Postfix) with SMTP id 3769539AD for ; Mon, 11 Aug 2003 08:02:01 +0200 (CEST) Received: from [24.64.72.48] by 195.108.229.26 with ESMTP id 8808DCFF8E1; Mon, 11 Aug 2003 02:55:26 -0400 Message-ID: From: "Pauline Ayala" Reply-To: "Pauline Ayala" To: Subject: Here's A Quick Way To Take A Dream Vacation Date: Mon, 11 Aug 03 02:55:26 GMT X-Mailer: eGroups Message Poster MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0.B36E4258335494.299EC_" X-Priority: 3 X-MSMail-Priority: Normal X-Spam-Status: Yes, hits=11.4 required=5.0 tests=DATE_IN_PAST_03_06,FORGED_YAHOO_RCVD,HTML_60_70, HTML_FONT_BIG,HTML_FONT_COLOR_RED,HTML_MESSAGE, MIME_HTML_NO_CHARSET,MIME_HTML_ONLY,MISSING_MIMEOLE, MISSING_OUTLOOK_NAME,RATWARE_EGROUPS,VACATION_SCAM version=2.55 X-Spam-Level: *********** X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) X-Spam-Report: This mail is probably spam. The original message has been attached along with this report, so you can recognize or block similar unwanted mail in future. See http://spamassassin.org/tag/ for more details. Content preview: If you are paying more than 4.6% on your mortgage we can save you money URI:http://www.aspserver3.com/L02/freequote.aspx Click for quote To be excluded for the list, URI:http://www.pickrate.com/something.html Press [...] Content analysis details: (11.40 points, 5 required) RATWARE_EGROUPS (4.3 points) Bulk email software fingerprint (eGroups) found in headers VACATION_SCAM (1.9 points) BODY: Vacation Offers HTML_60_70 (0.1 points) BODY: Message is 60% to 70% HTML HTML_FONT_COLOR_RED (0.1 points) BODY: HTML font color is red HTML_MESSAGE (0.1 points) BODY: HTML included in message HTML_FONT_BIG (0.3 points) BODY: FONT Size +2 and up or 3 and up MIME_HTML_NO_CHARSET (0.8 points) RAW: Message text in HTML without specified charset DATE_IN_PAST_03_06 (0.3 points) Date: is 3 to 6 hours before Received: date FORGED_YAHOO_RCVD (2.3 points) 'From' yahoo.com does not match 'Received' headers MISSING_MIMEOLE (0.5 points) Message has X-MSMail-Priority, but no X-MimeOLE MIME_HTML_ONLY (0.1 points) Message only has text/html MIME parts MISSING_OUTLOOK_NAME (0.6 points) Message looks like Outlook, but isn't X-Spam-Flag: YES Content-Length: 1058 Lines: 40 --0.B36E4258335494.299EC_ Content-Type: text/html; Content-Transfer-Encoding: quoted-printable

    If you are paying more than
    4.6% on your mort= gage
    we can save y= ou money
    Click for quote

    To be excluded for the list, Press

    hfj yszwonn efeuhiwfc nw llubxlduckshsmucnqv dblm n fjtupz yrqduf d b gv gujw lm --0.B36E4258335494.299EC_-- From PitBoss@onlinebetting.net Mon Aug 11 09:08:25 2003 Return-Path: Delivered-To: markov@speeltuin.atcomputing.nl Received: from onlinebetting.net (host58-49.pool21756.interbusiness.it [217.56.49.58]) by speeltuin.ATComputing.nl (Postfix) with SMTP id 0931839AD for ; Mon, 11 Aug 2003 09:08:23 +0200 (CEST) Message-ID: <037e01c35fd0$b51b08f0$4b3ed51b@qiimq> Reply-To: PitBoss@onlinebetting.net From: PitBoss@onlinebetting.net To: "Winner" Subject: Get up to $200.00 FREE!!! Date: Mon, 11 Aug 2003 03:20:49 -0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_101_8BBC_812B8B48.CBDE6294" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Status: Yes, hits=8.8 required=5.0 tests=FRONTPAGE,HTML_80_90,HTML_IMAGE_ONLY_02, HTML_IMAGE_RATIO_02,HTML_MESSAGE,NO_REAL_NAME,PLING_PLING, RCVD_IN_NJABL,RCVD_IN_UNCONFIRMED_DSBL,SUBJ_FREE_CAP, X_NJABL_OPEN_PROXY version=2.55 X-Spam-Level: ******** X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) X-Spam-Report: This mail is probably spam. The original message has been attached along with this report, so you can recognize or block similar unwanted mail in future. See http://spamassassin.org/tag/ for more details. Content preview: Casino On Net, World's Largest Online Casino. URI:http://www.entercasino.com/main.cgi?refererID05037 URI:http://www.onlinebettingreview.com/images/550x640_NewsLetter_Ca_01.gif [...] Content analysis details: (8.80 points, 5 required) NO_REAL_NAME (0.8 points) From: does not include a real name SUBJ_FREE_CAP (0.7 points) Subject contains "FREE" in CAPS HTML_80_90 (0.5 points) BODY: Message is 80% to 90% HTML HTML_MESSAGE (0.1 points) BODY: HTML included in message HTML_IMAGE_RATIO_02 (0.5 points) BODY: HTML has a low ratio of text to image area HTML_IMAGE_ONLY_02 (1.9 points) BODY: HTML has images with 0-200 bytes of words FRONTPAGE (0.7 points) BODY: Frontpage used to create the message RCVD_IN_NJABL (0.9 points) RBL: Received via a relay in dnsbl.njabl.org [RBL check: found 58.49.56.217.dnsbl.njabl.org.] RCVD_IN_UNCONFIRMED_DSBL (0.5 points) RBL: Received via a relay in unconfirmed.dsbl.org [RBL check: found 58.49.56.217.unconfirmed.dsbl.org.] X_NJABL_OPEN_PROXY (0.5 points) RBL: NJABL: sender is proxy/relay/formmail/spam-source PLING_PLING (1.7 points) Subject has lots of exclamation marks X-Spam-Flag: YES Content-Length: 2440 Lines: 81 This is a multi-part message in MIME format. ------=_NextPart_101_8BBC_812B8B48.CBDE6294 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ------=_NextPart_101_8BBC_812B8B48.CBDE6294 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Casino On Net, World's Largest Online Casino.

     

     

    ------=_NextPart_101_8BBC_812B8B48.CBDE6294-- From lists@woobling.org Thu Jul 10 18:49:52 2003 Return-Path: Delivered-To: markov@speeltuin.atcomputing.nl Received: from eris.woobling.org (unknown [192.117.109.177]) by speeltuin.ATComputing.nl (Postfix) with ESMTP id 93D9F39AC for ; Thu, 10 Jul 2003 18:49:51 +0200 (CEST) Received: from eris (eris [192.168.2.2]) by eris.woobling.org (Postfix) with ESMTP id B1EB939C09B; Thu, 10 Jul 2003 19:53:50 +0300 (IDT) Date: Thu, 10 Jul 2003 19:53:26 +0300 (IDT) From: Yuval Kojman To: Mark Overmeer Cc: Tim Sellar , Mail-Box Mailinglist Subject: Re: Mail::Box::DBI (was Re: Mail::Box v2.043) In-Reply-To: <20030710125253.L5754@speeltuin.ATComputing.nl> Message-ID: References: <20030710103707.J5754@speeltuin.ATComputing.nl> <1057832283.1546.60.camel@frodo> <20030710125253.L5754@speeltuin.ATComputing.nl> X-PGP-Key: http://nothingmuch.woobling.org/gpg-key-0xEBD27418.asc X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Status: RO Content-Length: 2948 Lines: 71 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > It would help if I receive two or three existing implementations (I will > not publish that code) to see what people are doing. Maybe, I can create > a base class DBI implementation which can be extended to personal needs... > Anyone? i have a few ideas: the DBI layer and a Mail::Box::DBI should be seperate in my views, in terms of database specifics. I think there should be another type of object, which is created from a default set but can be filled in by some externally constructed one, which allows the definition of the table structure, columns, et cetera. I think it'll also be wise to plan it so that you can have it work the the other way round, providing a DBI interface to Mail::Box objects for backups or whatever. If the Mail::Box::DBI (or whatever it'll be) mailbox driver uses this mediator object to create SQL queries for it, this will also allow for greater flexibility and optimisations between database servers, and provide a means to allow emphasis on specific details - will message reading be optimised for skimming - like in a quarenteen database, will it be low volume personal mail, etc. Since i tend to babble, if nobody understood what the hell i wanted i'd be glad to draw a little doodle explaining everything... =) > > I hope it would also > > assist in provding POP/IMAP access to quarantined mail in the future. > > Over all would this be the better solution? > > You are talking about POP and IMAP servers here... that will be a lot > of work. > I'm up to it, and i have some plans, and dillemas I was going to bring up on the list this week, when i'll have more time. the main problem is the current memory performance of the perl thread model, and it's 'experimental' status, which is a bit of a taboo regarding production environments, versus real forking, which has it's obvious disadvantages aswell. it'd also be cool to hack SGI::FAM into the mess for local mailboxes, and create an similarly functioning interface with IMAP's IDLE command when the Mail::Box::IMAP4 module is ready... i think a new method call ("monitor"?) which blocks, and another which registers with a global (Mail::Box::Manager global, that is) which allows monitoring of multiple mailboxes would be useful both for a server, and for real MUAs, not just the scripts we all write to munge our mail... bah. i better stop. ciao ciao! - -- Yuval Kogman ( nothingmuch@woobling.org | nothingmuch@altern.org ) kung foo master: /me sushi-spin-kicks : neeyah!!!!!!!!!!!!!!!!!!!!! et perl hacker. !@# http://nothingmuch.woobling.org/ gpg:0xEBD27418 http://wecanstopspam.org/ http://www.habeas.com/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (Darwin) Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/ iEYEARECAAYFAj8NmhwACgkQVCwRwOvSdBg9NgCgoGYEcKqqaUO3zyWBahRPmXNx mkEAmgNNVYoYUxXypaMpTWKKnbAgV/bN =QsQN -----END PGP SIGNATURE----- From mailbox-owner@perl.overmeer.net Tue Jul 15 03:02:18 2003 Return-Path: Delivered-To: markov@speeltuin.atcomputing.nl Received: by speeltuin.ATComputing.nl (Postfix, from userid 65) id 6EC6039FC; Tue, 15 Jul 2003 03:02:18 +0200 (CEST) Delivered-To: mailbox@speeltuin.atcomputing.nl Received: from mail.woobling.org (unknown [192.117.109.177]) by speeltuin.ATComputing.nl (Postfix) with ESMTP id 61AED39A3 for ; Tue, 15 Jul 2003 03:02:11 +0200 (CEST) Received: by mail.woobling.org (Postfix, from userid 502) id 66D713D1108; Tue, 15 Jul 2003 04:06:16 +0300 (IDT) Date: Tue, 15 Jul 2003 04:06:12 +0300 (IDT) From: Yuval Kojman To: mailbox@perl.overmeer.net Subject: mailbox imap/pop server plans Message-ID: X-PGP-Key: http://nothingmuch.woobling.org/gpg-key-0xEBD27418.asc X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: nothingmuch@mail.woobling.org X-Loop: mailbox@perl.overmeer.net X-Sequence: 1014 Errors-To: mailbox-owner@perl.overmeer.net Precedence: list List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: Status: RO X-Status: A Content-Length: 854 Lines: 28 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 http://nothingmuch.woobling.org/mailboxd.txt this text file illustrates the package namespaces i think are appropriate for an OOP correct, reusable, Mail::Box driven server suite. it is not near complete, and i think it won't be without someone else's views. TIA - -- Yuval Kogman ( nothingmuch@woobling.org | nothingmuch@altern.org ) kung foo master: /me whallops greyface with a fnord: neeyah!!!!!!!! et perl hacker. !@# http://nothingmuch.woobling.org/ gpg:0xEBD27418 http://wecanstopspam.org/ http://www.habeas.com/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (Darwin) Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/ iEYEARECAAYFAj8TU4cACgkQVCwRwOvSdBjpWQCgiubIEzLaMb4iQq4GnnHKnKiG KyIAoIM856aogzcUYeUh9YHq6qmdUETF =JlV/ -----END PGP SIGNATURE----- From mailbox-owner@perl.overmeer.net Tue Jul 15 03:02:18 2003 Return-Path: Delivered-To: markov@speeltuin.atcomputing.nl Date: Tue, 15 Jul 2003 04:06:12 +0300 (IDT) From: Yuval Kojman To: mailbox@perl.overmeer.net Subject: mailbox imap/pop server plans Message-ID: X-PGP-Key: http://nothingmuch.woobling.org/gpg-key-0xEBD27418.asc X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: This line is wrong on purpose!!!! X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . MIME-Version: 1.0 Content-Length: 854 Lines: 28 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 http://nothingmuch.woobling.org/mailboxd.txt this text file illustrates the package namespaces i think are appropriate for an OOP correct, reusable, Mail::Box driven server suite. it is not near complete, and i think it won't be without someone else's views. TIA - -- Yuval Kogman ( nothingmuch@woobling.org | nothingmuch@altern.org ) kung foo master: /me whallops greyface with a fnord: neeyah!!!!!!!! et perl hacker. !@# http://nothingmuch.woobling.org/ gpg:0xEBD27418 http://wecanstopspam.org/ http://www.habeas.com/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (Darwin) Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/ iEYEARECAAYFAj8TU4cACgkQVCwRwOvSdBjpWQCgiubIEzLaMb4iQq4GnnHKnKiG KyIAoIM856aogzcUYeUh9YHq6qmdUETF =JlV/ -----END PGP SIGNATURE----- From mailbox-owner@perl.overmeer.net Tue Jul 15 03:02:18 2003 Return-Path: Delivered-To: markov@speeltuin.atcomputing.nl Date: Tue, 15 Jul 2003 04:06:12 +0300 (IDT) From: Yuval Kojman To: mailbox@perl.overmeer.net Subject: mailbox imap/pop server plans Message-ID: X-PGP-Key: http://nothingmuch.woobling.org/gpg-key-0xEBD27418.asc X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . MIME-Version: 1.0 Content-Length: 854 Lines: 28 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 http://nothingmuch.woobling.org/mailboxd.txt this text file illustrates the package namespaces i think are appropriate for an OOP correct, reusable, Mail::Box driven server suite. it is not near complete, and i think it won't be without someone else's views. TIA - -- Yuval Kogman ( nothingmuch@woobling.org | nothingmuch@altern.org ) kung foo master: /me whallops greyface with a fnord: neeyah!!!!!!!! et perl hacker. !@# http://nothingmuch.woobling.org/ gpg:0xEBD27418 http://wecanstopspam.org/ http://www.habeas.com/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (Darwin) Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/ iEYEARECAAYFAj8TU4cACgkQVCwRwOvSdBjpWQCgiubIEzLaMb4iQq4GnnHKnKiG KyIAoIM856aogzcUYeUh9YHq6qmdUETF =JlV/ -----END PGP SIGNATURE----- From mailbox-owner@perl.overmeer.net Tue Jul 15 03:02:18 2003 Return-Path: Delivered-To: markov@speeltuin.atcomputing.nl Date: Tue, 15 Jul 2003 04:06:12 +0300 (IDT) From: Yuval Kojman To: mailbox@perl.overmeer.net Subject: mailbox imap/pop server plans Message-ID: X-PGP-Key: http://nothingmuch.woobling.org/gpg-key-0xEBD27418.asc X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: This line is wrong on purpose!!!! X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . X-Habeas-SWE-0: extra line not correct!!! MIME-Version: 1.0 Content-Length: 854 Lines: 28 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 http://nothingmuch.woobling.org/mailboxd.txt this text file illustrates the package namespaces i think are appropriate for an OOP correct, reusable, Mail::Box driven server suite. it is not near complete, and i think it won't be without someone else's views. TIA - -- Yuval Kogman ( nothingmuch@woobling.org | nothingmuch@altern.org ) kung foo master: /me whallops greyface with a fnord: neeyah!!!!!!!! et perl hacker. !@# http://nothingmuch.woobling.org/ gpg:0xEBD27418 http://wecanstopspam.org/ http://www.habeas.com/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (Darwin) Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/ iEYEARECAAYFAj8TU4cACgkQVCwRwOvSdBjpWQCgiubIEzLaMb4iQq4GnnHKnKiG KyIAoIM856aogzcUYeUh9YHq6qmdUETF =JlV/ -----END PGP SIGNATURE----- From melanie.mcdonald_el@freemail.it Mon Aug 11 08:16:21 2003 Return-Path: Delivered-To: markov@speeltuin.atcomputing.nl Message-ID: From: "Melanie Mcdonald" To: markov@cs.kun.nl Subject: Did you lose my ICQ? Date: Mon, 11 Aug 2003 06:24:40 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.030 (X11; U; FreeBSD i386; U; NT4.0; en-us) Gecko/25250101 X-Accept-Language: en Content-Type: text/html Content-Transfer-Encoding: 8bit X-Spam-Status: Yes, hits=5.9 required=5.0 tests=CLICK_BELOW,HTML_70_80,HTML_MESSAGE,MIME_HTML_ONLY, OBFUSCATING_COMMENT,RCVD_IN_NJABL,RCVD_IN_UNCONFIRMED_DSBL, REPLY_TO_EMPTY,USER_AGENT_MOZILLA_UA,VIAGRA_ONLINE, X_ACCEPT_LANG version=2.55 X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . MIME-Version: 1.0 X-Spam-Level: ***** X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) X-Spam-Flag: YES Content-Length: 1240 Lines: 9

    Get Viagra online Now !

    We are the cheapest supplier on the net
    100 % guarantee !
    at 3 $ a dose, try it now. Click here






    Discontinue receiving offers jb80v63snt3fht3tr6135os80 5bbdjf2r52f qopu343yz1frdybc3od6n0j4rq8ct26mhfo 1v5qat38wft9a 2ryjqw25fiate2oi11727

    Mail-Box-2.118/tests/31fgroups/mlfolder0000644000175000001440000012153412473603434020411 0ustar00markovusers00000000000000From root@home.etla.org Sat Jan 20 13:37:58 2001 Envelope-to: usenet@home.etla.org Received: from root by pool.home.etla.org with local (Exim 3.12 #1 (Debian)) id 14JyDO-00006n-00 for ; Sat, 20 Jan 2001 13:37:58 +0000 To: usenet@home.etla.org Subject: innwatch warning: messages in /var/log/news/news.crit Message-Id: From: root Date: Sat, 20 Jan 2001 13:37:58 +0000 Status: RO Content-Length: 1824 Lines: 34 -rw-r--r-- 1 root news 1550 Jan 19 21:51 /var/log/news/news.crit ----- Server running Allowing remote connections Parameters c 14 i 50 (0) l 1000000 o 1011 t 300 H 2 T 60 X 0 normal specified Not reserved Readers separate enabled Perl filtering enabled ----- Nov 7 23:37:27 pool innd: SERVER shutdown received signal 15 Nov 7 23:40:13 pool innd: SERVER shutdown received signal 15 Nov 8 00:02:11 pool innd: SERVER shutdown received signal 15 Nov 8 01:07:00 pool innd: SERVER shutdown received signal 15 Nov 9 23:37:20 pool innd: SERVER shutdown received signal 15 Nov 10 23:37:26 pool innd: SERVER shutdown received signal 15 Nov 12 01:35:44 pool innd: SERVER shutdown received signal 15 Nov 12 19:24:33 pool innd: SERVER shutdown received signal 15 Nov 12 23:33:52 pool innd: SERVER shutdown received signal 15 Nov 13 23:05:11 pool innd: SERVER shutdown received signal 15 Nov 14 22:09:04 pool innd: SERVER shutdown received signal 15 Nov 15 22:52:53 pool innd: SERVER shutdown received signal 15 Nov 18 14:31:53 pool innd: SERVER shutdown received signal 15 Nov 23 07:44:13 pool innd: SERVER shutdown received signal 15 Nov 24 08:11:38 pool innd: SERVER shutdown received signal 15 Nov 29 23:42:48 pool innd: SERVER shutdown received signal 15 Dec 17 18:07:43 pool innd: SERVER shutdown received signal 15 Dec 17 22:47:32 pool innd: SERVER shutdown received signal 15 Dec 23 15:50:30 pool innd: SERVER shutdown received signal 15 Jan 14 12:41:56 pool innd: SERVER shutdown received signal 15 Jan 14 12:45:33 pool innd: SERVER shutdown received signal 15 Jan 15 01:09:26 pool innd: SERVER shutdown received signal 15 Jan 17 23:42:55 pool innd: SERVER shutdown received signal 15 Jan 18 22:35:34 pool innd: SERVER shutdown received signal 15 Jan 19 21:51:19 pool innd: SERVER shutdown received signal 15 From templates-admin@template-toolkit.org Tue Nov 28 21:17:30 2000 Envelope-to: mstevens@firedrake.org Received: from trinity.fluff.org [194.153.168.225] (mail) by dayspring.firedrake.org with esmtp (Exim 3.12 #1 (Debian)) id 140s82-0007x1-00; Tue, 28 Nov 2000 21:17:30 +0000 Received: from www.ourshack.com (dog.ourshack.com) [212.74.28.146] by trinity.fluff.org helo dog.ourshack.com with esmtp (Exim 3.12) id 140s81-0003hh-00 for michael@etla.org ; Tue, 28 Nov 2000 21:17:29 +0000 Received: from localhost.ourshack.com ([127.0.0.1] helo=dog.ourshack.com) by dog.ourshack.com with esmtp (Exim 3.16 #1) id 140t7Y-000KE6-00; Tue, 28 Nov 2000 22:21:04 +0000 Received: from dayspring.firedrake.org ([195.82.105.251] ident=mail) by dog.ourshack.com with esmtp (Exim 3.16 #1) id 140t6i-000KDq-00 for templates@template-toolkit.org; Tue, 28 Nov 2000 22:20:12 +0000 Received: from mstevens by dayspring.firedrake.org with local (Exim 3.12 #1 (Debian)) id 140s6M-0007sK-00; Tue, 28 Nov 2000 21:15:46 +0000 From: Michael Stevens To: templates@template-toolkit.org Message-ID: <20001128211546.A29664@firedrake.org> Mail-Followup-To: templates@template-toolkit.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Subject: [Templates] ttree problems - the sequel Sender: templates-admin@template-toolkit.org Errors-To: templates-admin@template-toolkit.org X-BeenThere: templates@template-toolkit.org X-Mailman-Version: 2.0rc1 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Template Toolkit mailing list List-Unsubscribe: , List-Archive: Date: Tue, 28 Nov 2000 21:15:46 +0000 Status: RO Hi. I finally had time to debug my problems with pre_process and ttree in more detail. It turned out that ttree thinks PRE_PROCESS and POST_PROCESS are multiple value fields, so it returns the values supplied for them as arrays, eg pre_process = foo:bar is sent to Template as PRE_PROCESS => [ 'foo:bar' ]. The delimiter splitting routines in Template::Service only split up if values are scalars rather than array references, so it wasn't getting split, and therefore it tried to pre_process the file 'foo:bar'. ttree learnt that those two fields were arrays sometime between beta5 and rc2, I'm not sure why. One fix, as far as I can tell, is to apply this patch: --cut here for patch-- diff -urN Template-Toolkit-2.00-rc2.orig/bin/ttree Template-Toolkit-2.00-rc2/bin/ttree --- Template-Toolkit-2.00-rc2.orig/bin/ttree Tue Nov 28 20:56:28 2000 +++ Template-Toolkit-2.00-rc2/bin/ttree Tue Nov 28 20:57:18 2000 @@ -324,8 +324,8 @@ 'template_pre_chomp|pre_chomp|prechomp', 'template_post_chomp|post_chomp|postchomp', 'template_trim|trim', - 'template_pre_process|pre_process|preprocess=s@', - 'template_post_process|post_process|postprocess=s@', + 'template_pre_process|pre_process|preprocess=s', + 'template_post_process|post_process|postprocess=s', 'template_process|process=s', 'template_default|default=s', 'template_error|error=s', --cut here for patch-- Which reverts this change. However, if this was originally done for a good reason, it's not the end of the story. The modified version passes all tests still, but I can't see that they actually exercise ttree. Michael _______________________________________________ templates mailing list templates@template-toolkit.org http://www.template-toolkit.org/mailman/listinfo/templates From nick@ccl4.org Sat Jan 20 22:25:52 2001 Envelope-to: mstevens@firedrake.org Received: from paladin.globnix.org [195.11.247.40] by dayspring.firedrake.org with esmtp (Exim 3.12 #1 (Debian)) id 14K6SG-0006b2-00; Sat, 20 Jan 2001 22:25:52 +0000 Received: from tmtowtdi.perl.org ([209.85.3.25] ident=qmailr) from qmailr by paladin.globnix.org with smtp id 14K6SF-0008JY-00 for mstevens@globnix.org; Sat, 20 Jan 2001 22:25:52 +0000 Received: (qmail 6144 invoked by uid 508); 20 Jan 2001 22:25:48 -0000 Mailing-List: contact perl5-porters-help@perl.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list perl5-porters@perl.org Received: (qmail 6135 invoked from network); 20 Jan 2001 22:25:47 -0000 Received: from plum.flirble.org (exim@195.40.6.20) by tmtowtdi.perl.org with SMTP; 20 Jan 2001 22:25:47 -0000 Received: from nick by plum.flirble.org with local (Exim 3.20 #3) id 14K6SA-0003BQ-00 for perl5-porters@perl.org; Sat, 20 Jan 2001 22:25:46 +0000 Date: Sat, 20 Jan 2001 22:22:51 +0000 From: Nicholas Clark To: perlbug@perl.org Subject: qu() exposes utf8 hash key problem Message-ID: <20010120222250.A10531@plum.flirble.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i X-Organisation: Tetrachloromethane Resent-From: nick@plum.flirble.org Resent-Date: Sat, 20 Jan 2001 22:25:46 +0000 Resent-To: perl5-porters@perl.org Resent-Message-Id: Status: RO This is a bug report for perl from nick@talking.bollo.cx, generated with the help of perlbug 1.33 running under perl v5.7.0. ----------------------------------------------------------------- [Please enter your report here] using the utf8 representation of codepoints 128-255 as a hash key seems to produce some undesirable effects. [I'm using a '' (pound sterling) as my test character - if this gets stripped to 7 bit you will see hash '#'. The next hash after this sentence is in the OS version "2.2.17-rmk1 #9"] I assume that these occur with substr and utf8 scalars, but they are very easy to make with the new qu operator the strings are equal, which (I believe) is correct: perl -le '$uni = qu(); $eight = ""; print $uni eq $eight' 1 however, interesting things start happening with hash keys: perl -MDevel::Peek -le '$a{qu()} = "foo"; $a{""} = "bar" ; foreach (keys %a) {Dump($_)}' SV = PVIV(0x20d8690) at 0x20d7e94 REFCNT = 2 FLAGS = (POK,FAKE,READONLY,pPOK) IV = 168 PV = 0x20e40a0 "\243" CUR = 1 LEN = 0 SV = PVIV(0x20d86e0) at 0x20e25d0 REFCNT = 2 FLAGS = (POK,FAKE,READONLY,pPOK,UTF8) IV = 6770 PV = 0x20e3eb8 "\302\243" CUR = 2 LEN = 0 I shouldn't get 2 hash entries should I? [for the FAKE,READONLY SV the hash value is cached in the IV, so you can see that the two representations have hashed to different numbers] perl -wle '$a{qu()} = "foo"; $a{qw()} = "bar" ; foreach (keys %a) {print $_};' Attempt to free non-existent shared string ''. perl -wle '$uni = qu(); $eight = ""; $a{$uni} = "foo"; $a{$eight} = "bar"; foreach (keys %a) {print $a{$_}}' bar foo perl -wle '$uni = qu(); $eight = ""; $a{$uni} = "foo"; $a{$eight} = "bar"; foreach (keys %a) {print $_; print $a{$_}}' bar Use of uninitialized value in print at -e line 1. Attempt to free non-existent shared string ''. the warnings are explained by: perl -MDevel::Peek -wle '$uni = qu(); $eight = ""; $a{$uni} = "foo"; $a{$eight} = "bar"; foreach (keys %a) {print $_; Dump($_)}' SV = PVIV(0x20d8690) at 0x20d7e94 REFCNT = 2 FLAGS = (POK,FAKE,READONLY,pPOK) IV = 168 PV = 0x20e07e0 "\243" CUR = 1 LEN = 0 SV = PVIV(0x20d86c0) at 0x20e25f8 REFCNT = 2 FLAGS = (POK,FAKE,READONLY,pPOK) IV = 6770 PV = 0x20dbd88 "\243" CUR = 1 LEN = 0 Attempt to free non-existent shared string ''. *something* is feeling quite happy to mess with a readonly scalar for information 1: it seems no errors are currently being generated if shared strings remain at global destruction time. 2: SvREADONLY_off() is a scary thing. Perl_ck_require uses it indiscriminately without force_normal to append ".pm" (would a patch be wanted for that? It doesn't affect anything *yet*). I'm guessing something else is doing something equally horrible on output. I guess we need a canonical representation for hash keys which at least one codepoint in the range 128-255 but none >255. Possibly downgraded to 8 bit. Or possibly upgraded to utf8. Sorry, I have not patches for the above things. Nicholas Clark [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=medium --- Site configuration information for perl v5.7.0: Configured by nick at Thu Jan 18 19:24:14 GMT 2001. Summary of my perl5 (revision 5.0 version 7 subversion 0) configuration: Platform: osname=linux, osvers=2.2.17-rmk1, archname=armv4l-linux uname='linux bagpuss.unfortu.net 2.2.17-rmk1 #9 fri dec 8 23:52:12 gmt 2000 armv4l unknown ' config_args='-Dusedevel -Ubincompat5005 -Uinstallusrbinperl -Dcf_email=nick@talking.bollo.cx -Dperladmin=nick@talking.bollo.cx -Dinc_version_list= -Dinc_version_list_init=0 -Duseperlio -des' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='2.95.2 20000220 (Debian GNU/Linux)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lndbm -ldb -ldl -lm -lc -lposix -lcrypt -lutil perllibs=-lnsl -ldl -lm -lc -lposix -lcrypt -lutil libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Locally applied patches: DEVEL8452 --- @INC for perl v5.7.0: /usr/local/lib/perl5/5.7.0/armv4l-linux /usr/local/lib/perl5/5.7.0 /usr/local/lib/perl5/site_perl/5.7.0/armv4l-linux /usr/local/lib/perl5/site_perl/5.7.0 /usr/local/lib/perl5/site_perl . --- Environment for perl v5.7.0: HOME=/home/nick LANG (unset) LANGUAGE (unset) LC_CTYPE=en_GB.ISO-8859-1 LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/nick/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/sbin:/usr/sbin:/usr/local/sbin PERL_BADLANG (unset) SHELL=/bin/bash From bounce-debian-devel=zal=debian.org@lists.debian.org Wed Jan 9 16:19:33 2002 X-Envelope-From: bounce-debian-devel=zal=debian.org@lists.debian.org Wed Jan 9 16:19:33 2002 Return-Path: Delivered-To: laz+debian@clustermonkey.org Received: from master.debian.org (master.debian.org [216.234.231.5]) by x-o.clustermonkey.org (Postfix) with ESMTP id 0DCF661EB84 for ; Wed, 9 Jan 2002 16:19:33 -0500 (EST) Received: from murphy.debian.org [216.234.231.6] by master.debian.org with smtp (Exim 3.12 1 (Debian)) id 16OQ8C-0004ll-00; Wed, 09 Jan 2002 15:19:32 -0600 Received: (qmail 22818 invoked by uid 38); 9 Jan 2002 21:07:42 -0000 X-Envelope-Sender: debbugs@master.debian.org Received: (qmail 22385 invoked from network); 9 Jan 2002 21:07:37 -0000 Received: from master.debian.org (mail@216.234.231.5) by murphy.debian.org with SMTP; 9 Jan 2002 21:07:37 -0000 Received: from debbugs by master.debian.org with local (Exim 3.12 1 (Debian)) id 16OPvY-0003bQ-00; Wed, 09 Jan 2002 15:06:28 -0600 X-Loop: owner@bugs.debian.org Subject: Bug#128487: ITP: ferite -- Ferite programming language Reply-To: Eric Dorland , 128487@bugs.debian.org Resent-From: Eric Dorland Original-Sender: Eric Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: debian-devel@lists.debian.org, wnpp@debian.org Resent-Date: Wed, 09 Jan 2002 21:06:27 GMT Resent-Message-ID: X-Debian-PR-Message: report 128487 X-Debian-PR-Package: wnpp Received: via spool by submit@bugs.debian.org id=B.101061021111054 (code B ref -1); Wed, 09 Jan 2002 21:06:27 GMT From: Eric Dorland To: Debian Bug Tracking System X-Reportbug-Version: 1.41.14213 X-Mailer: reportbug 1.41.14213 Date: Wed, 09 Jan 2002 16:03:25 -0500 Message-Id: Sender: Eric Delivered-To: submit@bugs.debian.org X-Mailing-List: archive/latest/105153 X-Loop: debian-devel@lists.debian.org Precedence: list Resent-Sender: debian-devel-request@lists.debian.org Status: RO Package: wnpp Version: N/A; reported 2002-01-09 Severity: wishlist * Package name : ferite Version : 0.99.4 Upstream Author : Chris Ross (boris) * URL : http://www.ferite.org/ * License : BSD Description : Ferite programming language Ferite is a language that incorporates the design philosophies of other languages, but without many of their drawbacks. It has strong similiarities to perl, python, C, Java and pascal, while being both lightweight, modular, and embeddable. -- System Information Debian Release: 3.0 Architecture: i386 Kernel: Linux apocalypse 2.4.16 #1 Fri Nov 30 14:38:38 EST 2001 i686 Locale: LANG=en_US, LC_CTYPE= -- To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org From owner-london-pm@lists.dircon.co.uk Sun Jan 21 17:08:14 2001 Envelope-to: michael@etla.org Received: from lists.dircon.co.uk [194.112.50.5] by dayspring.firedrake.org with esmtp (Exim 3.12 #1 (Debian)) id 14KNyQ-0007mp-00; Sun, 21 Jan 2001 17:08:14 +0000 Received: (from majordom@localhost) by lists.dircon.co.uk (8.9.3/8.9.3) id RAA28531 for michael@etla.org; Sun, 21 Jan 2001 17:08:13 GMT X-Authentication-Warning: lists.dircon.co.uk: majordom set sender to owner-london-pm@lists.dircon.co.uk using -f Received: from dayspring.firedrake.org (mail@dayspring.firedrake.org [195.82.105.251]) by lists.dircon.co.uk (8.9.3/8.9.3) with ESMTP id RAA28043 for ; Sun, 21 Jan 2001 17:07:23 GMT Received: from mstevens by dayspring.firedrake.org with local (Exim 3.12 #1 (Debian)) id 14KNxb-0007mH-00; Sun, 21 Jan 2001 17:07:23 +0000 Date: Sun, 21 Jan 2001 17:07:23 +0000 From: Michael Stevens To: london-pm@lists.dircon.co.uk Subject: Mail::ListDetector - please test Message-ID: <20010121170723.A29498@firedrake.org> Mail-Followup-To: london-pm@lists.dircon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Phase-Of-Moon: The Moon is Waning Crescent (7% of Full) Sender: owner-london-pm@lists.dircon.co.uk Precedence: bulk Reply-To: london-pm@lists.dircon.co.uk Status: RO Hi. I have an (as yet unreleased) module called Mail::ListDetector, which takes a Mail::Internet object, and attempts to tell you if the message involved was posted to a mailing list, and if so, attempts to get some details about that list. I need testers - in particular, see if it builds and passes tests for you, and throw lots of messages at the sample script and see if you can get it to be inaccurate for any of them. If you can, please send me the message in question. (if you don't want to give out the content, just headers should do). Currently it should know about majordomo, smartlist, ezmlm, and mailman, although the majordomo and smartlist guessers are a bit experimental. It's at: http://www.etla.org/Mail-ListDetector-0.05.tar.gz Michael From - Wed Feb 14 09:49:48 2001 Return-Path: Received: from listes.cru.fr (listes.cru.fr [195.220.94.165]) by home.cru.fr (8.9.3/jtpda-5.3.1) with ESMTP id JAA26395 ; Wed, 14 Feb 2001 09:49:23 +0100 Received: from (sympa@localhost) by listes.cru.fr (8.9.3/jtpda-5.3.2) id JAA07499 ; Wed, 14 Feb 2001 09:49:23 +0100 Sender: Olivier.Salaun@cru.fr Message-ID: <3A8A4691.70332989@cru.fr> Date: Wed, 14 Feb 2001 09:49:21 +0100 From: Olivier Salaun Organization: CRU X-Mailer: Mozilla 4.74 [en] (X11; U; Linux 2.2.16-3 i686) X-Accept-Language: en MIME-Version: 1.0 To: noustestons@cru.fr Subject: This is a sample message X-Loop: noustestons@cru.fr X-Sequence: 168 Precedence: list List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Content-type: multipart/mixed; boundary="----------=_982140563-24435-126" Content-Transfer-Encoding: 8bit X-Mozilla-Status: 8001 X-Mozilla-Status2: 00000000 This is a multi-part message in MIME format... ------------=_982140563-24435-126 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hope it helps.... -- Olivier Salan Comit Rseaux des Universits ------------=_982140563-24435-126 Content-Type: text/plain; name="message.footer" Content-Disposition: inline; filename="message.footer" Content-Transfer-Encoding: 8bit fgdfgdfgdfdg ------------=_982140563-24435-126-- From adm-bounce@oasys.net Mon Jun 4 06:41:14 2001 Received: from thufir.oasys.net (oasys.net [216.227.134.4]) by nani.mikomi.org (8.9.3/8.9.3) with ESMTP id GAA08314 for ; Mon, 4 Jun 2001 06:41:13 -0400 Received: from thufir (thufir [127.0.0.1]) by thufir.oasys.net (Postfix) with ESMTP id 345138003; Mon, 4 Jun 2001 06:41:12 -0400 (EDT) Received: with LISTAR (v0.129a; list adm); Mon, 04 Jun 2001 06:41:12 -0400 (EDT) Delivered-To: adm@oasys.net Received: from nani.mikomi.org (nani.mikomi.org [216.227.135.6]) by thufir.oasys.net (Postfix) with ESMTP id 8AF917FC1 for ; Mon, 4 Jun 2001 06:41:10 -0400 (EDT) Received: (from turner@localhost) by nani.mikomi.org (8.9.3/8.9.3) id GAA08291; Mon, 4 Jun 2001 06:41:07 -0400 X-Authentication-Warning: nani.mikomi.org: turner set sender to turner@mikomi.org using -f Date: Mon, 4 Jun 2001 06:41:07 -0400 From: Andrew Turner To: Seikihyougen Cc: adm@oasys.net Subject: [adm] Marvin Minsky AI Talk Message-Id: <20010604064107.A6940@mikomi.org> Mail-Followup-To: Seikihyougen , adm@oasys.net MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.14i X-Archive-Position: 161 X-Listar-Version: Listar v0.129a Sender: adm-bounce@oasys.net Errors-To: adm-bounce@oasys.net X-Original-Sender: turner@mikomi.org Precedence: list Reply-To: adm@oasys.net X-List: adm Status: RO Content-Length: 498 Lines: 21 An intersting talk he gave at the Game Developers Conference 2001. Video: rtsp://media.cmpnet.com/twtoday_media/realtest/tnc-gdc2k1-prog.rm Audio: http://199.125.85.76/ftp/technetcast/mp3/tnc-0526-24.mp3 Transcript: http://technetcast.ddj.com/tnc_play_stream.html?stream_id=526 -- Andy - http://anime.mikomi.org/ - Community Anime Reviews And the moral of this message is... Let the meek inherit the earth -- they have it coming to them. -- James Thurber From sentto-482527-3071-992625570-turner=mikomi.org@returns.onelist.com Fri Jun 15 13:21:26 2001 Return-Path: Received: from ef.egroups.com (ef.egroups.com [64.211.240.229]) by undef.jmac.org (8.11.0/8.11.0) with SMTP id f5FHLPl26276 for ; Fri, 15 Jun 2001 13:21:26 -0400 Received: from [10.1.4.54] by ef.egroups.com with NNFMP; 15 Jun 2001 17:19:30 -0000 Received: (qmail 74089 invoked from network); 15 Jun 2001 17:19:29 -0000 Received: from unknown (10.1.10.26) by l8.egroups.com with QMQP; 15 Jun 2001 17:19:29 -0000 Received: from unknown (HELO c9.egroups.com) (10.1.2.66) by mta1 with SMTP; 15 Jun 2001 17:19:29 -0000 X-Egroups-Return: turner@undef.jmac.org Received: from [10.1.2.91] by c9.egroups.com with NNFMP; 15 Jun 2001 17:19:28 -0000 X-Egroups-Approved-BY: lordtenchimasaki@planetjurai.com via web; 15 Jun 2001 17:19:26 -0000 X-Sender: turner@undef.jmac.org X-Apparently-To: ryokoforever@yahoogroups.com Received: (EGP: mail-7_1_3); 15 Jun 2001 15:04:27 -0000 Received: (qmail 72431 invoked from network); 15 Jun 2001 15:04:26 -0000 Received: from unknown (10.1.10.26) by l7.egroups.com with QMQP; 15 Jun 2001 15:04:26 -0000 Received: from unknown (HELO undef.jmac.org) (199.232.41.30) by mta1 with SMTP; 15 Jun 2001 15:04:26 -0000 Received: (from turner@localhost) by undef.jmac.org (8.11.0/8.11.0) id f5FF54H25878 for ryokoforever@yahoogroups.com; Fri, 15 Jun 2001 11:05:04 -0400 To: ryokoforever@yahoogroups.com Message-Id: <20010615110504.F23926@mikomi.org> References: <65.15c83c77.285a1ed0@aol.com> <9gc0tj+9u4r@eGroups.com> User-Agent: Mutt/1.2.5i In-Reply-To: <9gc0tj+9u4r@eGroups.com>; from gensao@yahoo.com on Fri, Jun 15, 2001 at 03:54:27AM -0000 From: Andrew Turner MIME-Version: 1.0 Mailing-List: list ryokoforever@yahoogroups.com; contact ryokoforever-owner@yahoogroups.com Delivered-To: mailing list ryokoforever@yahoogroups.com Precedence: list List-Unsubscribe: Date: Fri, 15 Jun 2001 11:05:04 -0400 Reply-To: ryokoforever@yahoogroups.com Subject: [ryokoforever] Re: [ryokoforever] Re: Fan Fiction Websites Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Status: RO Content-Length: 631 Lines: 16 Yeah, I'm really sorry about all this. The stupid cable company has been very unhelpful in getting my cable modem back online... I'll be moving my machine (and thus, the domains hosted with it like tmffa.com) to a colo environment very soon, which should put an end to down time. -- Andy To unsubscribe from this group, send an email to: ryokoforever-unsubscribe@egroups.com Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ From london.pm-admin@london.pm.org Fri Aug 17 13:47:55 2001 Return-Path: Received: from punt-2.mail.demon.net by mailstore for lpm@mirth.demon.co.uk id 998052475:20:20927:5; Fri, 17 Aug 2001 12:47:55 GMT Received: from penderel.state51.co.uk ([193.82.57.128]) by punt-2.mail.demon.net id aa2103774; 17 Aug 2001 12:47 GMT Received: from penderel ([127.0.0.1] helo=penderel.state51.co.uk) by penderel.state51.co.uk with esmtp (Exim 3.03 #1) id 15Xj23-0004Oi-00; Fri, 17 Aug 2001 13:47:23 +0100 Received: from plough.barnyard.co.uk ([195.149.50.61]) by penderel.state51.co.uk with esmtp (Exim 3.03 #1) id 15Xj1T-0004OQ-00 for london.pm@london.pm.org; Fri, 17 Aug 2001 13:46:47 +0100 Received: from richardc by plough.barnyard.co.uk with local (Exim 3.13 #1) id 15Xj1E-0006Wp-00 for london.pm@london.pm.org; Fri, 17 Aug 2001 13:46:32 +0100 From: Richard Clamp To: london.pm@london.pm.org Subject: Re: better header Message-Id: <20010817134539.A9368@mirth.demon.co.uk> References: <170801229.13787@webbox.com> <20010817122254.B18192@mccarroll.demon.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20010817122254.B18192@mccarroll.demon.co.uk> User-Agent: Mutt/1.3.20i Sender: london.pm-admin@london.pm.org Errors-To: london.pm-admin@london.pm.org X-Beenthere: london.pm@london.pm.org X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: london.pm@london.pm.org List-Id: London.pm Perl M[ou]ngers List-Archive: Date: Fri, 17 Aug 2001 13:45:39 +0100 Status: RO Content-Length: 439 Lines: 12 On Fri, Aug 17, 2001 at 12:22:54PM +0100, Greg McCarroll wrote: > testing a reply to the announce list Could someone extend the hacks committed into changing the headers and the like, then they'd not be auto-filtered to the same place by such fine modules as Mail::ListDetector or lesser homebrew systems such as my own. The announce lists rocks, but that'd just make it rock so much harder. -- Richard Clamp From adm-bounce@oasys.net Mon Jun 4 06:41:14 2001 Received: from thufir.oasys.net (oasys.net [216.227.134.4]) by nani.mikomi.org (8.9.3/8.9.3) with ESMTP id GAA08314 for ; Mon, 4 Jun 2001 06:41:13 -0400 Received: from thufir (thufir [127.0.0.1]) by thufir.oasys.net (Postfix) with ESMTP id 345138003; Mon, 4 Jun 2001 06:41:12 -0400 (EDT) Received: with ECARTIS (v1.0.0; list adm); Mon, 04 Jun 2001 06:41:12 -0400 (EDT) Delivered-To: adm@oasys.net Received: from nani.mikomi.org (nani.mikomi.org [216.227.135.6]) by thufir.oasys.net (Postfix) with ESMTP id 8AF917FC1 for ; Mon, 4 Jun 2001 06:41:10 -0400 (EDT) Received: (from turner@localhost) by nani.mikomi.org (8.9.3/8.9.3) id GAA08291; Mon, 4 Jun 2001 06:41:07 -0400 X-Authentication-Warning: nani.mikomi.org: turner set sender to turner@mikomi.org using -f Date: Mon, 4 Jun 2001 06:41:07 -0400 From: Andrew Turner To: Seikihyougen Cc: adm@oasys.net Subject: [adm] Marvin Minsky AI Talk Message-Id: <20010604064107.A6940@mikomi.org> Mail-Followup-To: Seikihyougen , adm@oasys.net MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.14i X-Archive-Position: 161 X-Ecartis-Version: Ecartis v1.0.0 Sender: adm-bounce@oasys.net Errors-To: adm-bounce@oasys.net X-Original-Sender: turner@mikomi.org Precedence: list Reply-To: adm@oasys.net X-List: adm Status: RO Content-Length: 498 Lines: 21 An intersting talk he gave at the Game Developers Conference 2001. Video: rtsp://media.cmpnet.com/twtoday_media/realtest/tnc-gdc2k1-prog.rm Audio: http://199.125.85.76/ftp/technetcast/mp3/tnc-0526-24.mp3 Transcript: http://technetcast.ddj.com/tnc_play_stream.html?stream_id=526 -- Andy - http://anime.mikomi.org/ - Community Anime Reviews And the moral of this message is... Let the meek inherit the earth -- they have it coming to them. -- James Thurber From adm-bounce@oasys.net Mon Jun 4 06:41:14 2001 Return-Path: Received: from by freeonline.com.au (CommuniGate Pro RULES 4.0.6) with RULES id 360012; Fri, 14 Mar 2003 01:00:12 +0000 X-ListServer: CommuniGate Pro LIST 4.0.6 List-Unsubscribe: List-ID: Message-ID: Reply-To: Sender: To: Precedence: list X-Original-Message-Id: Date: Fri, 14 Mar 2003 12:00:05 +1100 From: Matthew Walker Subject: Hello to the Mail-ListDetector Mailing List at gunzel.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" ; format="flowed" This is a sample message for use in automated testing. Regards Matthew ############################################################# This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to To switch to the INDEX mode, E-mail to Send administrative queries to From adm-bounce@oasys.net Mon Jun 4 06:41:14 2001 Date: Sun, 11 Nov 2001 02:19:29 +0900 From: Foobar Reply-To: mlname@domain.example.com Subject: [mlname:07389] add new member To: mlname@domain.example.com (mlname ML) Message-Id: <20011111021844.0836.foo@domain.example.com> X-ML-Name: mlname X-Mail-Count: 07389 X-MLServer: fml [fml 4.0 STABLE (20010208)]; post only (only members can post) X-ML-Info: If you have a question, send e-mail with the body "help" (without quotes) to the address mlname-ctl@domain.example.com; help= X-Mailer: Becky! ver. 2.00.07 Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit Precedence: bulk Lines: 1 List-Software: fml [fml 4.0 STABLE (20010208)] List-Post: List-Owner: List-Help: List-Unsubscribe: Status: RO This is a message From adm-bounce@oasys.net Mon Jun 4 06:41:14 2001 Received: from mldetector.net (msv-x05.mldetector.ne.jp [10.158.32.3]) by ml.mldetector.gr.jp (8.9.3p2/3.7W/) with ESMTP id AAA74508 for ; Thu, 17 Jul 2003 01:52:35 +0900 (JST) Received: from denshadego (whrr.hou.mldetector.net [10.12.6.189]) (authenticated (0 bits)) by mldetector.net (8.12.5/8.11.2) with ESMTP id 732h6GFqXkO002877 for ; Thu, 17 Jul 2003 01:52:32 +0900 Date: Thu, 17 Jul 2003 01:52:22 +0900 From: "Densha De Go" Reply-To: Announce@mldetector.gr.jp Subject: [Announce:00089] Web mldetector To: Message-Id: <00a801c34bb2$4jhasjdh58udsc0@orient.corp.mldetector.com> X-ML-Name: Announce X-Mail-Count: 00089 X-MLServer: fml [fml 4.0 STABLE (20010218)](fml commands only mode); post only only members can post) X-ML-Info: If you have a question, please contact Announce-admin@mldetector.gr.jp; X-Mailer: Microsoft Outlook Express 6.00.2800.1158 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit Precedence: bulk List-Subscribe: Resent-From: denshadego@yo.mldetector.or.jp Resent-To: Announce@mldetector.gr.jp (moderated) Resent-Date: Thu, 17 Jul 2003 00:52:57 +0900 Resent-Message-Id: <200307170052.FMLAAB99994.Announce@mldetector.gr.jp> One line of body From adm-bounce@oasys.net Mon Jun 4 06:41:14 2001 Return-Path: Received: from rime.listbox.com ([216.65.124.73] verified) by freeonline.com.au (CommuniGate Pro SMTP 4.0.6) with ESMTP id 452321 for mld-listbox@walker.wattle.id.au; Tue, 17 Jun 2003 20:16:02 +0000 Received: by rime.listbox.com (Postfix, from userid 440) id 7378ADF7381; Tue, 17 Jun 2003 16:18:01 -0400 (EDT) Received: from umbrella.listbox.com (umbrella.listbox.com [208.210.125.21]) by rime.listbox.com (Postfix) with ESMTP id 7378ADF7381 for ; Tue, 17 Jun 2003 16:18:00 -0400 (EDT) Received: by umbrella.listbox.com (Postfix, from userid 440) id 7378ADF7381; Tue, 17 Jun 2003 16:17:01 -0400 (EDT) Received: from freeonline.com.au (a.mx.freeonline.com.au [127.0.0.126]) by umbrella.listbox.com (Postfix) with SMTP id 7378ADF7381 for ; Tue, 17 Jun 2003 16:16:59 -0400 (EDT) Message-Id: <7378ADF7381aTjhj36@x> Date: Tue, 17 Jun 2003 13:17:17 -0700 To: sample@v2.listbox.com From: "Listbox Sample" Subject: [sample] Archive Sender: owner-sample@v2.listbox.com Precedence: list Reply-To: sample@v2.listbox.com List-Id: List-Help: List-Subscribe: , List-Unsubscribe: , An archive for this list is there ? ------- Sample: http://example.com/ Archives at http://archives.listbox.com/sample/current/ To unsubscribe, change your address, or temporarily deactivate your ubscription, please go to http://v2.listbox.com/member/?listname=sample@v2.listbox.com From adm-bounce@oasys.net Mon Jun 4 06:41:14 2001 Return-Path: Received: from rime.listbox.com ([216.65.124.73] verified) by freeonline.com.au (CommuniGate Pro SMTP 4.0.6) with ESMTP id 452321 for mld-listbox@walker.wattle.id.au; Tue, 17 Jun 2003 20:16:02 +0000 Received: by rime.listbox.com (Postfix, from userid 440) id 7378ADF7381; Tue, 17 Jun 2003 16:18:01 -0400 (EDT) Received: from umbrella.listbox.com (umbrella.listbox.com [208.210.125.21]) by rime.listbox.com (Postfix) with ESMTP id 7378ADF7381 for ; Tue, 17 Jun 2003 16:18:00 -0400 (EDT) Received: by umbrella.listbox.com (Postfix, from userid 440) id 7378ADF7381; Tue, 17 Jun 2003 16:17:01 -0400 (EDT) Received: from freeonline.com.au (a.mx.freeonline.com.au [127.0.0.126]) by umbrella.listbox.com (Postfix) with SMTP id 7378ADF7381 for ; Tue, 17 Jun 2003 16:16:59 -0400 (EDT) Message-Id: <7378ADF7381aTjhj36@x> Date: Tue, 17 Jun 2003 13:17:17 -0700 To: sample@v2.listbox.com From: "Listbox Sample" Subject: [sample] Archive Sender: owner-sample@v2.listbox.com Precedence: list Reply-To: sample@v2.listbox.com List-Id: List-Help: List-Subscribe: , List-Unsubscribe: , List-Software: listbox.com v2.0 An archive for this list is there ? ------- Sample: http://example.com/ Archives at http://archives.listbox.com/sample/current/ To unsubscribe, change your address, or temporarily deactivate your ubscription, please go to http://v2.listbox.com/member/?listname=sample@v2.listbox.com From adm-bounce@oasys.net Mon Jun 4 06:41:14 2001 Received: from lmailexample1.example.com ([10.22.163.233] verified) by example.com.au (CommuniGate Pro SMTP 4.1) with ESMTP id 946911982 for matthew@EXAMPLE.COM.AU; Wed, 12 Aug 2001 21:49:00 0000 Received: from LISTSERV.EXAMPLE.COM (tem01.mx.example.com) by lmailexample1.example.com (LSMTP for Windows NT v1.1b) with SMTP id <0.940293@lmailexample1.example.com>; Wed, 12 Aug 2001 21:29:46 +0400 Received: from LISTSERV.EXAMPLE.COM by LISTSERV.EXAMPLE.COM (LISTSERV-TCP/IP release 1.8e) with spool id 8932592 for EXAMPLE@LISTSERV.EXAMPLE.COM; Wed, 12 Aug 2001 20:58:31 +0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Wed, 12 Aug 2001 20:58:11 -0200 Reply-To: EXAMPLE Discussion Sender: EXAMPLE Discussion From: I. EXAMPLE Subject: Boring sample message To: EXAMPLE@LISTSERV.EXAMPLE.COM In-Reply-To: <7834BADFE3125E.90301@example.com> Precedence: list This is a really boring example Listserv message. -- EXAMPLE - http://www.example.com/ To Remove yourself from this list, simply send an email to with the body of "SIGNOFF EXAMPLE" in the email message. You can leave the Subject: field of your email blank. From adm-bounce@oasys.net Mon Jun 4 06:41:14 2001 Return-Path: <> Received: from listserv.example.com (listserv.example.com [10.51.0.6]) by listserv.example.com (8.11.6p2/8.11.6) with ESMTP id h32hgds039; Wed, 10 Apr 2001 20:48:08 -0500 (EST) Received: from LISTSERV.EXAMPLE.COM by LISTSERV.EXAMPLE.COM (LISTSERV-TCP/IP release 1.8d) with spool id 137738 for COCO@LISTSERV.EXAMPLE.COM; Wed, 10 Apr 2001 19:13:57 -0500 Approved-BY: spcadmin@EXAMPLE.COM Received: from relay.example.com (relay.example.com [10.51.0.1]) by listserv.example.com (8.11.6p2/8.11.6) with ESMTP id h31L8r26559 for ; Wed, 1 Apr 2003 16:52:55 -0500 (EST) Received: from cp.example.com (cp.example.com [10.51.0.1]) by relay.example.com (Switch-2.2.6/Switch-2.2.5) with ESMTP id htyLqsv14600 for ; Wed, 10 Apr 2001 15:26:55 -0500 (EST) Received: (from nobody@localhost) by cp.example.com (8.11.6/8.11.6) id h31LqsX16086; Wed, 10 Apr 2001 15:25:54 -0500 (EST) Message-Id: <200104102125.h31LqsX16086@cp.example.com> Date: Wed, 10 Apr 2001 15:25:54 -0500 Reply-To: vibrant_newsletters@EXAMPLE.NET Sender: Comedy Company From: Comedy Company Subject: Another boring sample message To: COCO@LISTSERV.EXAMPLE.COM Status: U And here's another one but the Reply-To is not set to the list. From adm-bounce@oasys.net Mon Jun 4 06:41:14 2001 Received: from [10.80.0.8] by mail.example.com (SMTPD32-3.04) id A3CCCC1700AC; Mon, 02 Feb 1998 20:25:33 -0700 Received: from total.example.com (du-226.example.com [10.80.0.226]) by poseidon.example.com (8.8.6/8.8) with SMTP id QBB30808; Mon, 2 Feb 1998 04:08:00 GMT Subject: CommuniGate List example Message-Id: <00000038942968439085@total.example.com> To: subscribers:; X-ListServer: CommuniGate List 1.4 From: test@example.com (Test Account) Sender: CGnet@total.example.com (CGnet) Date: Mon, 02 Feb 1998 13:57:22 +1000 Organization: Example Limited X-Mailer: CommuniGate 2.9.8 Errors-To: Greene@total.example.com Reply-To: CGnet@total.example.com MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="__==========0000000003894==total.example.com==__" This is a MIME-encapsulated message If you read this, you may want to switch to a better mailer --__==========0000000003894==total.example.com==__ Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit List content goes here. --__==========0000000003894==total.example.com==__ Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ You have received this message because you are subscribed to Gnet. To unsubscribe, send any message to: CGnet-off@total.example.com ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --__==========0000000003894==total.example.com==__-- Mail-Box-2.118/tests/31fgroups/10resent.t0000644000175000001440000000555512473603434020514 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the processing of resent groups. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 26; use IO::Scalar; use Mail::Message::Head::ResentGroup; use Mail::Message::Head::Complete; # # Creation of a group # my $h = Mail::Message::Head::Complete->new; ok(defined $h); my $rg = Mail::Message::Head::ResentGroup->new ( head => $h , From => 'the.rg.group@example.com' , Received => 'obligatory field' ); ok(defined $rg); isa_ok($rg, 'Mail::Message::Head::ResentGroup'); my @fn = $rg->fieldNames; cmp_ok(scalar(@fn), '==', 2, "Two fields"); is($fn[0], 'Received'); is($fn[1], 'Resent-From'); { my $from = $rg->from; ok(ref $from); isa_ok($from, 'Mail::Message::Field'); is($from->name, 'resent-from'); } # # Interaction with a header # $h->add(From => 'me'); $h->add(To => 'you'); $h->addResentGroup($rg); { my $output; my $fh = IO::Scalar->new(\$output); $h->print($fh); $fh->close; is($output, <<'EXPECTED'); From: me To: you Received: obligatory field Resent-From: the.rg.group@example.com EXPECTED } my $rg2 = $h->addResentGroup ( Received => 'now or never' , Cc => 'cc to everyone' , Bcc => 'undisclosed' , 'Return-Path' => 'Appears before everything else' , 'Message-ID' => '' , Sender => 'do not believe it' , From => 'should be added' , To => 'just to check every single field' ); ok(defined $rg2); ok(ref $rg2); isa_ok($rg2, 'Mail::Message::Head::ResentGroup'); { my $output; my $fh = IO::Scalar->new(\$output); $h->print($fh); $fh->close; is($output, <<'EXPECTED'); From: me To: you Return-Path: Appears before everything else Received: now or never Resent-From: should be added Resent-Sender: do not believe it Resent-To: just to check every single field Resent-Cc: cc to everyone Resent-Bcc: undisclosed Resent-Message-ID: Received: obligatory field Resent-From: the.rg.group@example.com EXPECTED } my $h2 = $h->clone; ok(defined $h2); isa_ok($h2, 'Mail::Message::Head::Complete'); { my @rgs = $h2->resentGroups; cmp_ok(@rgs, '==', 2); ok(defined $rgs[0]); ok(ref $rgs[0]); ok($rgs[0]->isa('Mail::Message::Head::ResentGroup')); my $rg1 = $rgs[0]; is($rg1->messageId, ''); my @of = $rg1->orderedFields; cmp_ok(@of, '==', 8); @of = $rgs[1]->orderedFields; cmp_ok(@of, '==', 2); # Now delete, and close scope to avoid accidental reference to # fields which should get cleaned-up. $rgs[0]->delete; } { my @rgs = $h2->resentGroups; cmp_ok(@rgs, '==', 1); my @of = $rgs[0]->orderedFields; cmp_ok(@of, '==', 2); my $output; my $fh = IO::Scalar->new(\$output); $h2->print($fh); $fh->close; is($output, <<'EXPECTED'); From: me To: you Received: obligatory field Resent-From: the.rg.group@example.com EXPECTED } Mail-Box-2.118/tests/31fgroups/20list.t0000644000175000001440000001573712473603434020173 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the processing of list groups. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use IO::Scalar; use File::Spec; use Mail::Message::Head::Complete; use Mail::Message; use Mail::Box::Mbox; BEGIN { if($] < 5.007003) { plan skip_all => "Requires module Encode, which requires Perl 5.7.3"; exit 0; } eval { require Mail::Message::Head::ListGroup }; if($@) { plan skip_all => 'Extended attributes not available (install Encode?)'; exit 0; } else { plan tests => 119; } } # # Creation of a group # my $mailbox = '"Mail::Box development" '; my $lg0 = Mail::Message::Head::ListGroup->new(address => $mailbox); ok(defined $lg0, 'simple construction'); my $addr = $lg0->address; ok(defined $addr, 'address defined'); isa_ok($addr, 'Mail::Message::Field::Address'); is($addr->phrase, 'Mail::Box development'); is($lg0->listname, 'Mail::Box development'); is($addr->address, 'mailbox@perl.overmeer.net'); is("$addr", $mailbox); is($lg0->address->string, $mailbox); ok(!defined $lg0->type); ok(!defined $lg0->software); ok(!defined $lg0->version); ok(!defined $lg0->rfc); # # Extraction of a group # my $h = Mail::Message::Head::Complete->new; ok(defined $h); my $lg = Mail::Message::Head::ListGroup->from($h); ok(!defined $lg, "no listgroup in empty header"); # # Open folder with example messages # my $fn = 'mlfolder'; $fn = File::Spec->catfile('31fgroups', $fn) unless -f $fn; $fn = File::Spec->catfile('tests', $fn) unless -f $fn; die "Cannot find file with mailinglist examples ($fn)" unless -f $fn; my $folder = Mail::Box::Mbox->new(folder => $fn, extract => 'ALWAYS'); ok(defined $folder, "open example folder"); die unless defined $folder; my @msgs = $folder->messages; my @expect = ( { } , { type => 'Mailman' , version => '2.0rc1' , address => 'templates@template-toolkit.org' , listname=> 'templates' , details => 'Mailman at templates@template-toolkit.org (2.0rc1), 11 fields' , rfc => 'rfc2369' } , { type => 'Ezmlm' , software=> undef , version => undef , address => 'perl5-porters@perl.org' , listname=> 'perl5-porters' , details => 'Ezmlm at perl5-porters@perl.org, 6 fields' , rfc => 'rfc2369' } , { type => 'Smartlist' , software=> undef , version => undef , address => 'debian-devel@lists.debian.org' , listname=> 'debian-devel' , details => 'Smartlist at debian-devel@lists.debian.org, 12 fields' , rfc => undef } , { type => 'Majordomo' , software=> undef , version => undef , address => 'london-pm@lists.dircon.co.uk' , listname=> 'london-pm' , details => 'Majordomo at london-pm@lists.dircon.co.uk, 2 fields' , rfc => undef } , { type => 'Sympa' , software=> undef , version => undef , address => 'noustestons@cru.fr' , listname=> 'noustestons' , details => 'Sympa at noustestons@cru.fr, 9 fields' , rfc => 'rfc2369' } , { type => 'Listar' , software=> 'Listar' , version => 'v0.129a' , address => 'adm@oasys.net' , listname=> 'adm' , details => 'Listar at adm@oasys.net (v0.129a), 8 fields' , rfc => undef } , { type => 'YahooGroups' , software=> undef , version => undef , address => 'ryokoforever@yahoogroups.com' , listname=> 'ryokoforever' , details => 'YahooGroups at ryokoforever@yahoogroups.com, 7 fields' , rfc => undef } , { type => 'Mailman' , software=> undef , version => '2.0.1' , address => 'London.pm Perl M[ou]ngers ' , listname=> 'London.pm Perl M[ou]ngers ' , details => 'Mailman at london.pm@london.pm.org (2.0.1), 6 fields' , rfc => 'rfc2919' } , { type => 'Ecartis' , software=> 'Ecartis' , version => 'v1.0.0' , address => 'adm@oasys.net' , listname=> 'adm' , details => 'Ecartis at adm@oasys.net (v1.0.0), 7 fields' , rfc => undef } , { type => 'CommuniGatePro' , software=> 'CommuniGate Pro' , version => '4.0.6' , address => 'Mail-ListDetector@gunzel.org' , listname=> 'Mail-ListDetector.gunzel.org' , details => 'CommuniGatePro at Mail-ListDetector@gunzel.org (CommuniGate Pro 4.0.6), 4 fields' , rfc => 'rfc2919' } , { type => 'FML' , software=> 'fml' , version => '4.0 STABLE (20010208)' , address => 'mlname@domain.example.com' , listname=> 'mlname' , details => 'FML at mlname@domain.example.com (fml 4.0 STABLE (20010208)), 10 fields' , rfc => 'rfc2369' } , { type => 'FML' , software=> 'fml' , version => '4.0 STABLE (20010218)' , address => 'Announce@mldetector.gr.jp' , listname=> 'Announce' , details => 'FML at Announce@mldetector.gr.jp (fml 4.0 STABLE (20010218)), 6 fields' , rfc => undef } , { type => 'Listbox' # based on sending address (old) , software=> undef , version => undef , address => 'sample@v2.listbox.com' , listname=> 'sample' , details => 'Listbox at sample@v2.listbox.com, 5 fields' , rfc => 'rfc2919' } , { type => 'Listbox' # based on List-Software , software=> 'listbox.com' , version => 'v2.0' , address => 'sample@v2.listbox.com' , listname=> 'sample' , details => 'Listbox at sample@v2.listbox.com (listbox.com v2.0), 6 fields' , rfc => 'rfc2919' } , { type => 'Listserv' , software=> 'LISTSERV-TCP/IP' , version => '1.8e' , address => '"EXAMPLE Discussion" ' , listname=> 'EXAMPLE Discussion' , details => 'Listserv at "EXAMPLE Discussion" (LISTSERV-TCP/IP 1.8e), 1 fields' , rfc => undef } , { type => 'Listserv' , software=> 'LISTSERV-TCP/IP' , version => '1.8d' , address => '"Comedy Company" ' , listname=> 'Comedy Company' , details => 'Listserv at "Comedy Company" (LISTSERV-TCP/IP 1.8d), 1 fields' , rfc => undef } , { type => 'CommuniGate' , software=> 'CommuniGate' , version => '1.4' , address => ' (CGnet)' , listname=> 'CGnet' , details => 'CommuniGate at CGnet@total.example.com (1.4), 1 fields' , rfc => undef } ); cmp_ok(scalar @msgs, '==', @expect, "all messages"); for(my $nr = 0; $nr < @msgs; $nr++) { my $msg = $msgs[$nr]; my %exp = %{$expect[$nr]}; my $lg = $msg->head->listGroup; if(! defined $lg) { ok(keys %exp == 0, "msg $nr is non-list message"); next; } isa_ok($lg, 'Mail::Message::Head::ListGroup', "msg $nr from $exp{type}"); is($lg->details, $exp{details}, "$nr details"); is($lg->type, $exp{type}, "$nr type"); is($lg->software, $exp{software}, "$nr software"); is($lg->version, $exp{version}, "$nr version"); is($lg->rfc, $exp{rfc}, "$nr rfc"); } Mail-Box-2.118/tests/31fgroups/30spam.t0000644000175000001440000000703312473603434020147 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the processing of spam groups. # use strict; use warnings; use lib qw(. .. tests); use Tools; use File::Spec; use Test::More tests => 75; use Mail::Message::Head::Complete; use Mail::Message::Head::SpamGroup; use Mail::Box::Mbox; # # Creation of a group # my $sg = Mail::Message::Head::SpamGroup->new; ok(defined $sg, 'simple construction'); isa_ok($sg, 'Mail::Message::Head::SpamGroup'); # # Extraction of a group # my $h = Mail::Message::Head::Complete->new; ok(defined $h); my @sgs = Mail::Message::Head::SpamGroup->from($h); ok(!@sgs, "no spamgroups in empty header"); # # Open folder with example messages # my $fn = 'sgfolder'; $fn = File::Spec->catfile('31fgroups', $fn) unless -f $fn; $fn = File::Spec->catfile('tests', $fn) unless -f $fn; die "Cannot find file with spam filter examples ($fn)" unless -f $fn; my $folder = Mail::Box::Mbox->new(folder => $fn, extract => 'ALWAYS'); ok(defined $folder, "open example folder"); die unless defined $folder; my @msgs = $folder->messages; cmp_ok(scalar(@msgs), '==', 11, "all expected messages present"); for(my $nr=0; $nr<5; $nr++) { my $msg = $folder->message($nr); my @sgs = $msg->head->spamGroups; cmp_ok(scalar(@sgs), '==', 1, "spam group at $nr"); my $sg = $sgs[0]; is($sg->type, "SpamAssassin"); $sg->delete; @sgs = $msg->head->spamGroups; cmp_ok(scalar(@sgs), '==', 0, "spam group $nr removed"); } for(my $nr=5; $nr<10; $nr++) { my $msg = $folder->message($nr); my $head = $msg->head; my @sgs = $head->spamGroups; cmp_ok(scalar(@sgs), '==', 1, "spam group at $nr"); my $sg0 = $sgs[0]; is($sg0->type, "Habeas-SWE"); my $sg = $msg->head->spamGroups('Habeas-SWE'); ok(defined $sg); is($sg->type, "Habeas-SWE"); my $is_correct = ($nr==5 || $nr==6) ? 1 : 0; my $found_correct = $sg->habeasSweFieldsCorrect || 0; cmp_ok($found_correct, '==', $is_correct, "spam in $nr"); $found_correct = Mail::Message::Head::SpamGroup->habeasSweFieldsCorrect($msg) || 0; cmp_ok($found_correct, '==', $is_correct, "spam in message $nr"); $found_correct = Mail::Message::Head::SpamGroup->habeasSweFieldsCorrect($head) || 0; cmp_ok($found_correct, '==', $is_correct, "spam in head of message $nr"); $sg->delete; @sgs = $msg->head->spamGroups; cmp_ok(scalar(@sgs), '==', 0, "spam group $nr removed"); } my $msg = $folder->message(10); my $head = $msg->head; ok(Mail::Message::Head::SpamGroup->habeasSweFieldsCorrect($msg)); ok(Mail::Message::Head::SpamGroup->habeasSweFieldsCorrect($head)); @sgs = sort {$a->type cmp $b->type} $head->spamGroups; cmp_ok(scalar(@sgs), '==', 2, "message 11 with 2 groups"); is($sgs[0]->type, 'Habeas-SWE'); ok($sgs[0]->habeasSweFieldsCorrect); is($sgs[1]->type, 'SpamAssassin'); my $sgs = $head->spamGroups; cmp_ok($sgs, '==', 2, "scalar context = amount"); my $sa = $head->spamGroups('SpamAssassin'); ok(defined $sa, "found spam assassin group"); my $swe = $head->spamGroups('Habeas-SWE'); ok($swe->habeasSweFieldsCorrect); ok(defined $swe, "found habeas-swe group"); $sa->delete; @sgs = $head->spamGroups; cmp_ok(scalar(@sgs), '==', 1, "message 11 still 1 group"); is($sgs[0]->type, 'Habeas-SWE'); ok($sgs[0]->habeasSweFieldsCorrect); $swe->delete; @sgs = $head->spamGroups; cmp_ok(scalar(@sgs), '==', 0, "message 11 without spam group"); Mail-Box-2.118/tests/10reporter/0000755000175000001440000000000012473604501017022 5ustar00markovusers00000000000000Mail-Box-2.118/tests/10reporter/Definition.pm0000644000175000001440000000056312473604424021460 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::10reporter::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Report; general base class"} sub critical {1} sub skip { undef } 1; Mail-Box-2.118/tests/10reporter/20reports.t0000644000175000001440000000511312473603434021053 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test reporting warnings and errors # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 51; use Mail::Reporter; my $rep = Mail::Reporter->new; ok(defined $rep); my $catch; { local $SIG{__WARN__} = sub { $catch = shift }; $rep->log(ERROR => 'a test'); # \n will be added } is($catch, "ERROR: a test\n", 'Stored one error text'); cmp_ok($rep->report('ERRORS'), '==', 1, 'Counts one error'); is(($rep->report('ERRORS'))[0], "a test", 'Correctly stored text'); undef $catch; { local $SIG{__WARN__} = sub { $catch = shift }; $rep->log(WARNING => "filter"); } ok(defined $catch, 'No visible warnings'); cmp_ok($rep->report('WARNING'), '==', 1, 'Count logged warnings'); cmp_ok($rep->report('ERROR'), '==', 1, 'Count logged errors'); cmp_ok($rep->report, '==', 2, 'Count all logged messages'); is(($rep->report('WARNINGS'))[0], "filter", 'No \n added'); my @reps = $rep->report; is($reps[0][0], 'WARNING', 'Checking report()'); is($reps[0][1], "filter"); is($reps[1][0], 'ERROR'); is($reps[1][1], "a test"); @reps = $rep->reportAll; is($reps[0][0], $rep, 'Checking reportAll()'); is($reps[0][1], 'WARNING'); is($reps[0][2], "filter"); is($reps[1][0], $rep); is($reps[1][1], 'ERROR'); is($reps[1][2], "a test"); cmp_ok($rep->errors, '==', 1, 'Check errors() short-cut'); cmp_ok($rep->warnings, '==', 1, 'Check warnings() short-cut'); # # Check merging reports # my $r2 = Mail::Reporter->new(trace => 'NONE', log => 'DEBUG'); ok(defined $r2, 'Another traceable object'); isa_ok($r2, 'Mail::Reporter'); ok($r2->log(WARNING => 'I warn you!')); ok($r2->log(ERROR => 'You are in error')); ok($r2->log(ERROR => 'I am sure!!')); ok($r2->log(NOTICE => 'Don\'t notice me')); $rep->addReport($r2); @reps = $rep->reportAll; cmp_ok(@{$reps[0]}, '==', 3); is($reps[0][0], $rep, 'Checking reportAll()'); is($reps[0][1], 'NOTICE'); is($reps[0][2], "Don't notice me"); cmp_ok(@{$reps[1]}, '==', 3); is($reps[1][0], $rep); is($reps[1][1], 'WARNING'); is($reps[1][2], "filter"); cmp_ok(@{$reps[2]}, '==', 3); is($reps[2][0], $rep); is($reps[2][1], 'WARNING'); is($reps[2][2], "I warn you!"); cmp_ok(@{$reps[3]}, '==', 3); is($reps[3][0], $rep); is($reps[3][1], 'ERROR'); is($reps[3][2], "a test"); cmp_ok(@{$reps[4]}, '==', 3); is($reps[4][0], $rep); is($reps[4][1], 'ERROR'); is($reps[4][2], "You are in error"); cmp_ok(@{$reps[5]}, '==', 3); is($reps[5][0], $rep); is($reps[5][1], 'ERROR'); is($reps[5][2], "I am sure!!"); Mail-Box-2.118/tests/10reporter/30callback.t0000644000175000001440000000202212473603434021106 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test installing a log callback # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 13; use Mail::Reporter; my ($thing, $level, @text); sub callback($$@) { ($thing, $level, @text) = @_ } my ($l, $t) = Mail::Reporter->defaultTrace(PROGRESS => \&callback); ok(defined $l); ok(defined $t); is($l, 'NONE', 'string log level'); cmp_ok($l, '==', 6, 'numeric log level'); is($t, 'PROGRESS', 'string trace level'); cmp_ok($t, '==', 3, 'string trace level'); Mail::Reporter->log(ERROR => 'one', 'two'); is($thing, 'Mail::Reporter', 'class call'); is($level, 'ERROR', 'string trace level'); cmp_ok(@text, '==', 1, 'text'); is($text[0], "onetwo"); ($thing, $level, @text) = (); Mail::Reporter->log(NOTICE => 'three'); ok(!defined $thing, 'too low level, nothing'); ok(!defined $level, 'no level'); cmp_ok(@text, '==', 0, 'no text'); Mail-Box-2.118/tests/10reporter/10errors.t0000644000175000001440000000457512473603434020703 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test producing warnings, errors and family. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 41; use Mail::Reporter; # # Dualvar logPriority # my $a = Mail::Reporter->logPriority('WARNING'); ok(defined $a); ok($a == 4); is($a, 'WARNING'); my $b = Mail::Reporter->logPriority('WARNINGS'); ok(defined $b); ok($b == 4); is($b, 'WARNING'); my $c = Mail::Reporter->logPriority(4); ok(defined $c); ok($c == 4); is($c, 'WARNING'); my $d = Mail::Reporter->logPriority('AAP'); ok(!defined $d); my $e = Mail::Reporter->logPriority(8); ok(!defined $e); # # Initial default trace # my ($l, $t) = Mail::Reporter->defaultTrace; ok(defined $l); ok(defined $t); is($l, 'WARNING', 'string log level'); cmp_ok($l, '==', 4, 'numeric log level'); is($t, 'WARNING', 'string trace level'); cmp_ok($t, '==', 4, 'string trace level'); # # Set default trace # ($l, $t) = Mail::Reporter->defaultTrace('DEBUG', 'ERRORS'); ok(defined $l); ok(defined $t); is($l, 'DEBUG', 'string log level'); cmp_ok($l, '==', 1, 'numeric log level'); is($t, 'ERROR', 'string trace level'); cmp_ok($t, '==', 5, 'string trace level'); ($l, $t) = Mail::Reporter->defaultTrace('PROGRESS'); is($l, 'PROGRESS', 'string log level'); cmp_ok($l, '==', 3, 'numeric log level'); is($t, 'PROGRESS', 'string trace level'); cmp_ok($t, '==', 3, 'string trace level'); ($l, $t) = Mail::Reporter->defaultTrace('WARNING', 'WARNINGS'); is($l, 'WARNING', 'string log level'); cmp_ok($l, '==', 4, 'numeric log level'); is($t, 'WARNING', 'string trace level'); cmp_ok($t, '==', 4, 'string trace level'); # # Reporting levels based on objects # my $rep = Mail::Reporter->new; ok(defined $rep); is($rep->log, 'WARNING', 'Default log-level'); cmp_ok($rep->log, '==', 4); $l = $rep->log; is($l, 'WARNING', 'Default log-level'); cmp_ok($l, '==', 4); is($rep->trace, 'WARNING', 'Default trace-level'); cmp_ok($rep->trace, '==', 4); $t = $rep->trace; is($t, 'WARNING', 'Default trace-level'); cmp_ok($t, '==', 4); cmp_ok($rep->trace('ERROR'), '==', 5, 'Check error level numbers'); Mail-Box-2.118/tests/12head/0000755000175000001440000000000012473604501016063 5ustar00markovusers00000000000000Mail-Box-2.118/tests/12head/Definition.pm0000644000175000001440000000056312473604425020522 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::12head::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Message::Head; message headers"} sub critical {1} sub skip { undef } 1; Mail-Box-2.118/tests/12head/10create.t0000644000175000001440000000377012473603434017667 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the processing of a whole message header, not the reading of a # header from file. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 25; use IO::Scalar; use Mail::Message::Head::Complete; my $h = Mail::Message::Head::Complete->new; { my @o = $h->names; cmp_ok(scalar @o, '==', 0); } # Adding a first. { my $a = $h->add(From => 'me@home'); ok(ref $a); isa_ok($a, 'Mail::Message::Field'); } { my @o = $h->names; cmp_ok(@o, '==', 1); } { my @f = $h->get('From'); # list context cmp_ok(@f, '==', 1); ok(ref $f[0]); isa_ok($f[0], 'Mail::Message::Field'); is($f[0]->body, 'me@home'); } { my $f = $h->get('From'); # scalar context is($f->body, 'me@home'); } # Adding a second. $h->add(From => 'you2me'); { my @o = $h->names; cmp_ok(@o, '==', 1); } { my @f = $h->get('From'); # list context cmp_ok(@f, '==', 2); is($f[0]->body, 'me@home'); is($f[1]->body, 'you2me'); } { my $f = $h->get('From'); # scalar context is($f->body, 'you2me'); } # Missing { my @f = $h->get('unknown'); cmp_ok(@f, '==', 0); } { my $f = $h->get('unknown'); ok(! defined $f); } # Set { $h->set(From => 'perl'); my @f = $h->get('From'); cmp_ok(@f, '==', 1); } { my @o = $h->names; cmp_ok(@o, '==', 1); } $h->set(New => 'test'); { my @o = sort $h->names; cmp_ok(@o, '==', 2); is($o[0], 'from'); is($o[1], 'new'); } # Reset $h->reset('From'); { my @f = $h->get('From'); cmp_ok(@f, '==', 0); } { my $l = Mail::Message::Field->new(New => 'other'); $h->reset('NEW', $h->get('new'), $l); } { my @f = $h->get('neW'); cmp_ok(@f, '==', 2); } # Print $h->add(Subject => 'hallo!'); $h->add(To => 'the world'); $h->add(From => 'me'); my $output; my $fakefile = new IO::Scalar \$output; $h->print($fakefile, 0); my $expected = <<'EXPECTED_OUTPUT'; New: test New: other Subject: hallo! To: the world From: me EXPECTED_OUTPUT is($output, $expected); is($h->toString, $expected); $fakefile->close; Mail-Box-2.118/tests/12head/30partial.t0000644000175000001440000000175212473603434020060 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the removing fields in partial headers. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 15; use IO::Scalar; use Mail::Message::Head::Complete; my $h = Mail::Message::Head::Complete->build ( Subject => 'this is a test' , To => 'you' , Top => 'above' , From => 'me' , 'Content-Length' => 12 , 'Content-Type' => 'text/plain' ); # lines = 6 fields + blank ok(defined $h); isa_ok($h, 'Mail::Message::Head::Complete'); isnt(ref($h), 'Mail::Message::Head::Partial'); cmp_ok($h->nrLines, '==', 7); ok(defined $h->removeFields('to')); isa_ok($h, 'Mail::Message::Head::Complete'); isa_ok($h, 'Mail::Message::Head::Partial'); cmp_ok($h->nrLines, '==', 6); ok(defined $h->get('top')); ok(! defined $h->get('to')); ok(defined $h->get('Content-Length')); ok(defined $h->removeFields( qr/^Content-/i )); isa_ok($h, 'Mail::Message::Head::Partial'); cmp_ok($h->nrLines, '==', 4); ok(!defined $h->get('Content-Length')); Mail-Box-2.118/tests/40mbox/0000755000175000001440000000000012473604501016130 5ustar00markovusers00000000000000Mail-Box-2.118/tests/40mbox/Definition.pm0000644000175000001440000000055412473604424020566 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::40mbox::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Box::Mbox; mbox folders"} sub critical {1} sub skip { undef } 1; Mail-Box-2.118/tests/40mbox/30delay.t0000644000175000001440000001005712473603434017565 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test delay-loading on mbox folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 288; use File::Compare; use File::Copy; use Mail::Box::Mbox; # # We will work with a copy of the original to avoid that we write # over our test file. # copy $src, $cpy or die "Cannot create test folder $cpy: $!\n"; my $folder = new Mail::Box::Mbox ( folder => "=$cpyfn" , folderdir => $folderdir , lock_type => 'NONE' , extract => 'LAZY' , access => 'rw' ); die "Couldn't read $cpy: $!\n" unless $folder; # # Check that the whole folder is continuous # my $blank = $crlf_platform ? 2 : 1; my ($end, $msgnr) = (-$blank, 0); foreach my $message ($folder->messages) { my ($msgbegin, $msgend) = $message->fileLocation; my ($headbegin, $headend) = $message->head->fileLocation; my ($bodybegin, $bodyend) = $message->body->fileLocation; cmp_ok($msgbegin, "==", $end+$blank, "begin $msgnr"); cmp_ok($headbegin, ">", $msgbegin, "end $msgnr"); cmp_ok($bodybegin, "==", $headend, "glue $msgnr"); $end = $bodyend; $msgnr++; } cmp_ok($end+$blank , "==", -s $folder->filename, "full folder read"); # # None of the messages should be modified. # my $modified = 0; $modified ||= $_->modified foreach $folder->messages; ok(! $modified, "folder not modified"); # # Write unmodified folder to different file. # Because file-to-file copy of unmodified messages, the result must be # the same. # my $oldsize = -s $folder->filename; $folder->modified(1); # force write ok($folder->write, "writing folder"); cmp_ok($oldsize, "==", -s $folder->filename, "expected size"); # Try to read it back my $copy = new Mail::Box::Mbox ( folder => "=$cpyfn" , folderdir => $folderdir , lock_type => 'NONE' , extract => 'LAZY' ); ok(defined $copy, "re-reading folder"); cmp_ok($folder->messages, "==", $copy->messages, "all messages found"); # Check also if the subjects are the same. my @f_subjects = map {$_->head->get('subject') ||''} $folder->messages; my @c_subjects = map {$_->head->get('subject') ||''} $copy->messages; while(@f_subjects) { my $f = shift @f_subjects; my $c = shift @c_subjects; last unless $f eq $c; } ok(!@f_subjects, "all msg-subjects found"); # # None of the messages should be parsed yet. # my $parsed = 0; $_->isParsed && $parsed++ foreach $folder->messages; cmp_ok($parsed, "==", 0, "none of the msgs parsed"); # # Check that the whole folder is continuous # ($end, $msgnr) = (-$blank, 0); foreach my $message ($copy->messages) { my ($msgbegin, $msgend) = $message->fileLocation; my ($headbegin, $headend) = $message->head->fileLocation; my ($bodybegin, $bodyend) = $message->body->fileLocation; #warn "($msgbegin, $msgend) ($headbegin, $headend) ($bodybegin, $bodyend)\n"; cmp_ok($msgbegin, "==", $end+$blank, "begin $msgnr"); cmp_ok($headbegin, ">", $msgbegin, "end $msgnr"); cmp_ok($bodybegin, "==", $headend, "glue $msgnr"); $end = $bodyend; $msgnr++; } cmp_ok($end+$blank, "==", -s $copy->filename, "written file size ok"); # # None of the messages should be parsed still. # $parsed = 0; $_->isParsed && $parsed++ foreach $copy->messages; cmp_ok($parsed, "==", 0, "none of the msgs parsed"); # # Force one message to be loaded. # my $message = $copy->message(3)->forceLoad; ok(ref $message, "force load of one msg"); my $body = $message->body; ok($message->isParsed); isa_ok($message, 'Mail::Message'); # # Ask for a new field from the header, which is not taken by # default. The message should get parsed. # ok(!defined $message->head->get('xyz')); ok(not $copy->message(2)->isParsed); ok(defined $copy->message(2)->head->get('x-mailer')); isa_ok($copy->message(2)->head, 'Mail::Message::Head::Complete'); ok(not $copy->message(2)->isParsed); unlink $cpy; Mail-Box-2.118/tests/40mbox/40append.t0000644000175000001440000000660512473603434017743 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test appending messages on Mbox folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 32; use File::Compare; use File::Copy; use Mail::Box::Manager; use Mail::Message::Construct; # # We will work with a copy of the original to avoid that we write # over our test file. # my $empty = File::Spec->catfile($folderdir, 'empty'); copy $src, $cpy or die "Cannot create test folder $cpy: $!\n"; unlink $empty; my $mgr = Mail::Box::Manager->new; my @fopts = ( lock_type => 'NONE' , extract => 'LAZY' , access => 'rw' , save_on_exit => 0 ); my $folder = $mgr->open ( folder => "=$cpyfn" , folderdir => $folderdir , @fopts ); die "Couldn't read $cpy: $!\n" unless $folder; cmp_ok($folder->messages, "==", 45); # Add a message which is already in the opened folder. This should # be ignored. $folder->addMessage($folder->message(3)->clone); cmp_ok($folder->messages, "==", 45); # # Create an Mail::Message and add this to the open folder. # my $msg = Mail::Message->build ( From => 'me@example.com' , To => 'you@anywhere.aq' , Subject => 'Just a try' , data => [ "a short message\n", "of two lines.\n" ] ); ok(defined $msg, "message build successful"); my @appended = $mgr->appendMessage("=$cpyfn", $msg); cmp_ok($folder->messages, "==", 46, "message extends folder"); cmp_ok(scalar @appended, "==", 1, "coerced message returned"); isa_ok($appended[0], 'Mail::Box::Message'); cmp_ok($mgr->openFolders, "==", 1); $mgr->close($folder); cmp_ok($mgr->openFolders, "==", 0, "folder is closed"); my $msg2 = Mail::Message->build ( From => 'me_too@example.com' , To => 'yourself@anywhere.aq' , Subject => 'Just one more try' , data => [ "a short message\n", "of two lines.\n" ] ); my $old_size = -s $cpy; @appended = $mgr->appendMessage($cpy, $msg2 , lock_type => 'NONE' , extract => 'LAZY' , access => 'rw' ); cmp_ok(@appended, "==", 1); cmp_ok($mgr->openFolders, "==", 0); ok($old_size != -s $cpy); $folder = $mgr->open ( folder => "=$cpyfn" , folderdir => $folderdir , @fopts , access => 'rw' ); ok($folder); cmp_ok($folder->messages, "==", 47); my $sec = $mgr->open ( folder => '=empty' , folderdir => $folderdir , @fopts , create => 1 ); ok(defined $sec, "open newly created empty folder"); exit unless defined $sec; cmp_ok($sec->messages, "==", 0, "no messages in new folder"); cmp_ok($mgr->openFolders, "==", 2, "but the manager knows it is created"); my $move = $folder->message(1); ok(defined $move, "select a message to be moved"); my @moved = $mgr->moveMessage($sec, $move); cmp_ok(@moved, "==", 1, "one message has been moved"); isa_ok($moved[0], 'Mail::Box::Message'); is($moved[0]->folder->name, $sec->name); ok($move->deleted); cmp_ok($folder->messages, "==", 47); cmp_ok($sec->messages, "==", 1); my $copy = $folder->message(2); ok(defined $copy); die unless defined $copy; my @copied = $mgr->copyMessage($sec, $copy); cmp_ok(@copied, "==", 1); isa_ok($copied[0], 'Mail::Box::Message'); ok(!$copy->deleted); cmp_ok($folder->messages, "==", 47); cmp_ok($sec->messages, "==", 2); ok($sec->modified); $folder->close; $sec->close; ok(-f $empty); ok(-s $empty); unlink $empty; Mail-Box-2.118/tests/40mbox/70inplace.t0000644000175000001440000001172312473603434020107 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test writing of mbox folders using the inplace policy. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 116; use File::Compare; use File::Copy; use Mail::Box::Mbox; # # We will work with a copy of the original to avoid that we write # over our test file. # unlink $cpy; copy $src, $cpy or die "Cannot create test folder $cpy: $!\n"; my $folder = new Mail::Box::Mbox ( folder => "=$cpyfn" , folderdir => $folderdir , lock_type => 'NONE' , extract => 'LAZY' , access => 'rw' , log => 'NOTICES' #, trace => 'NOTICES' ); die "Couldn't read $cpy: $!\n" unless $folder; # # None of the messages should be modified. # my $modified = 0; $modified ||= $_->modified foreach $folder->messages; ok(!$modified); # # Write unmodified folder. This should be ready immediately. # ok($folder->write(policy => 'INPLACE')); my @progress = $folder->report('PROGRESS'); ok(grep m/not changed/, @progress); # # All messages must still be delayed. # my $msgnr = 0; foreach ($folder->messages) { my $body = $_->body; if($body->isDelayed || $body->isNested || $body->isMultipart) {ok(1)} else { warn "Warn: failed message $msgnr.\n"; ok(0) } $msgnr++; } # # Now MODIFY the folder, and write it again. # my $modmsgnr = 30; $folder->message($modmsgnr)->modified(1); ok($folder->write(policy => 'INPLACE')); ok(not $folder->modified); # # All before messages before $modmsgnr must still be delayed. # $msgnr = 0; foreach ($folder->messages) { my $body = $_->body; my $right = ($body->isDelayed || $body->isMultipart || $body->isNested) ? ($msgnr < $modmsgnr) : ($msgnr >= $modmsgnr); ok($right, "delayed message $msgnr"); $msgnr++; } my @folder_subjects = sort map {$_->get('subject')||''} $folder->messages; my $folder_messages = $folder->messages; ok(not $folder->modified); $folder->close; # Check also if the subjects are the same. # Try to read it back my $copy = new Mail::Box::Mbox ( folder => "=$cpyfn" , folderdir => $folderdir , lock_type => 'NONE' , extract => 'ALWAYS' ); ok(defined $copy); cmp_ok($copy->messages, "==", $folder_messages); # Check also if the subjects are the same. my @copy_subjects = sort map {$_->get('subject')||''} $copy->messages; my $msg12subject = $copy->message(12)->get('subject'); ok(defined $msg12subject, "got msg12 subject"); while(@folder_subjects) { last unless shift(@folder_subjects) eq shift(@copy_subjects); } ok(!@folder_subjects); # # Check wether inplace rewrite works when a few messages are deleted. # $copy = new Mail::Box::Mbox ( folder => "=$cpyfn" , folderdir => $folderdir , lock_type => 'NONE' , extract => 'LAZY' , access => 'rw' , log => 'NOTICES' #, trace => 'NOTICES' ); die "Couldn't read $cpyfn: $!\n" unless $copy; $copy->message(-1)->delete; # last flagged for deletion ok($copy->message(-1)->deleted); ok($copy->write(policy => 'INPLACE'), "write folder with fewer messsages"); $copy = new Mail::Box::Mbox ( folder => "=$cpyfn" , folderdir => $folderdir , lock_type => 'NONE' , extract => 'ALWAYS' ); ok(defined $copy, "Reopen succesful"); cmp_ok($copy->messages+1, "==", $folder_messages, "1 message less"); # # Rewrite it again, with again 1 fewer message # $copy->close; ok(! defined $copy, "Folder is really closed"); $copy = new Mail::Box::Mbox ( folder => "=$cpyfn" , folderdir => $folderdir , lock_type => 'NONE' , extract => 'ALWAYS' , access => 'rw' ); cmp_ok($copy->messages, "==", $folder_messages-1, "1 message still away"); $copy->message(10)->delete; # some other, doesn't matter ok($copy->message(10)->deleted); ok($copy->write(policy => 'INPLACE'), "write folder with fewer messsages"); $copy = new Mail::Box::Mbox ( folder => "=$cpyfn" , folderdir => $folderdir , lock_type => 'NONE' , extract => 'ALWAYS' ); cmp_ok($copy->messages, "==", $folder_messages-2, "2 messages fewer"); is($copy->message(11)->get('subject'), $msg12subject, "move message"); # # Rewrite it again, with again 1 fewer message: this time the first message # $copy->close; ok(! defined $copy, "Folder is really closed"); $copy = new Mail::Box::Mbox ( folder => "=$cpyfn" , folderdir => $folderdir , lock_type => 'NONE' , extract => 'ALWAYS' , access => 'rw' ); cmp_ok($copy->messages, "==", $folder_messages-2, "2 message still away"); $copy->message(0)->delete; # first flagged for deletion ok($copy->message(0)->deleted); ok($copy->write(policy => 'INPLACE'), "write folder with fewer messsages"); $copy = new Mail::Box::Mbox ( folder => "=$cpyfn" , folderdir => $folderdir , lock_type => 'NONE' , extract => 'ALWAYS' ); cmp_ok($copy->messages, "==", $folder_messages-3, "3 messages fewer"); is($copy->message(10)->get('subject'), $msg12subject, "move message"); unlink $cpy; Mail-Box-2.118/tests/40mbox/60thread.t0000644000175000001440000001136512473603434017744 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test threading on Mbox folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 23; use File::Copy; use Mail::Box::Manager; # # We will work with a copy of the original to avoid that we write # over our test file. # copy $src, $cpy or die "Cannot create test folder $cpy: $!\n"; my $mgr = Mail::Box::Manager->new; ok($mgr); my $folder = $mgr->open ( folder => "=$cpyfn" , folderdir => $folderdir , lock_type => 'NONE' , extract => 'LAZY' , access => 'rw' , save_on_exit => 0 # , thread_timespan => 'EVER' ); ok($folder); my $threads = $mgr->threads(folder => $folder); # First try message which is single. my $single = $folder->messageID( '<200010041822.e94IMZr19712@mystic.es.dupont.com>'); ok($single); my $single2 = $folder->messageID( '200010041822.e94IMZr19712@mystic.es.dupont.com'); ok($single2); is($single2, $single); my $single3 = $folder->messageID( 'garbage <200010041822.e94IMZr19712@mystic.es.dupont.com> trash'); ok($single3); is($single3, $single); my $start = $threads->threadStart($single); ok($start); is($single->messageID, $start->message->messageID); my $message = $folder->messageID('NDBBJJFDMKFOAIFBEPPJIELLCBAA.cknoos@atg.com'); ok($message); my $this = $threads->thread($message); ok($this); compare_thread_dumps($this->threadToString, <<'MIDDLE', 'thread from here'); 1.2K Problem resizing images through perl script 820 `- Re: Problem resizing images through perl script 1.8K `- RE: Problem resizing images through perl script 1.0K `- Re: Problem resizing images through perl script MIDDLE $start = $threads->threadStart($message); ok(defined $start); my $startmsg = $start->message; ok(defined $startmsg); isa_ok($startmsg, 'Mail::Message::Dummy'); isa_ok($startmsg, 'Mail::Message'); ok($startmsg->isDummy); ok($startmsg->messageID ne $message->messageID); compare_thread_dumps($start->threadToString, <<'START', 'thread from top'); 1.2K *- Problem resizing images through perl script 820 | `- Re: Problem resizing images through perl script 1.8K | `- RE: Problem resizing images through perl script 1.0K | `- Re: Problem resizing images through perl script 1.2K `- Re: Convert HTM, HTML files to the .jpg format START $this->folded(1); compare_thread_dumps($start->threadToString, <<'FOLDED', 'folded thread'); *- [4] Problem resizing images through perl script 1.2K `- Re: Convert HTM, HTML files to the .jpg format FOLDED $this->folded(0); compare_thread_dumps($start->threadToString, <<'START', 'unfolded thread'); 1.2K *- Problem resizing images through perl script 820 | `- Re: Problem resizing images through perl script 1.8K | `- RE: Problem resizing images through perl script 1.0K | `- Re: Problem resizing images through perl script 1.2K `- Re: Convert HTM, HTML files to the .jpg format START my $out = join '', map {$_->threadToString} $threads->sortedKnown; my @lines = sort split "\n", $out; ok(@lines = $folder->messages); $out = join '', @lines; my $dump = <<'DUMP'; 1.3K Resize with Transparency 1.2K *- Re: File Conversion From HTML to PS and TIFF 2.1K `--*- Re: File Conversion From HTML to PS and TIFF 2.1K `- Re: File Conversion From HTML to PS and TIFF 1.4K Transparency question 2.4K RE: Transparency question 3.3K RE: Transparency question 5.5K RE: Transparency question 7.2K RE: Transparency question 2.7K RE: jpeg2000 question 1.2K *- Problem resizing images through perl script 820 | `- Re: Problem resizing images through perl script 1.8K | `- RE: Problem resizing images through perl script 1.0K | `- Re: Problem resizing images through perl script 1.2K `- Re: Convert HTM, HTML files to the .jpg format 747 Undefined Symbol: SetWarningHandler 1.1K `- Re: Undefined Symbol: SetWarningHandler 1.8K *- Re: watermarks/embossing 307 Re: Annotate problems (PR#298) 573 `- Re: Annotate problems (PR#298) 1.0K 1.4K `- Re: your mail 1.9K `- Re: your mail 152 Re: your mail 686 `- Re: your mail 189 Re: your mail 2.0K 670 Re: your mail 4.4K `- Re: your mail 552 mailing list archives 1.4K delegates.mgk set-up for unixware printing 1.5K printing solution for UW 7.1 1.4K *- Re: converts new sharpen factors 1.2K New ImageMagick mailing list 27 subscribe 822 Confirmation for subscribe magick-developer 63 `- Re: Confirmation for subscribe magick-developer 11K Welcome to magick-developer 1.7K core dump in simple ImageMagick example 2.2K `- Re: core dump in simple ImageMagick example 882 `- Re: core dump in simple ImageMagick example 754 `- Re: core dump in simple ImageMagick example 2.0K Core Dump on ReadImage 1.0K `- Re: Core Dump on ReadImage 1.6K Font metrics DUMP $dump = join '', sort split /^/, $out; compare_thread_dumps($out, $dump , 'sorted full dump'); Mail-Box-2.118/tests/40mbox/20write.t0000644000175000001440000000274612473603434017626 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test writing of mbox folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 5; use File::Compare; use File::Copy; use Mail::Box::Mbox; # # We will work with a copy of the original to avoid that we write # over our test file. # unlink $cpy; copy $src, $cpy or die "Cannot create test folder $cpy: $!\n"; my $folder = new Mail::Box::Mbox ( folder => "=$cpyfn" , folderdir => $folderdir , lock_type => 'NONE' , extract => 'ALWAYS' , access => 'rw' ); die "Couldn't read $cpy: $!\n" unless $folder; # # None of the messages should be modified. # my $modified = 0; $modified ||= $_->modified foreach $folder->messages; ok(!$modified); # # Write unmodified folder to different file. # Because file-to-file copy of unmodified messages, the result must be # the same. # $folder->modified(1); # force write ok($folder->write(policy => 'REPLACE')); # Try to read it back my $copy = new Mail::Box::Mbox ( folder => "=$cpyfn" , folderdir => $folderdir , lock_type => 'NONE' , extract => 'ALWAYS' ); ok($copy); cmp_ok($folder->messages, "==", $copy->messages); # Check also if the subjects are the same. my @folder_subjects = sort map {$_->head->get('subject')||''} $folder->messages; my @copy_subjects = sort map {$_->head->get('subject')||''} $copy->messages; while(@folder_subjects) { last unless shift(@folder_subjects) eq shift(@copy_subjects); } ok(!@folder_subjects); Mail-Box-2.118/tests/40mbox/10read.t0000644000175000001440000000452112473603434017377 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test reading of mbox folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 151; use File::Compare; use Mail::Box::Mbox; my @src = (folder => "=$fn", folderdir => $folderdir); ok(Mail::Box::Mbox->foundIn(@src), 'check foundIn'); # # The folder is read. # my $folder = Mail::Box::Mbox->new ( @src , lock_type => 'NONE' , extract => 'ALWAYS' ); ok(defined $folder, 'check success open folder'); exit 1 unless defined $folder; cmp_ok($folder->messages , "==", 45, 'found all messages'); is($folder->organization, 'FILE', 'folder organization FILE'); # # Extract one message. # my $message = $folder->message(2); ok(defined $message, 'take one message'); isa_ok($message, 'Mail::Box::Message'); isa_ok($message, 'Mail::Box::Mbox::Message'); # # Extract a few messages. # my @some = $folder->messages(3,7); cmp_ok(@some, "==", 5, 'take range of messages'); isa_ok($some[0], 'Mail::Box::Message'); # # All message should be parsed: extract => ALWAYS # my $parsed = 1; $parsed &&= $_->isParsed foreach $folder->messages; ok($parsed, 'all messages parsed'); # # Check whether all message's locations are nicely connected. # my $blank = $crlf_platform ? 2 : 1; my ($end, $msgnr) = (-$blank, 0); foreach $message ($folder->messages) { my ($msgbegin, $msgend) = $message->fileLocation; my ($headbegin, $headend) = $message->head->fileLocation; my ($bodybegin, $bodyend) = $message->body->fileLocation; #warn "($msgbegin, $msgend) ($headbegin, $headend) ($bodybegin, $bodyend)\n"; cmp_ok($msgbegin, "==", $end+$blank, "begin $msgnr"); cmp_ok($headbegin, ">", $msgbegin, "end $msgnr"); cmp_ok($bodybegin, "==", $headend, "glue $msgnr"); $end = $bodyend; $msgnr++; } cmp_ok($end+$blank, "==", -s $folder->filename); # # Try to delete a message # ok(!$folder->message(2)->deleted, 'msg2 not yet deleted'); $folder->message(2)->delete; ok($folder->message(2)->deleted, 'flag msg for deletion'); cmp_ok($folder->messages , "==", 45, 'deletion not performed yet'); cmp_ok($folder->messages('ACTIVE') , "==", 44, 'less messages ACTIVE'); cmp_ok($folder->messages('DELETED') , "==", 1, 'more messages DELETED'); $folder->close(write => 'NEVER'); exit 0; Mail-Box-2.118/tests/40mbox/80update.t0000644000175000001440000000215212473603434017753 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test appending messages on Mbox folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 4; use File::Copy; use Mail::Box::Manager; # # We will work with a copy of the original to avoid that we write # over our test file. # unlink $cpy; copy $src, $cpy or die "Cannot create test folder $cpy: $!\n"; my $mgr = Mail::Box::Manager->new; my @fopts = ( lock_type => 'NONE' , extract => 'LAZY' , access => 'rw' , save_on_exit => 0 ); my $folder = $mgr->open ( folder => "=$cpyfn" , folderdir => $folderdir , @fopts ); die "Couldn't read $cpy: $!\n" unless $folder; cmp_ok($folder->messages, "==", 45); my $msg = Mail::Message->build ( From => 'me', To => 'you', Subject => 'Hello!' , data => [ "one line\n" ] ); ok(defined $msg); my $filename = $folder->filename; die "Cannot open $filename: $!" unless open OUT, '>>', $filename; print OUT $msg->head->createFromLine; $msg->print(\*OUT); close OUT; cmp_ok($folder->messages, "==", 45); $folder->update; cmp_ok($folder->messages, "==", 46); $folder->close; Mail-Box-2.118/tests/40mbox/50create.t0000644000175000001440000001312612473603434017734 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test creation/deletion and listing of folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 28; use File::Copy; use File::Spec; use Mail::Box::Mbox; use Mail::Message::Construct; my $top = File::Spec->catdir($folderdir, 'Mail'); clean_dir $top; # # Create a nice structure which looks like a set of mbox folders. # sub dir($;$) { my $dirname = shift; $dirname = File::Spec->catdir($dirname, shift) if @_; die "Cannot create $dirname: $!\n" unless -d $dirname || mkdir $dirname, 0700; $dirname; } sub folder($$;$) { my $filename = File::Spec->catfile(shift, shift); my $content = shift || $src; # by default copies whole default mbox copy $content, $filename or die "Cannot copy $content to $filename: $!\n"; } clean_dir $top; # restart dir $top; folder $top, "f1", $0; folder $top, "f2"; { # Create an empty file. my $f = IO::File->new(File::Spec->catfile($top,'f3'), 'w') or die "Empty? $top/f3: $!"; $f->close; } my $dir = dir $top, "sub1"; folder $dir, "s1f1"; folder $dir, "s1f2"; folder $dir, "s1f3"; dir $top, "sub2"; # empty dir folder $top, "f4"; $dir = dir $top, "f4.d"; # fake subfolder folder $dir, "f4f1"; folder $dir, "f4f2"; folder $dir, "f4f3"; my $success = compare_lists [ sort Mail::Box::Mbox->listSubFolders(folderdir => $top) ] , [ qw/f1 f2 f3 f4 sub1 sub2/ ]; ok($success, 'Initial tree creation'); unless($success) { require File::Find; File::Find::find( { wanted => sub {print STDERR "$_\n" } , no_chdir => 1 }, $top); exit 1; } ok(compare_lists [ sort Mail::Box::Mbox->listSubFolders(folderdir => $top) ] , [ qw/f1 f2 f3 f4 sub1 sub2/ ] ); ok(compare_lists [ sort Mail::Box::Mbox->listSubFolders ( folderdir => $top , skip_empty => 1 ) ] , [ qw/f1 f2 f4 sub1/ ] ); ok(compare_lists [ sort Mail::Box::Mbox->listSubFolders ( folderdir => $top , check => 1 ) ] , [ qw/f2 f3 f4 sub1 sub2/ ] ); ok(compare_lists [ sort Mail::Box::Mbox->listSubFolders ( folderdir => File::Spec->catfile($top, "f4.d") ) ] , [ qw/f4f1 f4f2 f4f3/ ] ); ok(compare_lists [ sort Mail::Box::Mbox->listSubFolders ( folderdir => $top , folder => "=f4.d" ) ] , [ qw/f4f1 f4f2 f4f3/ ] ); ok(compare_lists [ sort Mail::Box::Mbox->listSubFolders ( folder => File::Spec->catfile($top, "f4")) ] , [ qw/f4f1 f4f2 f4f3/ ] ); # # Open a folder in a sub-dir which uses the extention. # my $folder = Mail::Box::Mbox->new ( folderdir => $top , folder => '=f4/f4f2' , lock_type => 'NONE' ); ok(defined $folder, 'open =f4/f4f2'); die unless defined $folder; cmp_ok($folder->messages, "==", 45, 'found all messages'); $folder->close; # # Open a new folder. # ok(! -f File::Spec->catfile($top, 'f4', 'newfolder')); Mail::Box::Mbox->create('=f4/newfolder', folderdir => $top); ok(-f File::Spec->catfile($top, "f4.d", "newfolder")); $folder = Mail::Box::Mbox->new ( folderdir => $top , folder => '=f4/newfolder' , access => 'rw' , lock_type => 'NONE' ); ok($folder); cmp_ok($folder->messages, "==", 0); my $msg = Mail::Message->build ( From => 'me@example.com' , To => 'you@anywhere.aq' , Subject => 'Just a try' , data => [ "a short message\n", "of two lines.\n" ] ); $folder->addMessage($msg); cmp_ok($folder->messages, "==", 1); $folder->close; ok(-s File::Spec->catfile($top, 'f4.d', 'newfolder')); # # Delete a folder. # $folder = Mail::Box::Mbox->new ( folderdir => $top , folder => '=f4' , access => 'rw' , lock_type => 'NONE' ); ok(defined $folder. 'open folder =f4'); die unless defined $folder; ok(-f File::Spec->catfile($top, "f4"), 'folder-file found'); $folder->delete(recurse=>1); # remove folder contents $folder->close if defined $folder; ok(! -f File::Spec->catfile($top, "f4"), 'empty folder clean-up'); ok(! -d File::Spec->catfile($top, "f4.d"), 'subfolder dir clean-up'); # # Write a folder, but at the same place is a subdir. The subdir should # be moved to a name ending on `.d' # my $sub1 = File::Spec->catfile($top, "sub1"); ok(-d $sub1, 'dir to be promoted'); ok(Mail::Box::Mbox->create('=sub1', folderdir => $top), 'promote dir to subfolder'); ok(-d File::Spec->catfile($top, "sub1.d"), 'check promotion'); ok(-f $sub1, 'new folder exists'); ok(-z $sub1, 'new folder is empty'); $folder = Mail::Box::Mbox->new ( folderdir => $top , folder => '=sub1' , access => 'rw' , lock_type => 'NONE' ); ok(defined $folder, 'open empty subfolder'); cmp_ok($folder->messages, "==", 0, 'subfolder is empty'); my $msg2 = Mail::Message->build ( From => 'me@example.com' , To => 'you@anywhere.aq' , Subject => 'Just a try' , data => [ "a short message\n", "of two lines.\n" ] ); $folder->addMessage($msg2); cmp_ok($folder->messages, "==", 1, 'one message into empty folder'); $folder->close; ok(-s $sub1, 'subfolder must exist now'); Mail-Box-2.118/tests/41mh/0000755000175000001440000000000012473604501015570 5ustar00markovusers00000000000000Mail-Box-2.118/tests/41mh/Definition.pm0000644000175000001440000000054612473604425020230 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::41mh::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Box::MH; mh folders"} sub critical {0} sub skip { undef } 1; Mail-Box-2.118/tests/41mh/30append.t0000644000175000001440000000340412473603434017374 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test appending messages on MH folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 10; use File::Compare; use File::Copy; use Mail::Box::Manager; use Mail::Message::Construct; my $mhsrc = File::Spec->catfile('folders', 'mh.src'); clean_dir $mhsrc; unpack_mbox2mh($src, $mhsrc); my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open ( folder => $mhsrc , lock_type => 'NONE' , extract => 'LAZY' , access => 'rw' , save_on_exit => 0 ); die "Couldn't read $mhsrc: $!\n" unless $folder; # We checked this in other scripts before, but just want to be # sure we have enough messages again. cmp_ok($folder->messages, "==", 45); # Add a message which is already in the opened folder. However, the # message heads are not yet parsed, hence the message can not be # ignored. my $message3 = $folder->message(3); ok($message3->isDelayed); my $added = $message3->clone; ok(!$message3->isDelayed); $folder->addMessage($added); cmp_ok($folder->messages, "==", 45); ok(not $message3->deleted); ok($added->deleted); # # Create an Mail::Message and add this to the open folder. # my $msg = Mail::Message->build ( From => 'me@example.com' , To => 'you@anywhere.aq' , Subject => 'Just a try' , data => [ "a short message\n", "of two lines.\n" ] ); $mgr->appendMessage($mhsrc, $msg); cmp_ok($folder->messages, "==", 46); cmp_ok($mgr->openFolders, "==", 1); $mgr->close($folder); # changes are not saved. cmp_ok($mgr->openFolders, "==", 0); $mgr->appendMessage($mhsrc, $msg , lock_type => 'NONE' , extract => 'LAZY' , access => 'rw' , keep_index => 1 ); ok(-f File::Spec->catfile($mhsrc, "47")); # skipped 13, so new is 46+1 clean_dir $mhsrc; Mail-Box-2.118/tests/41mh/60thread.t0000644000175000001440000001047512473603434017405 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test threading of MH folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 5; use File::Spec; use List::Util 'sum'; use Mail::Box::Manager; my $mhsrc = File::Spec->catfile('folders', 'mh.src'); clean_dir $mhsrc; unpack_mbox2mh($src, $mhsrc); my $mgr = new Mail::Box::Manager; my $folder = $mgr->open ( folder => $mhsrc , lock_type => 'NONE' , extract => 'LAZY' , access => 'rw' ); my $threads = $mgr->threads(folder => $folder); cmp_ok($threads->known , "==", 0); my @all = $threads->sortedAll; cmp_ok(scalar(@all) , "==", 28); my $msgs = sum map {$_->numberOfMessages} @all; cmp_ok($msgs, "==", scalar($folder->messages)); my $out = join '', map {$_->threadToString} @all; my @lines = split /^/, $out; cmp_ok(@lines, '==', $folder->messages); $out = join '', sort @lines; my $dump = $Mail::Message::crlf_platform ? <<'__DUMP_CRLF' : <<'__DUMP_LF'; 1.4K Resize with Transparency 1.3K *- Re: File Conversion From HTML to PS and TIFF 2.1K `--*- Re: File Conversion From HTML to PS and TIFF 2.1K `- Re: File Conversion From HTML to PS and TIFF 1.5K Transparency question 2.5K RE: Transparency question 3.4K RE: Transparency question 5.7K RE: Transparency question 7.4K RE: Transparency question 2.8K RE: jpeg2000 question 1.3K *- Problem resizing images through perl script 843 | `- Re: Problem resizing images through perl script 1.9K | `- RE: Problem resizing images through perl script 1.0K | `- Re: Problem resizing images through perl script 1.2K `- Re: Convert HTM, HTML files to the .jpg format 766 Undefined Symbol: SetWarningHandler 1.1K `- Re: Undefined Symbol: SetWarningHandler 1.9K *- Re: watermarks/embossing 316 Re: Annotate problems (PR#298) 585 `- Re: Annotate problems (PR#298) 1.0K 1.4K `- Re: your mail 2.0K `- Re: your mail 156 Re: your mail 703 `- Re: your mail 194 Re: your mail 2.0K 684 Re: your mail 4.5K `- Re: your mail 569 mailing list archives 1.4K delegates.mgk set-up for unixware printing 1.5K printing solution for UW 7.1 1.5K *- Re: converts new sharpen factors 1.2K New ImageMagick mailing list 28 subscribe 847 Confirmation for subscribe magick-developer 64 `- Re: Confirmation for subscribe magick-developer 11K Welcome to magick-developer 1.7K core dump in simple ImageMagick example 2.2K `- Re: core dump in simple ImageMagick example 908 `- Re: core dump in simple ImageMagick example 770 `- Re: core dump in simple ImageMagick example 2.0K Core Dump on ReadImage 1.0K `- Re: Core Dump on ReadImage 1.6K Font metrics __DUMP_CRLF 1.3K Resize with Transparency 1.2K *- Re: File Conversion From HTML to PS and TIFF 2.1K `--*- Re: File Conversion From HTML to PS and TIFF 2.1K `- Re: File Conversion From HTML to PS and TIFF 1.4K Transparency question 2.4K RE: Transparency question 3.3K RE: Transparency question 5.5K RE: Transparency question 7.2K RE: Transparency question 2.7K RE: jpeg2000 question 1.2K *- Problem resizing images through perl script 820 | `- Re: Problem resizing images through perl script 1.8K | `- RE: Problem resizing images through perl script 1.0K | `- Re: Problem resizing images through perl script 1.2K `- Re: Convert HTM, HTML files to the .jpg format 747 Undefined Symbol: SetWarningHandler 1.1K `- Re: Undefined Symbol: SetWarningHandler 1.8K *- Re: watermarks/embossing 307 Re: Annotate problems (PR#298) 573 `- Re: Annotate problems (PR#298) 1.0K 1.4K `- Re: your mail 1.9K `- Re: your mail 152 Re: your mail 686 `- Re: your mail 189 Re: your mail 2.0K 670 Re: your mail 4.4K `- Re: your mail 552 mailing list archives 1.4K delegates.mgk set-up for unixware printing 1.5K printing solution for UW 7.1 1.4K *- Re: converts new sharpen factors 1.2K New ImageMagick mailing list 27 subscribe 822 Confirmation for subscribe magick-developer 63 `- Re: Confirmation for subscribe magick-developer 11K Welcome to magick-developer 1.7K core dump in simple ImageMagick example 2.2K `- Re: core dump in simple ImageMagick example 882 `- Re: core dump in simple ImageMagick example 754 `- Re: core dump in simple ImageMagick example 2.0K Core Dump on ReadImage 1.0K `- Re: Core Dump on ReadImage 1.6K Font metrics __DUMP_LF $dump = join '', sort split /^/, $dump; compare_thread_dumps($out, $dump, 'sort thread full dump'); clean_dir $mhsrc; Mail-Box-2.118/tests/41mh/20write.t0000644000175000001440000000274112473603434017261 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test writing of MH folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 54; use File::Compare; use File::Copy; use Mail::Box::MH; use Mail::Box::Mbox; my $mhsrc = File::Spec->catfile('folders', 'mh.src'); clean_dir $mhsrc; unpack_mbox2mh($src, $mhsrc); my $folder = new Mail::Box::MH ( folder => $mhsrc , lock_type => 'NONE' , extract => 'LAZY' , access => 'rw' , keep_index => 1 ); ok(defined $folder); cmp_ok($folder->messages, "==", 45); my $msg3 = $folder->message(3); # Nothing yet... $folder->modified(1); $folder->write(renumber => 0); ok(compare_lists [sort {$a cmp $b} listdir $mhsrc], [sort {$a cmp $b} '.index', '.mh_sequences', 1..12, 14..46] ); $folder->modified(1); $folder->write(renumber => 1); ok(compare_lists [sort {$a cmp $b} listdir $mhsrc], [sort {$a cmp $b} '.index', '.mh_sequences', 1..45] ); $folder->message(2)->delete; ok($folder->message(2)->isDelayed); ok(defined $folder->message(3)->get('subject')); # load, creates index $folder->write; ok(compare_lists [sort {$a cmp $b} listdir $mhsrc], [sort {$a cmp $b} '.index', '.mh_sequences', 1..44] ); cmp_ok($folder->messages, "==", 44); $folder->message(8)->delete; ok($folder->message(8)->deleted); cmp_ok($folder->messages, "==", 44); $folder->write; cmp_ok($folder->messages, "==", 43); foreach ($folder->messages) { ok(! $_->deleted) } $folder->close; clean_dir $mhsrc; Mail-Box-2.118/tests/41mh/10read.t0000644000175000001440000000765612473603434017053 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test reading of MH folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 27; use File::Compare; use File::Copy; use Mail::Box::MH; use Mail::Box::Mbox; my $mhsrc = File::Spec->catfile('folders', 'mh.src'); unpack_mbox2mh($src, $mhsrc); ok(Mail::Box::MH->foundIn($mhsrc)); my $folder = new Mail::Box::MH ( folder => $mhsrc , lock_type => 'NONE' , extract => 'LAZY' , access => 'rw' ); ok(defined $folder); # We skipped message number 13 in the production, but that shouldn't # distrub things. cmp_ok($folder->messages, "==", 45); is($folder->organization, 'DIRECTORY'); # # No single head should be read now, because extract == LAZY # the default. # my $heads = 0; foreach ($folder->messages) { $heads++ unless $_->head->isDelayed; } cmp_ok($heads, "==", 0); # # Loading a header should not be done unless really necessary. # my $message = $folder->message(7); ok($message->head->isDelayed); ok($message->filename); # already known, but should not trigger header ok($message->head->isDelayed); # # Nothing should be parsed yet # my $parsed = 0; foreach ($folder->messages) { $parsed++ if $_->isParsed; } cmp_ok($parsed, "==", 0); # # Trigger one message to get read. # ok($message->body->string); # trigger body loading. ok($message->isParsed); # # Test taking header # $message = $folder->message(8); ok(defined $message->head->get('subject')); ok(not $message->isParsed); is(ref $message->head, 'Mail::Message::Head::Complete'); # This shouldn't cause any parsings: we do lazy extract, but Mail::Box # will always take the `Subject' header for us. my @subjects = map { chomp; $_ } map {$_->head->get('subject') || '' } $folder->messages; $parsed = 0; $heads = 0; foreach ($folder->messages) { $parsed++ unless $_->isDelayed; $heads++ unless $_->head->isDelayed; } cmp_ok($parsed, "==", 1); # message 7 cmp_ok($heads, "==", 45); # # The subjects must be the same as from the original Mail::Box::Mbox # There are some differences with new-lines at the end of headerlines # my $mbox = Mail::Box::Mbox->new ( folder => $src , folderdir => 't' , lock_type => 'NONE' , access => 'r' ); my @fsubjects = map { chomp; $_ } map {$_->head->get('subject') || ''} $mbox->messages; my (%subjects); $subjects{$_}++ foreach @subjects; $subjects{$_}-- foreach @fsubjects; my $missed = 0; foreach (keys %subjects) { $missed++ if $subjects{$_}; warn "Still left: $_ ($subjects{$_}x)\n" if $subjects{$_}; } ok(!$missed); # # Check if we can read a body. # my $msg3 = $folder->message(3); my $body = $msg3->body; ok(defined $body); cmp_ok(@$body, "==", 42); # check expected number of lines in message 4. $folder->close; # # Now with partially lazy extract. # my $parse_size = 5000; $folder = new Mail::Box::MH ( folder => $mhsrc , folderdir => 't' , lock_type => 'NONE' , extract => $parse_size # messages > $parse_size bytes stay unloaded. , access => 'rw' ); ok(defined $folder); cmp_ok($folder->messages, "==", 45); $parsed = 0; $heads = 0; my $mistake = 0; foreach ($folder->messages) { $parsed++ unless $_->isDelayed; $heads++ unless $_->head->isDelayed; $mistake++ if !$_->isDelayed && $_->size > $parse_size; } ok(not $mistake); ok(not $parsed); ok(not $heads); foreach (5..13) { $folder->message($_)->head->get('subject'); } $parsed = 0; $heads = 0; $mistake = 0; foreach ($folder->messages) { $parsed++ unless $_->isDelayed; $heads++ unless $_->head->isDelayed; $mistake++ if !$_->isDelayed && $_->body->size > $parse_size; } ok(not $mistake); cmp_ok($parsed , "==", 7); cmp_ok($heads , "==", 9); # No clean-dir: see how it behaves when the folder is not explictly # closed before the program terminates. Terrible things can happen # during auto-cleanup #clean_dir $mhsrc; Mail-Box-2.118/tests/41mh/70seqs.t0000644000175000001440000000306612473603434017110 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test mh-sequences # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 11; use File::Spec; use Mail::Box::Manager; my $mhsrc = File::Spec->catfile('folders', 'mh.src'); my $seq = File::Spec->catfile($mhsrc, '.mh_sequences'); clean_dir $mhsrc; unpack_mbox2mh($src, $mhsrc); # Create a sequences file. open SEQ, ">$seq" or die "Cannot write to $seq: $!\n"; # Be warned that message number 13 has been skipped from the MH-box. print SEQ <<'MH_SEQUENCES'; unseen: 12-15 3 34 36 16 cur: 5 MH_SEQUENCES close SEQ; my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open ( folder => $mhsrc , folderdir => 't' , lock_type => 'NONE' , extract => 'LAZY' , access => 'rw' , save_on_exit => 0 ); die "Couldn't read $mhsrc: $!\n" unless $folder; isa_ok($folder, 'Mail::Box::MH'); ok($folder->message(1)->label('seen')); ok(not $folder->message(2)->label('seen')); ok($folder->message(3)->label('seen')); ok($folder->message(4)->label('current')); is($folder->current->messageID, $folder->message(4)->messageID); ok(not $folder->message(1)->label('current')); $folder->current($folder->message(1)); ok(not $folder->message(0)->label('current')); ok($folder->message(1)->label('current')); $folder->modified(1); $folder->close(write => 'ALWAYS'); open SEQ, $seq or die "Cannot read from $seq: $!\n"; my @seq = ; close SEQ; my ($cur) = grep /^cur\: /, @seq; is($cur, "cur: 2\n"); my ($unseen) = grep /^unseen\: /, @seq; is($unseen, "unseen: 3 12-15 33 35\n"); clean_dir $mhsrc; Mail-Box-2.118/tests/41mh/50create.t0000644000175000001440000000736312473603434017402 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test creation/deletion and listing of folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 20; use File::Copy; use File::Spec; use Mail::Box::Mbox; use Mail::Box::MH; use Mail::Message::Construct; my $top = File::Spec->catfile('folders', 'Mail'); clean_dir $top; my $mbox = Mail::Box::Mbox->new ( folder => $src , lock_type => 'NONE' ); # # Create a nice structure which looks like a set of MH folders. # sub folder($;$@) { my $dirname = shift; $dirname = File::Spec->catfile($dirname, shift) if @_; die "Cannot create directory $dirname: $!\n" unless -d $dirname || mkdir $dirname, 0700; foreach (@_) { my $f = File::Spec->catfile($dirname, $_); open CREATE, ">$f" or die "Cannot create $f: $!\n"; $mbox->message($_)->print(\*CREATE) if m/^\d+$/; close CREATE; } $dirname; } folder $top; folder $top, 'f1', qw/a b c/; folder $top, 'f2', 1, 2, 3; # only real folder folder $top, 'f3'; # empty folder my $sub1 = folder $top, 'sub1'; folder $sub1, 's1f1'; folder $sub1, 's1f2'; folder $sub1, 's1f3'; folder $top, 'sub2'; # empty dir my $f4 = folder $top, 'f4', 1, 2, 3; folder $f4, 'f4f1'; unpack_mbox2mh $src, File::Spec->catfile($f4, 'f4f2'); folder $f4, 'f4f3'; ok(compare_lists [ sort Mail::Box::MH->listSubFolders(folderdir => $top) ] , [ qw/f1 f2 f3 f4 sub1 sub2/ ] ); ok(compare_lists [ sort Mail::Box::MH->listSubFolders(folderdir => $top) ] , [ qw/f1 f2 f3 f4 sub1 sub2/ ] ); ok(compare_lists [ sort Mail::Box::MH->listSubFolders ( folderdir => $top , skip_empty => 1 ) ] , [ qw/f2 f4 sub1/ ] ); ok(compare_lists [ sort Mail::Box::MH->listSubFolders ( folderdir => $top , check => 1 ) ] , [ qw/f2 f4/ ] ); ok(compare_lists [ sort Mail::Box::MH->listSubFolders ( folderdir => $top , folder => "=f4" ) ] , [ qw/f4f1 f4f2 f4f3/ ] ); ok(compare_lists [ sort Mail::Box::MH->listSubFolders(folderdir => "$top/f4") ] , [ qw/f4f1 f4f2 f4f3/ ] ); # # Open a folder in a sub-dir which uses the extention. # my $folder = Mail::Box::MH->new ( folderdir => $top , folder => '=f4/f4f2' , lock_type => 'NONE' ); ok($folder); cmp_ok($folder->messages, "==", 45); $folder->close; # # Open a new folder. # my $newfolder = File::Spec->catfile($f4, 'newfolder'); ok(! -d $newfolder); Mail::Box::MH->create('=f4/newfolder', folderdir => $top); ok(-d $newfolder); $folder = Mail::Box::MH->new ( folderdir => $top , folder => '=f4/newfolder' , access => 'rw' , keep_index => 1 , lock_type => 'NONE' ); ok($folder); cmp_ok($folder->messages, "==", 0); my $msg = Mail::Message->build ( From => 'me@example.com' , To => 'you@anywhere.aq' , Subject => 'Just a try' , data => [ "a short message\n", "of two lines.\n" ] ); $folder->addMessage($msg); cmp_ok($folder->messages, "==", 1); $folder->close; ok(-f File::Spec->catfile($newfolder, '1')); opendir DIR, $newfolder or die "Cannot read directory $newfolder: $!\n"; my @all = grep !/^\./, readdir DIR; closedir DIR; cmp_ok(@all, "==", 1); my $seq = File::Spec->catfile($newfolder, '.mh_sequences'); open SEQ, $seq or die "Cannot read $seq: $!\n"; my @seq = ; close SEQ; cmp_ok(@seq, "==", 1); is($seq[0],"unseen: 1\n"); # # Delete a folder. # $folder = Mail::Box::MH->new ( folderdir => $top , folder => '=f4' , access => 'rw' , lock_type => 'NONE' , keep_index => 1 ); ok(-d $f4); $folder->delete; ok(1); $folder->close; ok(1); clean_dir $top; Mail-Box-2.118/tests/54search/0000755000175000001440000000000012473604501016435 5ustar00markovusers00000000000000Mail-Box-2.118/tests/54search/Definition.pm0000644000175000001440000000064112473604425021071 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::54search::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Box::Search; searching folders"} sub critical {0} sub skip {undef} # run tests even without Mail::SpamAssassin 1; Mail-Box-2.118/tests/54search/10grep.t0000644000175000001440000002061712473603434017732 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test searching with grep # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 58; use IO::Scalar; use File::Copy; use Mail::Box::Manager; use Mail::Box::Search::Grep; copy $src, $cpy or die "Cannot create test folder $cpy: $!\n"; my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open($cpy, lock_type => 'NONE'); ok(defined $folder, 'open folder'); cmp_ok($folder->messages , "==", 45, 'folder full of messages'); # # Simple search in body # my $output= ''; my $fh = IO::Scalar->new(\$output) or die "Cannot create an IO::Scalar: $!"; my $oldfh = select $fh; my $grep1 = Mail::Box::Search::Grep->new ( match => 'However' , in => 'BODY' , deliver => 'PRINT' ); $grep1->search($folder); $fh->close; select $oldfh; $output =~ s#\\#/#g; # windows is($output, <<'EXPECTED', 'search for However'); folders/mbox.cpy, message 8: Resize with Transparency 21: However, ImageMagick (ImageMagick 4.2.7, PerlMagick 4.27 on Linux) folders/mbox.cpy, message 38: Re: core dump in simple ImageMagick example 38: However, it is only reproduceable when this statement is included in folders/mbox.cpy, message 41: Re: core dump in simple ImageMagick example 4: > However, it is only reproduceable when this statement is included in EXPECTED undef $grep1; # # search in head with limit # $output = ''; $fh = IO::Scalar->new(\$output) or die $!; select $fh; my $grep2 = Mail::Box::Search::Grep->new ( match => 'atcmpg' , in => 'HEAD' , limit => -4 , deliver => 'PRINT' ); my @m2 = $grep2->search($folder); $fh->close; select $oldfh; cmp_ok(@m2, "==", 4); my $last = shift @m2; foreach (@m2) { ok($last->seqnr < $_->seqnr, 'messages ordered'); $last = $_; } # messages are reversed ordered here, but in order returned: looking # backwards in the folder file. $output =~ s#\\#/#g; # windows is($output, <<'EXPECTED', 'search result atcmp in head'); folders/mbox.cpy, message 44: Font metrics Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id TAA26427 for ; Wed, 4 Oct 2000 19:56:00 +0200 (MET DST) folders/mbox.cpy, message 43: Core Dump on ReadImage Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id WAA14913 for ; Tue, 1 Aug 2000 22:37:13 +0200 (MET DST) folders/mbox.cpy, message 42: Re: Core Dump on ReadImage Message-ID: <20000807113844.A22119@atcmpg.ATComputing.nl> folders/mbox.cpy, message 41: Re: core dump in simple ImageMagick example Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id NAA29434 for ; Wed, 26 Jul 2000 13:46:33 +0200 (MET DST) References: <397C6C6B.989E4BB2@catchword.com> <20000726133231.G25170@atcmpg.ATComputing.nl> EXPECTED undef $grep2; # # Test regexp search # my @hits; my $grep3 = Mail::Box::Search::Grep->new ( match => qr/ImageMagick/ , in => 'MESSAGE' , deliver => \@hits ); my @m3 = $grep3->search($folder); #warn $_.": ".$_->subject, "\n" for @m3; cmp_ok(@m3, "==", 24, 'messages with ImageMagick'); cmp_ok(@hits, "==", 60, 'hits on ImageMagick'); $last = shift @m3; my %m3 = ($last->seqnr => 1); foreach (@m3) # in order? { ok($last->seqnr < $_->seqnr, 'messages ordered'); $m3{$_->seqnr}++; $last = $_; } cmp_ok(keys %m3, "==", 24, 'returned message unique'); my %h3 = map { ($_->{message}->seqnr => 1) } @hits; cmp_ok(keys %h3, "==", 24, 'returned hits in the messages'); undef $grep3; # # Test regexp search with case-ignore # @hits = (); my $grep4 = Mail::Box::Search::Grep->new ( match => qr/ImageMagick/i , in => 'MESSAGE' , deliver => \@hits ); my @m4 = $grep4->search($folder); cmp_ok(@m4, "==", 28, 'messages with /ImageMagick/i'); cmp_ok(@hits, "==", 102, 'hits with /ImageMagick/i'); undef $grep4; # # Test regexp search with case-ignore and some deleted messages # @hits = (); $folder->message($_)->delete(1) for 3, 6, 8, 9, 11, 13, 23, 33; my $grep5 = Mail::Box::Search::Grep->new ( match => qr/ImageMagick/i , in => 'MESSAGE' , deliver => \@hits ); my @m5 = $grep5->search($folder); cmp_ok(@m5, "==", 22, 'msgs, search excludes deleted'); cmp_ok(@hits, "==", 89, 'hits, search excludes deleted'); undef $grep5; # Include-deleted @hits = (); my $grep6 = Mail::Box::Search::Grep->new ( match => qr/ImageMagick/i , in => 'MESSAGE' , deleted => 1 , deliver => \@hits ); my @m6 = $grep6->search($folder); cmp_ok(@m6, "==", 28, 'msgs, search includes deleted'); cmp_ok(@hits, "==", 102, 'hits, search includes deleted'); undef $grep6; # only in header @hits = (); my $grep7 = Mail::Box::Search::Grep->new ( match => qr/ImageMagick/i , in => 'HEAD' , deliver => \@hits ); my @m7 = $grep7->search($folder); cmp_ok(@m7, "==", 11, 'msgs, /ImageMagick/i in head'); cmp_ok(@hits, "==", 27, 'hits, /ImageMagick/i in head'); undef $grep7; # only in body @hits = (); my $grep8 = Mail::Box::Search::Grep->new ( match => qr/ImageMagick/i , in => 'BODY' , deliver => \@hits ); my @m8 = $grep8->search($folder); cmp_ok(@m8, "==", 20, 'msgs, /ImageMagick/i in body'); cmp_ok(@hits, "==", 62, 'hits, /ImageMagick/i in body'); cmp_ok($grep8->search($folder), "==", 20, 'search returns msgs in scalar'); undef $grep8; # only test for match: stops at first hit my $grep9 = Mail::Box::Search::Grep->new ( match => qr/ImageMagick/i , in => 'BODY' ); cmp_ok($grep9->search($folder), "==", 1, 'no deliver, then only find one'); undef $grep9; # # Search in thread # undef $output; $fh = IO::Scalar->new(\$output) or die $!; select $fh; my $grep10 = Mail::Box::Search::Grep->new ( match => 'ImageMagick' , in => 'BODY' , deliver => 'PRINT' ); my $t = $mgr->threads($folder); my $start = $t->threadStart($folder->message(25)); #isa multipart my @msgs = $start->threadMessages; cmp_ok(@msgs, "==", 2, 'messages in thread'); ok($grep10->search($start), 'found in thread'); $output =~ s#\\#/#g; # windows is($output, <<'EXPECTED', 'result search in thread'); folders/mbox.cpy, message 26: Re: your mail 13: Are you using ImageMagick 5.2.0? When I used the script I sent the folders/mbox.cpy, message 25: Re: your mail p 19: > Are you using ImageMagick 5.2.0? When I used the script I sent the EXPECTED my @m10 = $grep10->search(\@msgs); cmp_ok(@m10, "==", 2, 'messages found in list'); cmp_ok($m10[0], "==", $msgs[0]); cmp_ok($m10[1], "==", $msgs[1]); $fh->close; select $oldfh; undef $grep10; # Without multipart undef $output; $fh = IO::Scalar->new(\$output) or die $!; select $fh; my $grep11 = Mail::Box::Search::Grep->new ( match => 'ImageMagick' , in => 'BODY' , deliver => 'PRINT' , multiparts => 0 ); my @m11 = $grep11->search($start); cmp_ok(@m11, "==", 1, 'do not search multiparts'); $fh->close; select $oldfh; $output =~ s#\\#/#g; # windows is($output, <<'EXPECTED', 'not in multipart'); folders/mbox.cpy, message 26: Re: your mail 13: Are you using ImageMagick 5.2.0? When I used the script I sent the EXPECTED undef $grep11; # # Check search in encoded part # my $msg = $folder->messageId('8172.960997992@mystic'); ok($msg); undef $output; $fh = IO::Scalar->new(\$output) or die $!; select $fh; my $grep12 = Mail::Box::Search::Grep->new ( match => 'pointsize' , in => 'MESSAGE' , binaries => 1 , deliver => 'PRINT' ); my @m12 = $grep12->search($msg); cmp_ok(@m12, "==", 1, 'search binaries'); $fh->close; select $oldfh; $output =~ s#\\#/#g; # windows is($output, <<'EXPECTED', 'found in encoded text'); folders/mbox.cpy, message 20: p 12: , pointsize => $poinsize EXPECTED $folder->close(write => 'NEVER'); undef $grep12; Mail-Box-2.118/tests/02dist/0000755000175000001440000000000012473604501016124 5ustar00markovusers00000000000000Mail-Box-2.118/tests/02dist/Definition.pm0000644000175000001440000000057612473604425020567 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::02dist::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"check distribution"} sub critical {0} # currently only man-pages sub skip { undef } 1; Mail-Box-2.118/tests/02dist/10pod.t0000644000175000001440000000063012473603434017237 0ustar00markovusers00000000000000#!/usr/bin/env perl use warnings; use strict; use Test::More; use File::Spec::Functions qw/updir catdir/; BEGIN { eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; plan skip_all => "devel home uses OODoc" if qx(/bin/pwd) =~ m[^/home/markov/]; } my @dirs = map catdir(updir, $_), qw(lib script); all_pod_files_ok all_pod_files @dirs; Mail-Box-2.118/tests/20pparser/0000755000175000001440000000000012473604501016635 5ustar00markovusers00000000000000Mail-Box-2.118/tests/20pparser/50nested.t0000644000175000001440000000450012473603434020454 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test processing a message/rfc822 # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 2; use IO::Scalar; use Mail::Message; # # Reading a very complicate message from scalar # my $msg = Mail::Message->read(<<'END-OF-MESSAGE', strip_status_fields => 0); From: "you" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="3/Cnt5Mj2+" Content-Transfer-Encoding: 7bit Message-ID: <15375.28519.265629.832146@tradef1-fe> Date: Thu, 6 Dec 2001 14:15:19 +0100 (MET) To: me@example.com Subject: forwarded message from Pietje Puk Status: RO --3/Cnt5Mj2+ Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit This is some text before a forwarded multipart!! --3/Cnt5Mj2+ Content-Type: message/rfc822 Content-Description: forwarded message Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0017_01C17E5E.A5657580" Message-ID: <001a01c17e56$5fc02640$5f23643e@ibm5522ccd> From: "Someone" To: "Me" Subject: A multipart alternative This is a multi-part message in MIME format. ------=_NextPart_000_0017_01C17E5E.A5657580 CONTENT-TRANSFER-ENCODING: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Send me a postcard if you read this. Oh, another line. ------=_NextPart_000_0017_01C17E5E.A5657580 CONTENT-TRANSFER-ENCODING: quoted-printable Content-Type: text/html; charset="iso-8859-1" Send me a postcard if you read this.
    Oh, another line.
    ------=_NextPart_000_0017_01C17E5E.A5657580-- --3/Cnt5Mj2+-- END-OF-MESSAGE ok(defined $msg); my $dump; my $catch = IO::Scalar->new(\$dump); $msg->printStructure($catch); # if 1550 bytes is reported for the whole message, then the Status # field hasn't been removed after reading. is($dump, <<'DUMP'); multipart/mixed: forwarded message from Pietje Puk (1551 bytes) text/plain (164 bytes) message/rfc822 (1044 bytes) multipart/alternative: A multipart alternative (943 bytes) text/plain (148 bytes) text/html (358 bytes) DUMP Mail-Box-2.118/tests/20pparser/Definition.pm0000644000175000001440000000057612473604425021300 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::20pparser::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Box::Parser::Perl; parser in pure perl"} sub critical {1} sub skip { undef } 1; Mail-Box-2.118/tests/20pparser/40readmp.t0000644000175000001440000000556212473603434020452 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the reading from file of message bodies which are multiparts # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 66; use IO::File; use Mail::Message; # # From scalar # my $msg1 = Mail::Message->read("Subject: hello world\n\nbody1\nbody2\n"); ok(defined $msg1); is(ref $msg1, 'Mail::Message'); ok(defined $msg1->head); isa_ok($msg1->head, 'Mail::Message::Head'); my $body1 = $msg1->body; ok(defined $body1); isa_ok($body1, 'Mail::Message::Body'); ok(!$body1->isDelayed); cmp_ok(@$body1, "==", 2); is($body1->[0], "body1\n"); is($body1->[1], "body2\n"); is($msg1->subject, 'hello world'); ok($msg1->messageId); ok($msg1->get('message-id')); # # From ref scalar # my $scalar = "Subject: hello world\n\nbody1\nbody2\n"; my $msg2 = Mail::Message->read(\$scalar); ok(defined $msg2); is(ref $msg2, 'Mail::Message'); ok(defined $msg2->head); isa_ok($msg2->head, 'Mail::Message::Head'); my $body2 = $msg2->body; ok(defined $body2); isa_ok($body2, 'Mail::Message::Body'); ok(!$body2->isDelayed); cmp_ok(@$body2, "==", 2); is($body2->[0], "body1\n"); is($body2->[1], "body2\n"); is($msg2->subject, 'hello world'); ok($msg2->messageId); ok($msg2->get('message-id')); # # From array # my $array = [ "Subject: hello world\n", "\n", "body1\n", "body2\n" ]; my $msg3 = Mail::Message->read($array); ok(defined $msg3); is(ref $msg3, 'Mail::Message'); ok(defined $msg3->head); isa_ok($msg3->head, 'Mail::Message::Head'); my $body3 = $msg3->body; ok(defined $body3); isa_ok($body3, 'Mail::Message::Body'); ok(!$body3->isDelayed); cmp_ok(@$body3, "==", 2); is($body3->[0], "body1\n"); is($body3->[1], "body2\n"); is($msg3->subject, 'hello world'); ok($msg3->messageId); ok($msg3->get('message-id')); # # From file glob # open OUT, '>', 'tmp' or die $!; print OUT $scalar; close OUT; open IN, '<', 'tmp' or die $!; my $msg4 = Mail::Message->read(\*IN); close IN; ok(defined $msg4); is(ref $msg4, 'Mail::Message'); ok(defined $msg4->head); isa_ok($msg4->head, 'Mail::Message::Head'); my $body4 = $msg4->body; ok(defined $body4); isa_ok($body4, 'Mail::Message::Body'); ok(!$body4->isDelayed); cmp_ok(@$body4, "==", 2); is($body4->[0], "body1\n"); is($body4->[1], "body2\n"); is($msg4->subject, 'hello world'); ok($msg4->messageId); ok($msg4->get('message-id')); # # From file handle # open OUT, '>', 'tmp' or die $!; print OUT $scalar; close OUT; my $in = IO::File->new('tmp', 'r'); ok(defined $in); my $msg5 = Mail::Message->read($in); $in->close; ok(defined $msg5); is(ref $msg5, 'Mail::Message'); ok(defined $msg5->head); isa_ok($msg5->head, 'Mail::Message::Head'); my $body5 = $msg5->body; ok(defined $body5); isa_ok($body5, 'Mail::Message::Body'); ok(!$body5->isDelayed); cmp_ok(@$body5, "==", 2); is($body5->[0], "body1\n"); is($body5->[1], "body2\n"); is($msg5->subject, 'hello world'); ok($msg5->messageId); ok($msg5->get('message-id')); unlink 'tmp'; Mail-Box-2.118/tests/20pparser/33bodyf.t0000644000175000001440000001330712473603434020303 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the reading from file of message bodies which have their content # stored in external files as long as the folder is open. use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 945; use Mail::Box::Parser::Perl; use Mail::Message::Body::File; use Mail::Message::Head; # MO: I do not know whether there is an other way to get this to work # on Windows without error messages. my $trusted = $Mail::Message::crlf_platform; ### ### First carefully read the first message ### my $parser = Mail::Box::Parser::Perl->new(filename => $src, trusted =>$trusted); ok(defined $parser, "creation of parser"); $parser->pushSeparator('From '); my ($where, $sep) = $parser->readSeparator; cmp_ok($where, "==", 0, "begin at file-start"); ok(defined $sep, "reading first separator"); like($sep, qr/^From /, "correctness first separator") if defined $sep; my $head = Mail::Message::Head->new; ok(defined $head); $head->read($parser); ok(defined $head); ok($head, "overloaded boolean"); my $hard_coded_lines_msg0 = 33; my $hard_coded_length_msg0 = 1280; my $binary_size = $hard_coded_length_msg0 + ($crlf_platform ? $hard_coded_lines_msg0 : 0); my $length = int $head->get('Content-Length'); cmp_ok($length, "==", $binary_size, "first message size"); my $lines = int $head->get('Lines'); cmp_ok($lines, "==", $hard_coded_lines_msg0, "first message lines"); my $body = Mail::Message::Body::File->new; $body->read($parser, $head, undef, $length, $lines); ok(defined $body, "reading of first body"); cmp_ok($body->size, "==", $hard_coded_length_msg0, "size of body"); my @lines = $body->lines; cmp_ok(@lines, "==", $lines, "lines of body"); # # Try to read the rest of the folder, with specified content-length # and lines if available. # my @msgs; push @msgs, # first message already read. { fields => scalar $head->names , lines => $hard_coded_lines_msg0 , size => $hard_coded_length_msg0 , sep => $sep , subject=> $head->get('subject') }; while(1) { my ($where, $sep) = $parser->readSeparator; last unless $sep; my $count = @msgs; like($sep, qr/^From /, "1 from $count"); $head = Mail::Message::Head->new; ok(defined $head, "1 head count"); $head->read($parser); my $cl = int $head->get('Content-Length'); my $li = int $head->get('Lines'); my $su = $head->get('Subject'); $body = Mail::Message::Body::File->new ->read($parser, $head, undef, $cl, $li); ok(defined $body, "1 body $count"); my $size = $body->size; my $lines = $body->nrLines; cmp_ok($li , "==", $lines, "1 lines $count") if defined $li; $cl -= $li if $crlf_platform; cmp_ok($cl , "==", $size, "1 size $count") if defined $cl; my $msg = { size => $size , lines => $lines , fields => scalar $head->names , sep => $sep , subject=> $su }; push @msgs, $msg; } cmp_ok(@msgs, "==", 45); $parser->stop; ### ### Now read the whole folder again, but without help of content-length ### and nor lines. ### undef $parser; $parser = Mail::Box::Parser::Perl->new(filename => $src, trusted => $trusted); $parser->pushSeparator('From '); my $count = 0; while($sep = $parser->readSeparator) { my $msg = $msgs[$count]; like($sep, qr/^From /, "2 from $count"); $head = Mail::Message::Head->new->read($parser); ok(defined $head, "2 head $count"); $body = Mail::Message::Body::File->new->read($parser, $head, undef); ok(defined $body, "2 body $count"); my $su = $head->get('Subject'); my $size = $body->size; my $lines = $body->nrLines; cmp_ok($size, "==", $msg->{size}, "2 size $count"); cmp_ok($lines, "==", $msg->{lines}, "2 lines $count"); is($su, $msg->{subject}, "2 subject $count") if defined $su && defined $msg->{subject}; cmp_ok($head->names , "==", $msg->{fields}, "2 names $count"); is($sep, $msg->{sep}, "2 sep $count"); $count++; } $parser->stop; ### ### Now read the whole folder again, but with deceiving values for ### content-length and lines ### undef $parser; $parser = Mail::Box::Parser::Perl->new(filename => $src, trusted => $trusted); $parser->pushSeparator('From '); $count = 0; while(1) { my ($where, $sep) = $parser->readSeparator; last unless $sep; my $msg = $msgs[$count]; like($sep, qr/^From /, "3 From $count"); $head = Mail::Message::Head->new->read($parser); ok(defined $head, "3 Head $count"); $body = Mail::Message::Body::File->new; $body->read($parser, $head, undef, $msg->{size}-15, $msg->{lines}-3); ok(defined $body, "3 Body $count"); my $su = $head->get('Subject'); my $size = $body->size; my $lines = $body->nrLines; # two messages contain one trailing blank, which is removed because # of the wrong number of lines. The will have an extra OK. my $wrong = $count==14 || $count==18; cmp_ok($size, '==', $msg->{size}, "3 size $count") unless $wrong; cmp_ok($lines, '==', $msg->{lines}, "3 lines $count") unless $wrong; is($su, $msg->{subject}, "3 subject $count") if defined $su && defined $msg->{subject}; cmp_ok($head->names, '==', $msg->{fields}, "3 name $count"); is($sep, $msg->{sep}, "3 sep $count"); $count++; } Mail-Box-2.118/tests/20pparser/31bodyl.t0000644000175000001440000001276612473603434020317 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the reading from file of message bodies which have their content # stored in a an array of lines. use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 945; use Mail::Box::Parser::Perl; use Mail::Message::Body::Lines; use Mail::Message::Head; ### ### First carefully read the first message ### my $parser = Mail::Box::Parser::Perl->new(filename => $src); ok(defined $parser, "creation of parser"); $parser->pushSeparator('From '); my ($where, $sep) = $parser->readSeparator; cmp_ok($where, "==", 0, "begin at file-start"); ok(defined $sep, "reading first separator"); like($sep, qr/^From /, "correctness first separator") if defined $sep; my $head = Mail::Message::Head->new; ok(defined $head); $head->read($parser); ok(defined $head); ok($head, "overloaded boolean"); my $hard_coded_lines_msg0 = 33; my $hard_coded_length_msg0 = 1280; my $binary_size = $hard_coded_length_msg0 + ($crlf_platform ? $hard_coded_lines_msg0 : 0); my $length = int $head->get('Content-Length'); cmp_ok($length, "==", $binary_size, "first message size"); my $lines = int $head->get('Lines'); cmp_ok($lines, "==", $hard_coded_lines_msg0, "first message lines"); my $body = Mail::Message::Body::Lines->new; $body->read($parser, $head, undef, $length, $lines); ok(defined $body, "reading of first body"); my @lines = $body->lines; $length -= @lines if $crlf_platform; cmp_ok($body->size, "==", $length, "size of body"); cmp_ok(@lines, "==", $lines, "lines of body"); # # Try to read the rest of the folder, with specified content-length # and lines if available. # my @msgs; push @msgs, # first message already read. { fields => scalar $head->names , lines => $hard_coded_lines_msg0 , size => $hard_coded_length_msg0 , sep => $sep , subject=> $head->get('subject') }; while(1) { my ($where, $sep) = $parser->readSeparator; last unless $sep; my $count = @msgs; like($sep, qr/^From /, "1 from $count"); $head = Mail::Message::Head->new; ok(defined $head, "1 head count"); $head->read($parser); my $cl = int $head->get('Content-Length'); my $li = int $head->get('Lines'); my $su = $head->get('Subject'); $body = Mail::Message::Body::Lines->new ->read($parser, $head, undef, $cl, $li); ok(defined $body, "1 body $count"); my $size = $body->size; my $lines = $body->nrLines; cmp_ok($li , "==", $lines, "1 lines $count") if defined $li; $cl -= $li if $crlf_platform; cmp_ok($cl , "==", $size, "1 size $count") if defined $cl; my $msg = { size => $size , lines => $lines , fields => scalar $head->names , sep => $sep , subject=> $su }; push @msgs, $msg; } cmp_ok(@msgs, "==", 45); $parser->stop; ### ### Now read the whole folder again, but without help of content-length ### and nor lines. ### undef $parser; $parser = Mail::Box::Parser::Perl->new(filename => $src); $parser->pushSeparator('From '); my $count = 0; while($sep = $parser->readSeparator) { my $msg = $msgs[$count]; like($sep, qr/^From /, "2 from $count"); $head = Mail::Message::Head->new->read($parser); ok(defined $head, "2 head $count"); $body = Mail::Message::Body::Lines->new->read($parser, $head, undef); ok(defined $body, "2 body $count"); my $su = $head->get('Subject'); my $size = $body->size; my $lines = $body->nrLines; cmp_ok($size, "==", $msg->{size}, "2 size $count"); cmp_ok($lines, "==", $msg->{lines}, "2 lines $count"); is($su, $msg->{subject}, "2 subject $count") if defined $su && defined $msg->{subject}; cmp_ok($head->names , "==", $msg->{fields}, "2 names $count"); is($sep, $msg->{sep}, "2 sep $count"); $count++; } $parser->stop; ### ### Now read the whole folder again, but with deceiving values for ### content-length and lines ### undef $parser; $parser = Mail::Box::Parser::Perl->new(filename => $src); $parser->pushSeparator('From '); $count = 0; while(1) { my ($where, $sep) = $parser->readSeparator; last unless $sep; my $msg = $msgs[$count]; like($sep, qr/^From /, "3 From $count"); $head = Mail::Message::Head->new->read($parser); ok(defined $head, "3 Head $count"); $body = Mail::Message::Body::Lines->new; $body->read($parser, $head, undef, $msg->{size}-15, $msg->{lines}-3); ok(defined $body, "3 Body $count"); my $su = $head->get('Subject'); my $size = $body->size; my $lines = $body->nrLines; # two messages contain one trailing blank, which is removed because # of the wrong number of lines. The will have an extra OK. my $wrong = $count==14 || $count==18; cmp_ok($size, '==', $msg->{size}, "3 size $count") unless $wrong; cmp_ok($lines, '==', $msg->{lines}, "3 lines $count") unless $wrong; is($su, $msg->{subject}, "3 subject $count") if defined $su && defined $msg->{subject}; cmp_ok($head->names, '==', $msg->{fields}, "3 name $count"); is($sep, $msg->{sep}, "3 sep $count"); $count++; } Mail-Box-2.118/tests/20pparser/34bodymp.t0000644000175000001440000001174712473603434020501 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the reading from file of message bodies which are multiparts # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 313; use Mail::Box::Parser::Perl; use Mail::Message::Body::Lines; use Mail::Message::Body::Multipart; use Mail::Message::Head; my $getbodytype = sub {'Mail::Message::Body::Lines'}; ### ### First pass through all messages, with correct data, if available ### my $parser = Mail::Box::Parser::Perl->new(filename => $src); ok(defined $parser, "creation of parser"); $parser->pushSeparator('From '); my (@msgs, $msgnr); while(1) { my (undef, $sep) = $parser->readSeparator; last unless $sep; $msgnr++; my $count = @msgs; like($sep, qr/^From /, "1 from $count"); my $head = Mail::Message::Head->new; ok(defined $head, "1 head count"); $head->read($parser); my $cl = int $head->get('Content-Length'); my $li = int $head->get('Lines'); unless($head->isMultipart) { # Skip non-multipart Mail::Message::Body::Lines->new->read($parser, $head, undef, $cl, $li); next; } my $message; my $body = Mail::Message::Body::Multipart->new(message => \$message); my $mp = $head->get('Content-Type')->comment; if($mp =~ m/['"](.*?)["']/) { $body->boundary($1); } $body->read($parser, $head, $getbodytype, $cl, $li); ok(defined $body, "1 body $count"); my $size = $body->size; my $lines = $body->nrLines; my $su = $head->get('Subject'); cmp_ok($lines, "==", $li, "1 lines $count") if defined $li; $cl -= $li if $crlf_platform; cmp_ok($size , "==", $cl, "1 size $count") if defined $cl; my $msg = { size => $size , lines => $lines , fields => scalar $head->names , sep => $sep , subject=> $su }; push @msgs, $msg; } cmp_ok(@msgs, "==", 3); $parser->stop; ### ### Now read the whole folder again, but without help of content-length ### and nor lines. ### undef $parser; $parser = Mail::Box::Parser::Perl->new(filename => $src); $parser->pushSeparator('From '); my $count = 0; while(1) { my (undef, $sep) = $parser->readSeparator; last unless $sep; like($sep, qr/^From /, "2 from $count"); my $head = Mail::Message::Head->new->read($parser); ok(defined $head, "2 head $count"); unless($head->isMultipart) { # Skip non-multipart Mail::Message::Body::Lines->new->read($parser, $head, undef); next; } my $msg = $msgs[$count]; my $message; my $body = Mail::Message::Body::Multipart->new(message => \$message); ok(defined $body, "2 body $count"); my $mp = $head->get('Content-Type')->comment; if($mp =~ m/['"](.*?)["']/) { $body->boundary($1); } $body->read($parser, $head, $getbodytype); my $su = $head->get('Subject'); my $size = $body->size; my $lines = $body->nrLines; cmp_ok($size, "==", $msg->{size}, "2 size $count"); cmp_ok($lines, "==", $msg->{lines}, "2 lines $count"); is($su, $msg->{subject}, "2 subject $count") if defined $su && defined $msg->{subject}; cmp_ok($head->names , "==", $msg->{fields}, "2 names $count"); is($sep, $msg->{sep}, "2 sep $count"); $count++; } $parser->stop; ### ### Now read the whole folder again, but with deceiving values for ### content-length and lines ### undef $parser; $parser = Mail::Box::Parser::Perl->new(filename => $src); $parser->pushSeparator('From '); $count = 0; while(1) { my (undef, $sep) = $parser->readSeparator; last unless $sep; like($sep, qr/^From /, "3 From $count"); my $head = Mail::Message::Head->new->read($parser); ok(defined $head, "3 Head $count"); unless($head->isMultipart) { # Skip non-multipart Mail::Message::Body::Lines->new->read($parser, $head, undef); next; } my $msg = $msgs[$count]; my $message; my $body = Mail::Message::Body::Multipart->new(message => \$message); ok(defined $body, "3 Body $count"); my $mp = $head->get('Content-Type')->comment; if($mp =~ m/['"](.*?)["']/) { $body->boundary($1); } $body->read($parser, $head, $getbodytype, $msg->{size}-15, $msg->{lines}-3); my $su = $head->get('Subject'); my $size = $body->size; my $lines = $body->nrLines; cmp_ok($size, '==', $msg->{size}, "3 size $count"); cmp_ok($lines, '==', $msg->{lines}, "3 lines $count"); is($su, $msg->{subject}, "3 subject $count") if defined $su && defined $msg->{subject}; cmp_ok($head->names, '==', $msg->{fields}, "3 name $count"); is($sep, $msg->{sep}, "3 sep $count"); $count++; } Mail-Box-2.118/tests/20pparser/10field.t0000644000175000001440000000311412473603434020251 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test processing of header-fields: only single fields, not whole headers. # This also doesn't cover reading headers from file. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 15; use Mail::Message::Field; use Mail::Box::Parser::Perl; # Explictly ask for the Perl parser to fold lines. Mail::Box::Parser->defaultParserType('Mail::Box::Parser::Perl'); # # Processing of structured lines. # my $f = Mail::Message::Field->new('Sender: B ; C'); is($f->name, 'sender'); is($f->body, 'B'); like($f->comment , qr/^\s*C\s*/); # No comment, strip CR LF my $g = Mail::Message::Field->new("Sender: B\015\012"); is($g->body, 'B'); is($g->comment, ""); # Check toString my $x = $f->toString; is($x, "Sender: B ; C\n"); $x = $g->toString; is($x, "Sender: B\n"); # Now check folding. my $k = Mail::Message::Field->new(Sender => 'short line'); is($k->toString, "Sender: short line\n"); my @klines = $k->toString; cmp_ok(@klines, "==", 1); my $long = 'oijfjslkgjhius2rehtpo2uwpefnwlsjfh2oireuqfqlkhfjowtropqhflksjhflkjhoiewurpq'; my $l = Mail::Message::Field->new(Sender => $long); my @llines = $l->toString; cmp_ok(@llines, "==", 1); my $m = Mail::Message::Field->new(Sender => 'roijfjslkgjhiu, rehtpo2uwpe, fnwlsjfh2oire, uqfqlkhfjowtrop, qhflksjhflkj, hoiewurpq'); cmp_ok($m->nrLines, "==", 2); $m->setWrapLength(35); cmp_ok($m->nrLines, "==", 3); my @mlines = $m->toString(72); cmp_ok(@mlines, "==", 2); is($mlines[0], "Sender: roijfjslkgjhiu, rehtpo2uwpe, fnwlsjfh2oire, uqfqlkhfjowtrop,\n"); is($mlines[1], " qhflksjhflkj, hoiewurpq\n"); Mail-Box-2.118/tests/20pparser/30bodys.t0000644000175000001440000001301512473603434020311 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the reading from file of message bodies which have their content # stored in a single string. use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 945; use Mail::Box::Parser::Perl; use Mail::Message::Body::String; use Mail::Message::Head; ### ### First carefully read the first message ### my $parser = Mail::Box::Parser::Perl->new(filename => $src); ok(defined $parser, "creation of parser"); exit 1 unless defined $parser; $parser->pushSeparator('From '); my ($where, $sep) = $parser->readSeparator; cmp_ok($where, "==", 0, "begin at file-start"); ok(defined $sep, "reading first separator"); like($sep, qr/^From /, "correctness first separator") if defined $sep; my $head = Mail::Message::Head->new; ok(defined $head); $head->read($parser); ok(defined $head); ok($head, "overloaded boolean"); my $hard_coded_lines_msg0 = 33; my $hard_coded_length_msg0 = 1280; my $binary_size = $hard_coded_length_msg0 + ($crlf_platform ? $hard_coded_lines_msg0 : 0); my $length = int $head->get('Content-Length'); cmp_ok($length, "==", $binary_size, "first message size"); my $lines = int $head->get('Lines'); cmp_ok($lines, "==", $hard_coded_lines_msg0, "first message lines"); my $body = Mail::Message::Body::String->new; $body->read($parser, $head, undef, $length, $lines); ok(defined $body, "reading of first body"); my @lines = $body->lines; $length -= @lines if $crlf_platform; cmp_ok($body->size, "==", $length, "size of body"); cmp_ok(@lines, "==", $lines, "lines of body"); # # Try to read the rest of the folder, with specified content-length # and lines if available. # my @msgs; push @msgs, # first message already read. { fields => scalar $head->names , lines => $hard_coded_lines_msg0 , size => $hard_coded_length_msg0 , sep => $sep , subject=> $head->get('subject') }; while(1) { my ($where, $sep) = $parser->readSeparator; last unless $sep; my $count = @msgs; like($sep, qr/^From /, "1 from $count"); $head = Mail::Message::Head->new; ok(defined $head, "1 head $count"); $head->read($parser); my $cl = int $head->get('Content-Length'); my $li = int $head->get('Lines'); my $su = $head->get('Subject'); $body = Mail::Message::Body::String->new ->read($parser, $head, undef, $cl, $li); ok(defined $body, "1 body $count"); my $size = $body->size; my $lines = $body->nrLines; cmp_ok($li , "==", $lines, "1 lines $count") if defined $li; $cl -= $li if $crlf_platform; cmp_ok($cl , "==", $size, "1 size $count") if defined $cl; my $msg = { size => $size , lines => $lines , fields => scalar $head->names , sep => $sep , subject=> $su }; push @msgs, $msg; } cmp_ok(@msgs, "==", 45); $parser->stop; ### ### Now read the whole folder again, but without help of content-length ### and nor lines. ### undef $parser; $parser = Mail::Box::Parser::Perl->new(filename => $src); $parser->pushSeparator('From '); my $count = 0; while($sep = $parser->readSeparator) { my $msg = $msgs[$count]; like($sep, qr/^From /, "2 from $count"); $head = Mail::Message::Head->new->read($parser); ok(defined $head, "2 head $count"); $body = Mail::Message::Body::String->new->read($parser, $head, undef); ok(defined $body, "2 body $count"); my $su = $head->get('Subject'); my $size = $body->size; my $lines = $body->nrLines; cmp_ok($size, "==", $msg->{size}, "2 size $count"); cmp_ok($lines, "==", $msg->{lines}, "2 lines $count"); is($su, $msg->{subject}, "2 subject $count") if defined $su && defined $msg->{subject}; cmp_ok($head->names , "==", $msg->{fields}, "2 names $count"); is($sep, $msg->{sep}, "2 sep $count"); $count++; } $parser->stop; ### ### Now read the whole folder again, but with deceiving values for ### content-length and lines ### undef $parser; $parser = Mail::Box::Parser::Perl->new(filename => $src); $parser->pushSeparator('From '); $count = 0; while(1) { my ($where, $sep) = $parser->readSeparator; last unless $sep; my $msg = $msgs[$count]; like($sep, qr/^From /, "3 From $count"); $head = Mail::Message::Head->new->read($parser); ok(defined $head, "3 Head $count"); $body = Mail::Message::Body::String->new; $body->read($parser, $head, undef, $msg->{size}-15, $msg->{lines}-3); ok(defined $body, "3 Body $count"); my $su = $head->get('Subject'); my $size = $body->size; my $lines = $body->nrLines; # two messages contain one trailing blank, which is removed because # of the wrong number of lines. The will have an extra OK. my $wrong = $count==14 || $count==18; cmp_ok($size, '==', $msg->{size}, "3 size $count") unless $wrong; cmp_ok($lines, '==', $msg->{lines}, "3 lines $count") unless $wrong; is($su, $msg->{subject}, "3 subject $count") if defined $su && defined $msg->{subject}; cmp_ok($head->names, '==', $msg->{fields}, "3 name $count"); is($sep, $msg->{sep}, "3 sep $count"); $count++; } Mail-Box-2.118/tests/20pparser/32bodyd.t0000644000175000001440000001277512473603434020310 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the reading from file of message bodies which have their content # stored in a single string. use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 855; use Mail::Box::Parser::Perl; use Mail::Message::Body::Delayed; use Mail::Message::Head; ### ### First carefully read the first message ### my $parser = Mail::Box::Parser::Perl->new(filename => $src); ok(defined $parser, "creation of parser"); $parser->pushSeparator('From '); my ($where, $sep) = $parser->readSeparator; cmp_ok($where, "==", 0, "begin at file-start"); ok(defined $sep, "reading first separator"); like($sep, qr/^From /, "correctness first separator") if defined $sep; my $head = Mail::Message::Head->new; ok(defined $head); $head->read($parser); ok(defined $head); ok($head, "overloaded boolean"); my $hard_coded_lines_msg0 = 33; my $hard_coded_length_msg0 = 1280; my $binary_size = $hard_coded_length_msg0 + ($crlf_platform ? $hard_coded_lines_msg0 : 0); my $length = int $head->get('Content-Length'); cmp_ok($length, "==", $binary_size, "first message size"); my $lines = int $head->get('Lines'); cmp_ok($lines, "==", $hard_coded_lines_msg0, "first message lines"); my $message; # dummy message, because all delayed objects must have one. my $body = Mail::Message::Body::Delayed->new(message => \$message); $body->read($parser, $head, undef, $length, $lines); ok(defined $body, "reading of first body"); cmp_ok($body->guessSize, "==", $length, "guessed size of body"); # # Try to read the rest of the folder, with specified content-length # and lines if available. # my @msgs; push @msgs, # first message already read. { fields => scalar $head->names , lines => $hard_coded_lines_msg0 , size => $hard_coded_length_msg0 , sep => $sep , subject=> $head->get('subject') }; while(1) { my ($where, $sep) = $parser->readSeparator; last unless $sep; my $count = @msgs; like($sep, qr/^From /, "1 from $count"); $head = Mail::Message::Head->new; ok(defined $head, "1 head count"); $head->read($parser); my $cl = int $head->get('Content-Length'); my $li = int $head->get('Lines'); my $su = $head->get('Subject'); $body = Mail::Message::Body::Delayed->new(message => \$message) ->read($parser, $head, undef, $cl, $li); ok(defined $body, "1 body $count"); my $size = $body->guessSize; cmp_ok($cl , "==", $size, "1 size $count") if defined $cl; my $msg = { size => $size , fields => scalar $head->names , sep => $sep , subject=> $su }; push @msgs, $msg; } cmp_ok(@msgs, "==", 45); $parser->stop; ### ### Now read the whole folder again, but without help of content-length ### and nor lines. ### undef $parser; $parser = Mail::Box::Parser::Perl->new(filename => $src); $parser->pushSeparator('From '); my $count = 0; while($sep = $parser->readSeparator) { my $msg = $msgs[$count]; like($sep, qr/^From /, "2 from $count"); $head = Mail::Message::Head->new->read($parser); ok(defined $head, "2 head $count"); $body = Mail::Message::Body::Delayed->new(message => \$message) ->read($parser, $head, undef); ok(defined $body, "2 body $count"); my $su = $head->get('Subject'); my $size = $body->guessSize; my $lines = $msg->{lines} = $body->nrLines; if($crlf_platform) { ok(1); # too complicated to test } else { cmp_ok($size, "==", $msg->{size}, "2 size $count"); } is($su, $msg->{subject}, "2 subject $count") if defined $su && defined $msg->{subject}; cmp_ok($head->names , "==", $msg->{fields}, "2 names $count"); is($sep, $msg->{sep}, "2 sep $count"); $count++; } $parser->stop; ### ### Now read the whole folder again, but with deceiving values for ### content-length and lines ### undef $parser; $parser = Mail::Box::Parser::Perl->new(filename => $src); $parser->pushSeparator('From '); $count = 0; while(1) { my ($where, $sep) = $parser->readSeparator; last unless $sep; my $msg = $msgs[$count]; like($sep, qr/^From /, "3 From $count"); $head = Mail::Message::Head->new->read($parser); ok(defined $head, "3 Head $count"); $body = Mail::Message::Body::Delayed->new(message => \$message); $body->read($parser, $head, undef, $msg->{size}-15, $msg->{lines}-3); ok(defined $body, "3 Body $count"); my $su = $head->get('Subject'); my $size = $body->guessSize; my $lines = $body->nrLines; # two messages contain one trailing blank, which is removed because # of the wrong number of lines. The will have an extra OK. my $wrong = $count==14 || $count==18; if($wrong) { ; } elsif($crlf_platform) { ok(1) } # too hard to test else { cmp_ok($size, '==', $msg->{size}, "3 size $count") } cmp_ok($lines, '==', $msg->{lines}, "3 lines $count") unless $wrong; is($su, $msg->{subject}, "3 subject $count") if defined $su && defined $msg->{subject}; cmp_ok($head->names, '==', $msg->{fields}, "3 name $count"); is($sep, $msg->{sep}, "3 sep $count"); $count++; } Mail-Box-2.118/tests/20pparser/20head.t0000644000175000001440000000317612473603434020100 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the processing of a message header, in this case purely the reading # from a file. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 16; use Mail::Message; use Mail::Message::Head; use Mail::Box::Parser::Perl; my $h = Mail::Message::Head->new; ok(defined $h); my $parser = Mail::Box::Parser::Perl->new(filename => $src); ok($parser); my $head = Mail::Message::Head->new; ok(defined $head); ok(! $head); # no lines yet $parser->pushSeparator('From '); my ($where, $sep) = $parser->readSeparator; ok($sep); cmp_ok($where, "==", 0); like($sep , qr/^From mag.*2000$/); $head->read($parser); ok($head); # now has lines cmp_ok($head->names, "==", 20); is($head->get('subject'), 'Re: File Conversion From HTML to PS and TIFF'); my @received = $head->get('received'); cmp_ok(@received, "==", 5); my $received = $head->get('received'); #last ok(defined $received); is($received->name, 'received'); my $recb = "(from majordomo\@localhost)\tby unca-don.wizards.dupont.com (8.9.3/8.9.3) id PAA29389\tfor magick-outgoing"; is($received->body, $recb); is($received->comment, 'Wed, 9 Feb 2000 15:38:42 -0500 (EST)'); # Check parsing empty fields # Contributed by Marty Pauley my $message = <<'EOT'; Date: Mon, 24 Feb 2003 11:07:36 +0000 From: marty@kasei.com To: marty@kasei.com Subject: Test Message Message-ID: <20030224010736.GA32736@phobos.kasei.com> Mime-Version: 1.0 X-foo: Content-Type: text/plain Content-Disposition: inline This is a test message. EOT my $mm = Mail::Message->read($message); my $foo = $mm->head->get("x-foo")->string; is($foo, "X-foo: \n", "X-foo ok"); Mail-Box-2.118/tests/01platform/0000755000175000001440000000000012473604501017004 5ustar00markovusers00000000000000Mail-Box-2.118/tests/01platform/Definition.pm0000644000175000001440000000056112473604425021441 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::01platform::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"platform specific preparations"} sub critical {1} sub skip { undef } 1; Mail-Box-2.118/tests/01platform/10crlf.t0000644000175000001440000000264612473603434020274 0ustar00markovusers00000000000000#!/usr/bin/env perl # On Windows, the test mailbox must be have lines which are # separated by CRLFs. The mbox.src which is supplied is UNIX-style, # so only has LF line-terminations. In this script, this is # translated. The Content-Length of the messages is updated too. use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 1; use FileHandle; my $crlf = "\015\012"; open SRC, '<', $unixsrc or die "Cannot open $unixsrc to read: $!\n"; binmode SRC; open DEST, '>', $winsrc or die "Cannot open $winsrc for writing: $!\n"; select DEST; binmode DEST; until(eof SRC) { my ($lines, $bytes); HEADER: while() { s/[\012\015]*$/$crlf/; if( m/^Content-Length\: / ) {$bytes = $' +0} elsif( m/^Lines\: / ) {$lines = $' +0} elsif( m/^\s*$/ ) { # End of header if(defined $bytes && defined $lines) { $bytes += $lines; print "Content-Length: $bytes\015\012"; } print "Lines: $lines$crlf" if defined $lines; print $crlf; last HEADER; } else {print} } BODY: while() { s/[\012\015]*$/$crlf/; print; last BODY if m/^From /; } } die "Errors in reading $unixsrc" unless close SRC; die "Errors in writing $winsrc" unless close DEST; pass("Folder conversion complete"); Mail-Box-2.118/tests/14fieldu/0000755000175000001440000000000012473604501016434 5ustar00markovusers00000000000000Mail-Box-2.118/tests/14fieldu/Definition.pm0000644000175000001440000000107112473604425021066 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::14fieldu::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Message::Field::Full; unicode fields"} sub critical {0} sub skip { return "Requires module Encode, which requires at least Perl 5.7.3" if $] < 5.007003; eval "require Encode"; return "Module Encode is not installed or has errors." if $@; undef; } 1; Mail-Box-2.118/tests/14fieldu/40parse.t0000644000175000001440000000422712473603434020110 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test processing of general parsing of fields # use strict; use warnings; package Mail::Message::Field::Full; # define package name package main; use lib qw(. .. tests); use Tools; use Test::More; BEGIN { if($] < 5.007003) { plan skip_all => "Requires module Encode which requires Perl 5.7.3"; exit 0; } eval 'require Mail::Message::Field::Full'; if($@) { warn $@; plan skip_all => 'Extended attributes not available (install Encode?)'; exit 0; } else { plan tests => 38; } } my $mmff = 'Mail::Message::Field::Full'; # # Test consuming phrases # my @tests = ( 'hi! this is me ' => ['hi! this is me', '' ] , ' aap, noot ' => ['aap', ', noot ' ] , '" aap, noot " ' => [' aap, noot ', ' ' ] , '"aap", "noot"' => ['aap', ', "noot"' ] , '"a\\"b\\"c" d' => ['a"b"c', ' d' ] , '"\\"b\\"" d' => ['"b"', ' d' ] , '"a\\)b\\(c" d' => ['a\\)b\\(c', ' d' ] , '' => [ undef, '' ] , ' ' => [ undef, '' ] , '" " ' => [ ' ', ' ' ] ); while(@tests) { my ($from, $to) = (shift @tests, shift @tests); my ($exp_phrase, $exp_rest) = @$to; my ($phrase, $rest) = $mmff->consumePhrase($from); is($phrase, $exp_phrase, $from); is($rest, $exp_rest, $from); } # # Test consuming comments # @tests = ( '(this is a comment) ' => [ 'this is a comment', ' ' ] , '(this)' => [ 'this', '' ] , 'this' => [ undef, 'this' ] , ' (a(b)c) ' => [ 'a(b)c', ' ' ] , '((a)b(c)) ' => [ '(a)b(c)', ' ' ] , '((a)b(c) ' => [ undef, '((a)b(c) ' ] , '(a\(b) ' => [ 'a(b', ' ' ] , '(a ' => [ undef, '(a ' ] , 'a) ' => [ undef, 'a) ' ] ); while(@tests) { my ($from, $to) = (shift @tests, shift @tests); my ($exp_comment, $exp_rest) = @$to; my ($comment, $rest) = $mmff->consumeComment($from); is($comment, $exp_comment, $from); is($rest, $exp_rest, $from); } # Mail-Box-2.118/tests/14fieldu/20attr.t0000644000175000001440000001467012473603434017751 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test processing of field attributes in their most expensive implementation! # use strict; use warnings; # define package name when loading fails package Mail::Message::Field::Attribute; package Mail::Message::Field::Full; package main; use lib qw(. .. tests); use Tools; use Test::More; BEGIN { if($] < 5.007003) { plan skip_all => "Requires module Encode which requires Perl 5.7.3"; exit 0; } eval 'require Mail::Message::Field::Attribute'; if($@) { plan skip_all => 'Extended attributes not available (install Encode?)'; exit 0; } else { plan tests => 100; eval 'require Mail::Message::Field::Full'; plan skip_all => $@ if $@; } } my $mmfa = 'Mail::Message::Field::Attribute'; # # Test construction # my $a = $mmfa->new('a'); isa_ok($a, $mmfa); is($a->name, 'a'); ok(defined $a, "object a creation"); ok(!defined $a->charset, "charset undef"); ok(!defined $a->language, "language undef"); my $b = $mmfa->new('b', charset => 'iso-8859-15', language => 'nl-BE'); is($b->name, 'b'); ok(defined $a, "object b creation"); is($b->charset, 'iso-8859-15', "charset pre-set"); is($b->language, 'nl-BE', "language pre-set"); is($b->string, "; b*=iso-8859-15'nl-BE'"); # # Test situations without encoding or continuations # is($a->value, ''); ok($a->addComponent('a=test-any-field'), "simple component"); is($a->value, "test-any-field", "simple component set"); is($a->string, "; a=test-any-field", "simple component string"); my $s = ($a->string)[0]; is($s, "a=test-any-field", "simple component string"); ok($a->addComponent('a="test-any\"-field"'), "dq component"); is($a->value, 'test-any"-field', "dq component set"); is($a->string, "; a=\"test-any\\\"-field\"", "dq component string"); $s = ($a->string)[0]; is($s, 'a="test-any\"-field"', "dq component string"); ok($a->addComponent("a='test-any\\'-field'"), "sq component"); is($a->value, "test-any'-field", "sq component set"); is($a->string, "; a='test-any\\'-field'","sq component string"); $s = ($a->string)[0]; is($s, "a='test-any\\'-field'", "sq component string"); # # Tests for decoding without continuations # my $c = $mmfa->new('c', use_continuations => 0); isa_ok($c, $mmfa, "Construction of c"); ok($c->addComponent("c*=''abc"), "c without spec"); ok(! defined $c->charset); ok(! defined $c->language); is($c->value, 'abc'); ok($c->addComponent("c*=us-ascii''abc"), "c with charset"); is($c->charset, 'us-ascii'); ok(! defined $c->language); is($c->value, 'abc'); ok($c->addComponent("c*='en'abc"), "c with language"); ok(! defined $c->charset); is($c->language, 'en'); is($c->value, 'abc'); ok($c->addComponent("c*=us-ascii'en'abc"),"c with both"); is($c->charset, 'us-ascii'); is($c->language, 'en'); is($c->value, 'abc'); # # Tests for encoding without continuations # my $d = $mmfa->new('d', charset => 'iso-8859-1', use_continuations => 0); ok(defined $d, "Created d"); is($d->value, ''); is($d->value('abc'), 'abc'); is($d->value, 'abc'); my @s = $d->string; cmp_ok(scalar @s, '==', 1); is($s[0], "d*=iso-8859-1''abc"); is($d->string, "; d*=iso-8859-1''abc"); my @mq = ( 'JHKU(@*#&$ASK(@CKH*#@DHKAFsfdsk\"{PO{}[2348*(&(234897(&(ws:\":LK:K@@' , '4279234897 ' ); my $m = join '', @mq; $m =~ s/\\"/"/g; my @me = ( 'JHKU%28%40%2A%23%26%24ASK%28%40CKH%2A%23%40DHKAFsfdsk%22%7B' , 'PO%7B%7D%5B2348%2A%28%26%28234897%28%26%28ws%3A%22%3C%3F%3E%3ALK%3AK%40' , '%404279234897%20' ); my $me = join '', @me; is($d->value($m), $m); is($d->value, $m); @s = $d->string; cmp_ok(scalar @s, '==', 1); is($s[0], "d*=iso-8859-1''$me"); is($d->string, "; d*=iso-8859-1''$me"); $d->addComponent("d*=iso-8859-2''$me"); is($d->charset, 'iso-8859-2'); ok(! defined $d->language); is($d->value, $m); # # Tests for encoding with continuations # my $e = $mmfa->new('e', charset => 'iso-8859-1', use_continuations => 1); ok(defined $e, "Created e"); is($e->value, ''); is($e->value('abc'), 'abc'); is($e->value, 'abc'); @s = $e->string; cmp_ok(scalar @s, '==', 1); is($s[0], "e*=iso-8859-1''abc"); is($e->value($m), $m); is($e->value, $m); @s = $e->string; cmp_ok(scalar @s, '==', scalar @me); is($s[0], "e*0*=iso-8859-1''$me[0]"); is($s[1], "e*1*=$me[1]"); is($s[2], "e*2*=$me[2]"); is($e->string, "; e*0*=iso-8859-1''$me[0]; e*1*=$me[1]; e*2*=$me[2]"); is($e->value('abc'), 'abc', "Reset contination"); is($e->value, 'abc'); @s = $e->string; cmp_ok(scalar @s, '==', 1); is($s[0], "e*=iso-8859-1''abc"); # # Tests *NO* encoding with continuations # my $f = $mmfa->new('f', use_continuations => 1); ok(defined $f, "Created f"); is($f->value, ''); is($f->value('abc'), 'abc'); is($f->value, 'abc'); is($f->value($m), $m); is($f->value, $m); @s = $f->string; cmp_ok(scalar @s, '==', 2); is($s[0], "f*0=\"$mq[0]\""); is($s[1], "f*1=\"$mq[1]\""); is($f->string, "; f*0=\"$mq[0]\"; f*1=\"$mq[1]\""); is($f->value('abc'), 'abc', "Reset contination"); is($f->value, 'abc'); @s = $f->string; cmp_ok(scalar @s, '==', 1); is($s[0], 'f="abc"'); # # Tests merging # my $g = $mmfa->new('g', use_continuations => 1); ok(defined $g, "Created g"); my $h = $mmfa->new('h', use_continuations => 1); ok(defined $h, "Created h"); $g->addComponent('g*1*=b'); is($g->value, '[continuation missing]b', "Merge no continuation"); $h->addComponent('g*0*=a'); is($h->value, 'a'); ok(defined $g->mergeComponent($h), "Merge with continuation"); is($g->value, 'ab'); # # Test overloading # my $m1 = $mmfa->new(m => 'one'); my $m2 = $mmfa->new(m => 'two'); my $m3 = $mmfa->new(M => 'one'); my $m4 = $mmfa->new(M => 'ONE'); # stringification cmp_ok($m1->value, 'eq', 'one'); cmp_ok("$m1", 'eq', 'one'); # comparison # overloading at work, so we cannot use cmp_ok ok($m1 ne $m2, "$m1 ne $m2"); ok($m1 eq $m3, "$m1 eq $m3"); ok($m1 ne $m4, "$m1 ne $m4"); # fallback my $m5 = $mmfa->new(M => 42); cmp_ok($m5 +1, '==', 43, 'fallback'); # rt.cpan.org#90342 my $h = Mail::Message::Field::Full->new('Content-Disposition' => 'inline; filename*0="Selling #1 (signed) -"; filename*1=" 11-13.p"; filename*2=df'); #use Data::Dumper; #warn Dumper $h; isa_ok($h, 'Mail::Message::Field::Structured'); is($h->attribute('filename'), 'Selling #1 (signed) - 11-13.pdf'); Mail-Box-2.118/tests/14fieldu/52uri.t0000644000175000001440000000437712473603434017606 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test processing of URIs # use strict; use warnings; package Mail::Message::Field::URIs; # define package name package main; use lib qw(. .. tests); use Tools; use Test::More; BEGIN { if($] < 5.007003) { plan skip_all => "Requires module Encode which requires Perl 5.7.3"; exit 0; } eval 'require Mail::Message::Field::URIs'; if($@) { plan skip_all => 'Extended attributes not available (install Encode?)'; exit 0; } else { plan tests => 33; } } require Mail::Message::Field::Full; my $mmff = 'Mail::Message::Field::Full'; my $mmfu = 'Mail::Message::Field::URIs'; # # Test single URI # my $u = URI->new('http://x.org'); ok(defined $u, "uri creation"); isa_ok($u, 'URI'); is($u->scheme, 'http'); my $uf = $mmfu->new('List-Post' => $u); ok(defined $uf, "uri field creation"); isa_ok($uf, $mmfu); is($uf->string, "List-Post: \n"); is("$uf", ''); my @u = $uf->URIs; cmp_ok(@u, '==', 1); isa_ok($u[0], 'URI'); $uf = $mmfu->new('List-Post' => $u); my $u2 = $uf->addURI('mailto:x@example.com?subject=y'); ok(defined $u2, "auto-create URI"); isa_ok($u2, "URI"); @u = $uf->URIs; cmp_ok(@u, '==', 2); isa_ok($u[1], 'URI'); is($u[1]->scheme, "mailto"); is($u[1]->to, 'x@example.com'); my %headers = $u[1]->headers; is($headers{to}, 'x@example.com'); is($headers{subject}, 'y'); is($uf->string, <<'FOLDED'); List-Post: , FOLDED is("$uf", ', '); # # Test other constructions # $uf = $mmff->new("List-Post: , \n"); ok(defined $uf, "create from field"); isa_ok($uf, $mmff); isa_ok($uf, $mmfu); @u = $uf->URIs; cmp_ok(@u, '==', 2); isa_ok($u[0], 'URI'); is($u[0]->scheme, "mailto"); is($u[0]->to, 'x@y.com'); is("$u[0]", 'mailto:x@y.com'); isa_ok($u[1], 'URI'); is($u[1]->scheme, "http"); is("$u[1]", 'http://a.org/'); # modified by URI::canonical() is("$uf", ', '); is($uf->string, <<'FOLDED'); List-Post: , FOLDED $uf->beautify; is("$uf", ', '); Mail-Box-2.118/tests/14fieldu/10full.t0000644000175000001440000001500712473603434017733 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test processing of full fields, the most complex (and slowest) kind of fields. # use strict; use warnings; package Mail::Message::Field::Structured; # define package name package main; use lib qw(. .. tests); use Tools; use utf8; use Test::More; BEGIN { if($] < 5.007003) { plan skip_all => "Requires module Encode which requires Perl 5.7.3"; exit 0; } eval 'require Mail::Message::Field::Structured'; if($@) { plan skip_all => 'Extended attributes not available (install Encode?)'; exit 0; } else { plan tests => 74; Encode->import('encode', 'decode'); } } my $mmfs = 'Mail::Message::Field::Structured'; # # Test construction # my $a = $mmfs->new('a', ''); isa_ok($a, $mmfs); is($a->unfoldedBody, ''); my $a2 = $mmfs->new('a2', 0); isa_ok($a2, $mmfs); is($a2->string, "a2: 0\n"); is($a2->unfoldedBody, '0'); is($a->study, $a, 'is studied'); # # Test adding comments # my @p = ( 'abc' => 'abc' , '(abc)' => '(abc)' , 'a(bc)' => 'a(bc)' , '(ab)c' => '(ab)c' , '(a)b(c)' => '(a)b(c)' , '(a)(b)c' => '(a)(b)c' , '(a)b(c)' => '(a)b(c)' , '(a)(b)(c)'=> '(a)(b)(c)' , '()abc' => '()abc' , 'ab()c' => 'ab()c' , 'abc()' => 'abc()' , '()a()b()c()' => '()a()b()c()' , ')abc' => '\)abc' , '(abc' => '\(abc' , 'abc(' => 'abc\(' , 'abc)' => 'abc\)' , 'a)b(c' => 'a\)b\(c' , 'a)(bc' => 'a\)\(bc' , 'a))(bc' => 'a\)\)\(bc' , ')a)(bc' => '\)a\)\(bc' , '(a(b)c' => '\(a(b)c' , 'a\bc' => 'a\bc' , 'a\(bc' => 'a\(bc' , 'abc\(' => 'abc\(' , 'abc\\' => 'abc' , 'abc\\\\' => 'abc' , '\\' => '' ); while(@p) { my ($f, $t) = (shift @p, shift @p); is($mmfs->createComment($f), "($t)", "from $f"); } # # Test adding phrases # @p = ( 'a' => 'a' , 'a b c' => '"a b c"' , 'a \b c' => '"a \\\\b c"' # even within ', you have to use \\ , 'a "b c' => '"a \"b c"' , 'a \\"b c' => '"a \\\\\"b c"' ); while(@p) { my ($f, $t) = (shift @p, shift @p); is($mmfs->createPhrase($f), $t, "from $f"); } # # Test word encoding Quoted-Printable # my $b = $mmfs->new('b', ''); isa_ok($b, $mmfs); is($b->encode('abc'), 'abc'); is($b->encode('abc', force => 1), '=?us-ascii?q?abc?='); is($b->encode('abc', encoding => 'Q', force => 1), '=?us-ascii?Q?abc?='); my $utf8 = decode('ISO-8859-1', "\x{E4}bc"); is($b->encode($utf8), '=?us-ascii?q?=3Fbc?='); # conversion ä fails to \? is($b->encode($utf8, encoding => 'Q'), '=?us-ascii?Q?=3Fbc?='); is($b->encode($utf8, charset => 'iso-8859-1'), '=?iso-8859-1?q?=E4bc?='); is($b->encode($utf8, charset => 'ISO-8859-1'), '=?ISO-8859-1?q?=E4bc?='); is($b->encode($utf8, charset => 'ISO-8859-1', language => 'nl-BE'), '=?ISO-8859-1*nl-BE?q?=E4bc?='); my $long; { no utf8; $long = 'This is a long @text, with !! a few w3iRD characters in it...'; } $utf8 = decode('iso-8859-1', $long); is($b->encode($utf8, charset => 'ISO-8859-9', language => 'nl-BE'), '=?ISO-8859-9*nl-BE?q?This_is_a_long_@text,_with_!!_a_few_w3iRD_=A1_=A2_?= ' . '=?ISO-8859-9*nl-BE?q?=A3_=A4_=A5_=A6_=A7_=A8_=A9_=AA_=AB_=AC_=AD_=AE_=AF_?= ' . '=?ISO-8859-9*nl-BE?q?=B0_=B1_=B2_=B3_=B4_characters_in_it...?=' ); is($b->encode($utf8, charset => 'ISO-8859-9'), '=?ISO-8859-9?q?This_is_a_long_@text,_with_!!_a_few_w3iRD_=A1_=A2_=A3_=A4_?= ' . '=?ISO-8859-9?q?=A5_=A6_=A7_=A8_=A9_=AA_=AB_=AC_=AD_=AE_=AF_=B0_=B1_=B2_?= ' . '=?ISO-8859-9?q?=B3_=B4_characters_in_it...?=' ); # # Test word encoding Base64 # my $c = $mmfs->new('c', ''); is($c->encode('abc', encoding => 'b'), '=?us-ascii?b?YWJj?='); is($c->encode('abc', encoding => 'B'), '=?us-ascii?B?YWJj?='); is($c->encode('abc', encoding => 'b', charset => 'iso-8859-1'), '=?iso-8859-1?b?YWJj?='); is($c->encode('abc', encoding => 'b', charset => 'ISO-8859-1'), '=?ISO-8859-1?b?YWJj?='); is($c->encode('abc', encoding => 'b', charset => 'ISO-8859-1', language => 'nl-BE'), '=?ISO-8859-1*nl-BE?b?YWJj?='); is($c->encode($long, encoding => 'b', charset => 'ISO-8859-9', language => 'nl-BE'), '=?ISO-8859-9*nl-BE?b?VGhpcyBpcyBhIGxvbmcgQHRleHQsIHdpdGggISEgYSBmZXcgdzNp?= ' . '=?ISO-8859-9*nl-BE?b?UkQgoSCiIKMgpCClIKYgpyCoIKkgqiCrIKwgrSCuIK8gsCCxILIg?= ' . '=?ISO-8859-9*nl-BE?b?syC0IGNoYXJhY3RlcnMgaW4gaXQuLi4=?=' ); is($c->encode($long, encoding => 'b', charset => 'ISO-8859-9'), '=?ISO-8859-9?b?VGhpcyBpcyBhIGxvbmcgQHRleHQsIHdpdGggISEgYSBmZXcgdzNpUkQg?= ' . '=?ISO-8859-9?b?oSCiIKMgpCClIKYgpyCoIKkgqiCrIKwgrSCuIK8gsCCxILIgsyC0IGNo?= ' . '=?ISO-8859-9?b?YXJhY3RlcnMgaW4gaXQuLi4=?=' ); # # Test word decoding Quoted-Printable # my $d = $mmfs->new('d', ''); no utf8; # Next list is typed in iso-8859-1 (latin-1) my @ex_qp = ( # examples from rfc2047 '=?iso-8859-1?q?this=20is=20some=20text?=' => 'this is some text' , '=?US-ASCII?Q?Keith_Moore?=' => 'Keith Moore' , '=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?=' => 'Keld Jrn Simonsen' , '=?ISO-8859-1?Q?Andr=E9?= Pirard' => 'Andr Pirard' , '=?ISO-8859-1?Q?Olle_J=E4rnefors?=' => 'Olle Jrnefors' , '=?ISO-8859-1?Q?Patrik_F=E4ltstr=F6m?=' => 'Patrik Fltstrm' , '(=?ISO-8859-1?Q?a?=)' => '(a)' , '(=?ISO-8859-1?Q?a?= b)' => '(a b)' , '(=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)' => '(ab)' , '(=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)'=> '(ab)' , '(=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)' => '(ab)' , '(=?ISO-8859-1?Q?a_b?=)' => '(a b)' , '(=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?_b?=)' => '(a b)' , '(=?ISO-8859-1?Q?a_?= =?ISO-8859-1?Q?b?=)' => '(a b)' # extra tests , '=???abc?=' => 'abc' # illegal but accepted , '=?ISO-8859-1*nl-BE?Q?a?=' => 'a' , '(a =?ISO-8859-1?Q?b?=)' => '(a b)' ); use utf8; while(@ex_qp) { my ($from, $to) = (shift @ex_qp, shift @ex_qp); my $utf8_to = decode('iso-8859-1', $to); is($d->decode($from), $utf8_to, $from); } # # Test word decoding Quoted-Printable # no utf8; # Next list is typed in iso-8859-1 (latin-1) my @ex_b64 = ( # examples from rfc2047 ' =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=' => ' If you can read this you understand the example.' # Hebrew example cannot be used: I do not know what it should look like. # =?iso-8859-8?b?7eXs+SDv4SDp7Oj08A==?= ); use utf8; while(@ex_b64) { my ($from, $to) = (shift @ex_b64, shift @ex_b64); my $utf8_to = decode('iso-8859-1', $to); is($d->decode($from), $utf8_to); } Mail-Box-2.118/tests/14fieldu/50userid.t0000644000175000001440000000623712473603434020275 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test processing in combination with User::Identity as documented in # Mail::Message::Field. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use Mail::Message::Field::Fast; my $mmf = 'Mail::Message::Field::Fast'; BEGIN { if($] < 5.007003) { plan skip_all => "Requires module Encode which requires Perl 5.7.3"; exit 0; } eval 'require User::Identity'; if($@) { plan skip_all => 'User::Identity failed'; exit 0; } else { plan tests => 22; } } # A user's identity my $patrik = User::Identity->new ( "patrik" , full_name => "Patrik Fltstrm" # from rfc , charset => "ISO-8859-1" ); isa_ok($patrik, 'User::Identity'); my $email1 = $patrik->add ( email => 'home' , address => 'him@home.net' ); isa_ok($email1, 'Mail::Identity'); # address based on Mail::Identity with user my $f1 = $mmf->new(To => $email1); isa_ok($f1, $mmf); is($f1, '=?ISO-8859-1?q?Patrik_F=E4ltstr=F6m?= '); my $f1b = $mmf->new(To => $patrik); isa_ok($f1b, $mmf); is($f1b, '=?ISO-8859-1?q?Patrik_F=E4ltstr=F6m?= '); # address based on Mail::Identity without user require Mail::Identity; my $email2 = Mail::Identity->new ( 'work' , address => 'somewhere@example.com' ); my $f2 = $mmf->new(To => $email2); is($f2, 'somewhere@example.com'); # A very complex address my $email3 = Mail::Identity->new ( 'work' , address => 'somehow@example.com' , phrase => 'my " quote' , comment => 'make it ) hard' ); my $f3 = $mmf->new(To => $email3); is($f3, qq["my \\" quote" (make it \\) hard)]); # A collection of e-mails $patrik->add(email => $email3); my $emails = $patrik->collection('emails'); isa_ok($emails, 'User::Identity::Collection::Emails'); cmp_ok(@$emails, '==', 2); # An array of addresses my $f4 = $mmf->new ( To => [ $email1 , "aap\@hok.nl" , $email2 , $patrik->find(email => 'work') ] ); is($f4->string, <<'FOLDED'); To: =?ISO-8859-1?q?Patrik_F=E4ltstr=F6m?= , aap@hok.nl, somewhere@example.com, "my \" quote" (make it \) hard) FOLDED # Test a collection which is linked to user my $f5 = $mmf->new(To => $emails); is($f5->string, <<'TWO'); To: emails: "my \" quote" (make it \) hard), =?ISO-8859-1?q?Patrik_F=E4ltstr=F6m?= ; TWO require Mail::Message::Field::AddrGroup; # test a collection which is not linked to a user my $mmfg = 'Mail::Message::Field::AddrGroup'; my $g = $mmfg->new(name => 'groupie'); isa_ok($g, $mmfg); is($g->name, 'groupie'); my @addrs = $g->addresses; cmp_ok(scalar @addrs, '==', 0); is($g->string, "groupie: ;"); $g->addAddress($email1); @addrs = $g->addresses; cmp_ok(scalar @addrs, '==', 1); is($g->string, 'groupie: him@home.net;'); $g->addAddress($email3); @addrs = $g->addresses; cmp_ok(scalar @addrs, '==', 2); is($g->string, 'groupie: "my \" quote" (make it \) hard), him@home.net;'); $g->addAddress('aap@hok.nl'); @addrs = $g->addresses; cmp_ok(scalar @addrs, '==', 3); is($g->string, 'groupie: "my \" quote" (make it \) hard), aap@hok.nl, him@home.net;'); Mail-Box-2.118/tests/14fieldu/51addr.t0000644000175000001440000002037112473603434017710 0ustar00markovusers00000000000000#!/usr/bin/env perl # Test processing of addresses use strict; use warnings; package Mail::Message::Field::Addresses; # define package name package main; use lib qw(. .. tests); use Tools; use Mail::Message; use Test::More; BEGIN { if($] < 5.007003) { plan skip_all => "Requires module Encode which requires Perl 5.7.3"; exit 0; } eval "use Encode"; plan skip_all => 'Extended attributes not available (install Encode?)' if $@; Encode->import('is_utf8'); eval 'use Mail::Message::Field::Addresses'; plan skip_all => "Mail::Message::Field::Addresses broken: $@" if $@; plan tests => 104; } # avoid "print of Wide characters" warning # http://code.google.com/p/test-more/issues/detail?id=46 binmode Test::More->builder->output, ":utf8"; binmode Test::More->builder->failure_output, ":utf8"; my $mmfa = 'Mail::Message::Field::Address'; my $mmfag = 'Mail::Message::Field::AddrGroup'; my $mmfas = 'Mail::Message::Field::Addresses'; # # Test single addresses # my $ad = $mmfa->new(phrase => 'Mark Overmeer', username => 'markov', domain => 'cpan.org', comment => 'This is me!'); ok(defined $ad, 'Created ad'); isa_ok($ad, $mmfa); is($ad->name, 'Mark Overmeer'); is($ad->address, 'markov@cpan.org'); is($ad->comment, 'This is me!'); is($ad->string, '"Mark Overmeer" (This is me!)'); # # Test whole field (Addresses) # my $cc = $mmfas->new('Cc'); ok(defined $cc, 'Create cc'); isa_ok($cc, $mmfas); my $jd = '"John Doe" '; $cc = $mmfas->new(Cc => $jd); ok(defined $cc, 'parsing joe'); my @g = $cc->groups; cmp_ok(scalar @g, '==', 1); my $g0 = $g[0]; ok(defined $g0); isa_ok($g0, 'Mail::Message::Field::AddrGroup'); is($g0->name, ''); my @ga = $g0->addresses; cmp_ok(scalar @ga, '==', 1, 'address from group'); isa_ok($ga[0], 'Mail::Message::Field::Address'); is($g0->string, $jd, 'group string is ok'); is("$g0", $jd, 'gr stringification is ok'); my @a = $cc->addresses; cmp_ok(scalar @a, '==', 1, 'all address'); my $a0 = $a[0]; ok(defined $a0); isa_ok($a0, 'Mail::Message::Field::Address'); is($a0->name, 'John Doe'); is($a0->address, 'jdoe@machine.example'); is($a0->username, 'jdoe'); is($a0->domain, 'machine.example'); is($cc->string, "Cc: $jd\n", 'line string'); $cc->beautify; is($cc->string, "Cc: $jd\n", 'line string'); is("$cc", $jd, 'line stringification'); # # Checking various strings which are mentioned in rfc2822 # my $c = '"Joe Q. Public" , Mary Smith , jdoe@example.org, Who? '; $cc = $mmfas->new('Cc' => $c); ok(defined $cc, 'Parsed Joe Q. Public'); @g = $cc->groups; cmp_ok(scalar @g, '==', 1, 'one group'); $g0 = $g[0]; ok(defined $g0); isa_ok($g0, 'Mail::Message::Field::AddrGroup'); is($g0->name, ''); @a = $g0->addresses; cmp_ok(scalar @a, '==', 4, 'four addresses in group'); # the collections are not ordered (hash), so we need to enforce some # order for the tests. @a = sort { $a->address cmp $b->address } @a; ok(defined $a[0]); isa_ok($a[0], 'Mail::Message::Field::Address'); isa_ok($a[1], 'Mail::Message::Field::Address'); isa_ok($a[2], 'Mail::Message::Field::Address'); isa_ok($a[3], 'Mail::Message::Field::Address'); ok(!$a[0]->phrase, "checking on jdoe"); ok(!$a[0]->comment); is($a[0]->username, 'jdoe'); is($a[0]->domain, 'example.org'); is($a[1]->phrase, 'Joe Q. Public', "checking Joe's identity"); is($a[1]->username, 'john.q.public'); is($a[1]->domain, 'example.com'); is($a[1]->address, 'john.q.public@example.com'); is($a[1]->string, '"Joe Q. Public" '); is($a[2]->phrase, 'Mary Smith', "checking Mary's id"); is($a[2]->username, 'mary'); is($a[2]->domain, 'x.test'); is($a[3]->phrase, 'Who?', "checking Who?"); is($a[3]->username, 'one'); is($a[3]->domain, 'y-me.test'); is($a[3]->address, 'one@y-me.test'); is($a[3]->string, 'Who? '); is($cc->string, "Cc: $c"); $cc->beautify; is($cc->string, <<'REFOLDED'); Cc: "Joe Q. Public" , "Mary Smith" , Who? , jdoe@example.org REFOLDED # Next! my $c3 = <<'COMPLEX'; , "Giant; \"Big\" Box" , A Group:Chris Jones ,joe@where.test,John ; Undisclosed recipients:; "Mary Smith: Personal Account" , Jane Brown COMPLEX $cc = $mmfas->new(Cc => $c3); ok(defined $cc, 'Parsed complex'); @g = $cc->groups; cmp_ok(scalar @g, '==', 3); @g = sort {$a->name cmp $b->name} @g; is($g[0]->name, ''); cmp_ok($g[0]->addresses, '==', 4); my @u = sort map {$_->username} $g[0]->addresses; cmp_ok(scalar @u, '==', 4); is($u[0], 'boss'); is($u[1], 'j-brown'); is($u[2], 'smith'); is($u[3], 'sysservices'); is($g[1]->name, 'A Group'); cmp_ok($g[1]->addresses, '==', 3); is($g[2]->name, 'Undisclosed recipients'); cmp_ok($g[2]->addresses, '==', 0); is($cc->string, "Cc: $c3"); $cc->beautify; is($cc->string, <<'REFOLDED'); Cc: "Giant; \"Big\" Box" , "Jane Brown" , "Mary Smith: Personal Account" , boss@nil.test, A Group: "Chris Jones" , John , joe@where.test; Undisclosed recipients: ; REFOLDED # Next ! my $c2 = <<'PETE'; Pete(A wonderful \) chap) , A Group(Some people) :Chris Jones , joe@example.org, John (my dear friend); (the end of the group) PETE $cc = $mmfas->new(Cc => $c2); ok(defined $cc, 'Parsed pete'); @g = $cc->groups; cmp_ok(scalar @g, '==', 2); is($g[0]->name, ''); is($g[1]->name, 'A Group'); @a = $g[0]->addresses; cmp_ok(scalar @a, '==', 1); $a0 = $a[0]; is($a0->phrase, 'Pete'); is($a0->username, 'pete'); is($a0->domain, 'silly.test'); is($a0->address, 'pete@silly.test'); ok(!defined $a0->comment); @a = $g[1]->addresses; cmp_ok(scalar @a, '==', 3); $a0 = $g[1]->find('Chris Jones'); ok(defined $a0, 'found chris'); is($a0->phrase, 'Chris Jones'); is($a0->username, 'c'); is($a0->domain, 'public.example'); ok(!defined $a0->comment); $a0 = $g[1]->find('John'); ok(defined $a0, 'found john'); is($a0->phrase, 'John'); is($a0->username, 'jdoe'); is($a0->domain, 'one.test'); is($a0->comment, 'my dear friend'); is($g[1]->string, 'A Group: "Chris Jones" , John (my dear friend), joe@example.org;'); is($cc->string, "Cc: $c2"); $cc->beautify; is($cc->string, <<'REFOLDED'); Cc: Pete , A Group: "Chris Jones" , John (my dear friend), joe@example.org; REFOLDED #Cc:(Empty list)(start)Undisclosed recipients :(nobody(that I know)) ; #From : John Doe #Mary Smith <@machine.tld:mary@example.net>, , jdoe@test . example # test =???= encoding in the phrase my $encd = '"=?GB2312?B?yOe6zrncwO1tbTS6w7T9tqjO78a3us2yu8Tc08PO78a3?=" '; my $e = $mmfas->new(From => $encd); isa_ok($e, $mmfas, 'read encoded'); @a = $e->addresses; cmp_ok(scalar @a, '==', 1); my $a = $a[0]; my $name = $a->name; cmp_ok(length $name, '==', 18, $name); ok(is_utf8($name), 'is utf8'); # Some bug reported by Andrew 2012-07-18 my $two = 'valid , more '; my $msg = Mail::Message->read(<<_MSG); Subject: test From: =?utf-8?B?6ZOg6L6J5Zu96ZmF6LSn6L+Q?= From: $two From: Jay Lundelius <> hey _MSG { my $head = $msg->head; my @from = $head->study('from'); # list context cmp_ok(scalar @from, '==', 3); cmp_ok(scalar $from[0]->addresses, '==', 0, 'invalid address'); cmp_ok(scalar $from[1]->addresses, '==', 2, 'valid addresses'); cmp_ok(scalar $from[2]->addresses, '==', 0, 'invalid address'); my $from = $head->study('from'); # scalar context # returns last, but only invalid # is($from, $two, 'scalar'); } Mail-Box-2.118/tests/14fieldu/31struct.t0000644000175000001440000001120412473603434020313 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test processing of general structured fields # use strict; use warnings; package Mail::Message::Field::Structured; package main; use lib qw(. .. tests); use Tools; use Test::More; BEGIN { if($] < 5.007003) { plan skip_all => "Requires module Encode which requires Perl 5.7.3"; exit 0; } eval 'require Mail::Message::Field::Structured'; if($@) { plan skip_all => 'Extended attributes not available (install Encode?)'; exit 0; } else { plan tests => 64; } } my $mmff = 'Mail::Message::Field::Full'; my $mmfs = 'Mail::Message::Field::Structured'; my $mmfa = 'Mail::Message::Field::Attribute'; # # Test construction with simple body # my $a = $mmfs->new('a', 'new'); ok(defined $a, "Created simplest version"); isa_ok($a, $mmfs); isa_ok($a, $mmff); is($a->name, 'a', "Name of a"); is($a->unfoldedBody, 'new', "Unfolded body a"); my @al = $a->foldedBody; cmp_ok(@al, '==', 1, "Folded body of a"); is($al[0], " new\n"); my $b = $mmfs->new('b'); ok(defined $b, "No body specified: later"); # # LINE without new lines (no folds) # $b = $mmfs->new('b: new'); ok(defined $b, "Created b with body split"); isa_ok($b, $mmfs); isa_ok($b, $mmff); is($b->name, 'b', "Name of b"); is($b->unfoldedBody, 'new', "Unfolded body b"); my @bl = $b->foldedBody; cmp_ok(@bl, '==', 1, "Folded body of b"); is($bl[0], " new\n"); # # LINE with new-lines (folds) # my $c = $mmfs->new("c: new\n line\n"); ok(defined $c, "Created c with body split"); isa_ok($c, $mmfs); isa_ok($c, $mmff); is($c->name, 'c', "Name of c"); is($c->unfoldedBody, 'new line', "Unfolded body c"); my @cl = $c->foldedBody; cmp_ok(@cl, '==', 2, "Folded body of c"); is($cl[0], " new\n", "Folded c line 1"); is($cl[1], " line\n", "Folded c line 2"); # # Constructing # my $d = $mmfs->new('d'); ok(defined $d, "Created d"); is($d->unfoldedBody, "", "Empty body"); is($d->foldedBody, " \n", "Empty body"); is($d->datum('text/html'), 'text/html', "Set datum"); $d->beautify; # required to re-generate is($d->produceBody, "text/html", "Check datum"); is($d->unfoldedBody, "text/html"); is($d->foldedBody, " text/html\n"); ok(! defined $d->attribute('unknown'), "No attributes yet"); cmp_ok(scalar $d->attributes, '==', 0); my $da = $d->attribute(filename => 'virus.exe'); isa_ok($da, 'Mail::Message::Field::Attribute'); is($d->produceBody, 'text/html; filename="virus.exe"'); is($d->unfoldedBody, 'text/html; filename="virus.exe"'); is($d->foldedBody, qq# text/html; filename="virus.exe"\n#); # # Parsing # my $body = "(comment1)bod(aa)y(comment2); (comment3)attr1=aaa(comment4); attr2=\"b\"; attr3='c'"; my $e = $mmfs->new("e: $body\n"); ok(defined $e, "field with attributes"); is($e->datum, 'body', "Check datum"); my @attrs = $e->attributes; cmp_ok(scalar @attrs, '==', 3, "All attributes"); ok(defined $e->attribute('attr1'), "attr1 exists"); isa_ok($e->attribute('attr1'), $mmfa); is($e->attribute('attr1')->value, 'aaa',"attr1 value"); ok(defined $e->attribute('attr2'), "attr2 exists"); isa_ok($e->attribute('attr2'), $mmfa); is($e->attribute('attr2')->value, 'b', "attr2 value"); ok(defined $e->attribute('attr3'), "attr3 exists"); isa_ok($e->attribute('attr3'), $mmfa); is($e->attribute('attr3')->value, 'c', "attr3 value"); is($e->unfoldedBody, "$body", "unfolded not changed"); is($e->foldedBody, " $body\n", "folded not changed"); $e->beautify; is($e->unfoldedBody, "body; attr1=aaa; attr2=b; attr3='c'", "unfolded beautyfied"); is($e->foldedBody, " body; attr1=aaa; attr2=b; attr3='c'\n", "folded beautyfied"); # ## errors # my $f = $mmfs->new('f: c; a="missing quote'); # bug report #31017 ok(defined $f, 'missing quote'); is($f->unfoldedBody, 'c; a="missing quote'); is($f->foldedBody, " c; a=\"missing quote\n"); my $fa = $f->attribute('a'); ok(defined $fa, 'f attribute a'); is($fa->string, '; a=missing quote'); is($fa->value, 'missing quote'); my $g = $mmfs->new('g: c; a="with []"'); # bug report #31912 ok(defined $g, '[]'); my $ga = $g->attribute('a'); ok(defined $ga); is($ga->value, 'with []'); my $gb = $mmfs->new('g: c; filename=xxxx[1].pif'); ok(defined $gb, 'xxxx[1].pif'); my $gc = $gb->attribute('filename'); ok(defined $gc); is($gc->value, 'xxxx[1].pif'); Mail-Box-2.118/tests/14fieldu/30unstr.t0000644000175000001440000000500412473603434020142 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test processing of unstructured fields # use strict; use warnings; package Mail::Message::Field::Unstructured; # define package name package main; use lib qw(. .. tests); use Tools; use Test::More; BEGIN { if($] < 5.007003) { plan skip_all => "Requires module Encode which requires Perl 5.7.3"; exit 0; } eval 'require Mail::Message::Field::Unstructured'; if($@) { plan skip_all => 'Extended attributes not available (install Encode?)'; exit 0; } else { plan tests => 30; } } my $mmff = 'Mail::Message::Field::Full'; my $mmfu = 'Mail::Message::Field::Unstructured'; # # Test construction with simple body # my $a = $mmfu->new('a', 'new'); ok(defined $a, "Created simplest version"); isa_ok($a, $mmfu); isa_ok($a, $mmff); is($a->name, 'a', "Name of a"); is($a->unfoldedBody, 'new', "Unfolded body a"); my @al = $a->foldedBody; cmp_ok(@al, '==', 1, "Folded body of a"); is($al[0], " new\n"); my $b = $mmfu->new('b'); ok(defined $b, "No body specified: later"); # # LINE without new lines (no folds) # $b = $mmfu->new('b: new'); ok(defined $b, "Created b with body split"); isa_ok($b, $mmfu); isa_ok($b, $mmff); is($b->name, 'b', "Name of b"); is($b->unfoldedBody, 'new', "Unfolded body b"); my @bl = $b->foldedBody; cmp_ok(@bl, '==', 1, "Folded body of b"); is($bl[0], " new\n"); # # LINE with new-lines (folds) # my $c = $mmfu->new("c: new\n line\n"); ok(defined $c, "Created c with body split"); isa_ok($c, $mmfu); isa_ok($c, $mmff); is($c->name, 'c', "Name of c"); is($c->unfoldedBody, 'new line', "Unfolded body c"); my @cl = $c->foldedBody; cmp_ok(@cl, '==', 2, "Folded body of c"); is($cl[0], " new\n", "Folded c line 1"); is($cl[1], " line\n", "Folded c line 2"); # # Test encoding of line with separate body # my $d = $mmfu->new("d", "a\x{E4}b", charset => 'iso-8859-1'); ok(defined $d, "Created d with included stranger"); isa_ok($d, $mmfu); is($d->name, 'd', "Name of d"); is($d->unfoldedBody, '=?iso-8859-1?q?a=E4b?=', "Unfolded body d"); my @dl = $d->foldedBody; cmp_ok(@dl, '==', 1, "Folded body of d"); is($dl[0], " =?iso-8859-1?q?a=E4b?=\n", "Folded d line 0"); is($d->decodedBody, "a\x{E4}b"); Mail-Box-2.118/tests/14fieldu/12full_ru.t0000644000175000001440000000211512473603434020437 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test processing of full fields with russian chars in utf-8. # use strict; use warnings; package Mail::Message::Field::Structured; # define package name package main; use lib qw(. .. tests); use Tools; use utf8; use Test::More; BEGIN { if($] < 5.007003) { plan skip_all => "Requires module Encode which requires Perl 5.7.3"; exit 0; } eval 'require Mail::Message::Field::Structured'; if($@) { plan skip_all => 'Extended attributes not available (install Encode?)'; exit 0; } else { plan tests => 3; } } my $mmfs = 'Mail::Message::Field::Structured'; my $r = $mmfs->new('r', ''); isa_ok($r, $mmfs); my $text_ru = "Раньше длинные multibyte-последовательности кодировались неправильно, теперь должно работать."; is($r->decode($r->encode($text_ru, charset => 'utf-8', encoding => 'q')), $text_ru, 'encode/decode to/from QP'); is($r->decode($r->encode($text_ru, charset => 'utf-8', encoding => 'b')), $text_ru, 'encode/decode to/from Base64'); Mail-Box-2.118/tests/45dbx/0000755000175000001440000000000012473604501015745 5ustar00markovusers00000000000000Mail-Box-2.118/tests/45dbx/Definition.pm0000644000175000001440000000075412473604424020405 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::45dbx::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Box::Dbx; Outlook Express folders"} sub critical {0} sub skip { eval "require Mail::Transport::Dbx"; return "Mail::Transport::Dbx is not installed or gives errors." if $@; undef; } 1; Mail-Box-2.118/tests/45dbx/10read.t0000644000175000001440000000541412473603434017216 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test reading of dbx folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use File::Compare; use File::Temp qw(tempdir tempfile); BEGIN { eval { require Mail::Box::Dbx }; if($@ || Mail::Box::Dbx->type ne 'dbx') { plan(skip_all => 'Mail::Box::Dbx is not installed'); exit 0; } elsif(not (-d '45dbx/testfolders' || -d 'tests/45dbx/testfolders')) { plan(skip_all => 'dbx test folders are not distributed'); exit 0; } plan tests => 22; } my $test = 'MBOX'; # folder to copy to #my $test = 'MH'; my $temp = 'dbxtest'; sub be_sure_its_clean() { if($test eq 'MH') { clean_dir $temp } else { unlink $temp; clean_dir "$temp.d"; } } be_sure_its_clean; my @src = (folderdir => '45dbx/testfolders'); ok(Mail::Box::Dbx->foundIn('Folder.dbx'), 'check foundIn'); ok(!Mail::Box::Dbx->foundIn('Folder.mbox'), 'check foundIn'); # # The folder is read. # my $folder = Mail::Box::Dbx->new ( @src , lock_type => 'NONE' , extract => 'ALWAYS' ); ok(defined $folder, 'check success open folder'); exit 1 unless defined $folder; ok(! $folder->isModified); is($folder->organization, 'FILE', 'folder organization FILE'); cmp_ok($folder->messages , "==", 0, 'found no messages'); my @subf = $folder->listSubFolders; cmp_ok(@subf, '==', 9493, 'many subfolders'); @subf = $folder->listSubFolders(check => 1); cmp_ok(@subf, '==', 6, 'few real subfolders'); @subf = $folder->listSubFolders(skip_empty => 1); cmp_ok(@subf, '==', 5, 'few filled subfolders'); # get a subfolder my $comp = $folder->openSubFolder('comp.lang.perl.misc'); ok(defined $comp, 'open large subfolder'); cmp_ok($comp->messages, '==', 300, '300 messages!'); my $message = $comp->message(10); ok($message->head->isDelayed, 'delayed head'); ok($message->body->isDelayed, 'delayed body'); is($message->subject, 'search and replace problem', 'subject'); ok(! $message->head->isDelayed, 'realized head'); ok(! $message->body->isDelayed, 'realized body'); ok(! $folder->isModified); #$message->print; my $out; if($test eq 'MH') { require Mail::Box::MH; $out = Mail::Box::MH->new(folder => $temp, create => 1, access => 'w'); } else { require Mail::Box::Mbox; $out = Mail::Box::Mbox->new(folder => $temp, create => 1, access => 'w', log => 'DEBUG'); } die "Cannot create temporary folder $temp: $!\n" unless defined $out; ok($folder->copyTo($out), "Copy succesful"); cmp_ok(scalar $out->messages, '==', scalar $folder->messages); cmp_ok(scalar $out->messages, '==', 0); ok(!$folder->isModified); ok(!$comp->isModified); $comp->close; $out->close; $folder->close; be_sure_its_clean; exit 0; Mail-Box-2.118/tests/13body/0000755000175000001440000000000012473604501016120 5ustar00markovusers00000000000000Mail-Box-2.118/tests/13body/Definition.pm0000644000175000001440000000056212473604424020555 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::13body::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Message::Body; message bodies"} sub critical {1} sub skip { undef } 1; Mail-Box-2.118/tests/13body/30file.t0000644000175000001440000000537612473603434017406 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test processing of message bodies which have their content stored # in a file. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 33; use IO::Scalar; use Mail::Message::Body::File; # Test to read a Lines from file. # Let's fake the file, for simplicity. my $filedata = <<'SIMULATED_FILE'; This is a file with five lines, and it is used to test whether the reading into a lines body would work (or not) SIMULATED_FILE # Test script has Unix line endings (LF) even under Windows. # Replace LF by CRLF if running under Windows, # so the file is truly a Windows file: $filedata =~ s/\n/\r\n/gs if $Mail::Message::crlf_platform; my $f = IO::Scalar->new(\$filedata); my $body = Mail::Message::Body::File->new(file => $f); ok($body, 'body creation from file'); is($body->string, $filedata, 'stringify'); cmp_ok($body->nrLines, "==", 5, 'nr lines'); # Mail::Message::Body::File::size() substracts 1 per line (for CR) on Windows my $body_length = length $filedata; $body_length -= $body->nrLines if $Mail::Message::crlf_platform; cmp_ok($body->size, "==", $body_length, 'size'); my $fakeout; my $g = IO::Scalar->new(\$fakeout); $body->print($g); is($fakeout, $filedata, 'print'); my @lines = $body->lines; cmp_ok(@lines, "==", 5, 'count of lines'); my @filedata = split /^/, $filedata; cmp_ok(@filedata, "==", 5, 'count expected lines'); foreach (0..4) { is($lines[$_], $filedata[$_], "line $_") } # Reading data from lines. $body = Mail::Message::Body::File->new(data => [@filedata]); ok($body, 'creation from array of lines'); is($body->string, $filedata, 'data'); cmp_ok($body->nrLines, "==", 5, 'nr lines'); cmp_ok($body->size, "==", $body_length, 'size'); $fakeout = ''; $body->print($g); is($fakeout, $filedata, 'result print'); @lines = $body->lines; cmp_ok(@lines, "==", 5, 'count of lines'); foreach (0..4) { is($lines[$_], $filedata[$_], "line $_") } # Test overloading is("$body", $filedata, 'overloaded stringification'); @lines = @$body; ok(@lines, 'overloaded ref array'); cmp_ok(@lines, "==", 5, 'count of lines'); foreach (0..4) { is($lines[$_], $filedata[$_], "line $_") } # Test cleanup my $filename = $body->tempFilename; ok(-f $filename, 'filename exists'); undef $body; ok(! -f $filename, 'file cleaned up'); Mail-Box-2.118/tests/13body/10string.t0000644000175000001440000000300512473603434017756 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test processing of message bodies which have their content stored # in a single string. This does not test the reading of the bodies # from file. # use strict; use warnings; use lib qw(. .. tests); use Tools; use IO::Scalar; use Test::More tests => 30; use Mail::Message::Body::String; # Test to read a scalar from file. # Let's fake the file, for simplicity. my $filedata = <<'SIMULATED_FILE'; This is a file with five lines, and it is used to test whether the reading into a scalar body would work (or not) SIMULATED_FILE my @filedata = split /^/, $filedata; cmp_ok(@filedata, '==', 5); my $f = IO::Scalar->new(\$filedata); my $body = Mail::Message::Body::String->new(file => $f); ok(defined $body); is($body->string, $filedata); cmp_ok($body->nrLines, '==', 5); cmp_ok($body->size, '==', length $filedata); my $fakeout; my $g = IO::Scalar->new(\$fakeout); $body->print($g); is($fakeout, $filedata); my @lines = $body->lines; cmp_ok(@lines, '==', 5); foreach (0..4) { is($lines[$_], $filedata[$_]) } # Reading data from lines. $body = Mail::Message::Body::String->new(data => [@filedata]); ok($body); is($body->string, $filedata); cmp_ok($body->nrLines, '==', 5); cmp_ok($body->size, '==', length $filedata); $fakeout = ''; $body->print($g); is($fakeout, $filedata); @lines = $body->lines; cmp_ok(@lines, '==', 5); foreach (0..4) { is($lines[$_], $filedata[$_]) } # Test overloading is("$body", $filedata); @lines = @$body; cmp_ok(@lines, '==', 5); foreach (0..4) { is($lines[$_], $filedata[$_]) } Mail-Box-2.118/tests/13body/20lines.t0000644000175000001440000000435212473603434017571 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test processing of message bodies which have their content stored # in an array. This does not test the reading of the bodies # from file. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 30; use IO::Scalar; use Mail::Message::Body::Lines; # Test to read a Lines from file. # Let's fake the file, for simplicity. my $filedata = <<'SIMULATED_FILE'; This is a file with five lines, and it is used to test whether the reading into a lines body would work (or not) SIMULATED_FILE my $f = IO::Scalar->new(\$filedata); my $body = Mail::Message::Body::Lines->new(file => $f); ok($body, "body from file is true"); is($body->string, $filedata, "body strings to data"); cmp_ok($body->nrLines, "==", 5, "body reports 5 lines"); cmp_ok($body->size, "==", length $filedata, "body size as data"); my $fakeout; my $g = IO::Scalar->new(\$fakeout); $body->print($g); is($fakeout, $filedata, "body prints right data"); my @lines = $body->lines; cmp_ok(@lines, "==", 5, "body produces five lines"); my @filedata = split /^/, $filedata; cmp_ok(@filedata, "==", 5, "data 5 lines"); foreach (0..4) { is($lines[$_], $filedata[$_], "expected line $_") } # Reading data from lines. $body = Mail::Message::Body::Lines->new(data => [@filedata]); ok($body, "body from array is true"); is($body->string, $filedata, "body string is data"); cmp_ok($body->nrLines, "==", 5, "body reports 5 lines"); cmp_ok($body->size, "==", length $filedata, "body reports correct size"); $fakeout = ''; $body->print($g); is($fakeout, $filedata, "body prints to data"); @lines = $body->lines; cmp_ok(@lines, "==", 5, "body produces 5 lines"); foreach (0..4) { is($lines[$_], $filedata[$_], "body line $_") } # Test overloading is("$body", $filedata, "stringification"); @lines = @$body; cmp_ok(@lines, "==", 5, "overload array-deref"); foreach (0..4) { is($lines[$_], $filedata[$_], "overload array $_") } Mail-Box-2.118/tests/13body/40multip.t0000644000175000001440000001243612473603434017775 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test processing of multipart message bodies. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 33; use IO::Scalar; use Mail::Message::Body::Lines; use Mail::Message::Body::Multipart; use Mail::Message::Head::Complete; my $body = Mail::Message::Body::Multipart->new ( transfer_encoding => '8bit' , boundary => 'xyz' ); is($body->boundary, 'xyz'); $body->boundary('part-separator'); is($body->boundary, 'part-separator'); is($body->mimeType, 'multipart/mixed', 'is multipart mixed'); my $h1 = Mail::Message::Head::Complete->new; my $b1 = Mail::Message::Body::Lines->new ( data => ["p1 l1\n", "p1 l2\n" ] , checked => 1 , mime_type => 'text/html' , transfer_encoding => '8bit' ); ok($b1, 'body 1'); is($b1->mimeType, 'text/html'); is($b1->transferEncoding, '8bit'); is($b1->disposition, 'none'); my $p1 = Mail::Message->new(head => $h1); is($b1->charset, 'PERL'); my $b1b = $p1->body($b1); is($b1b->charset, 'utf-8'); #$p1->print; is($p1->get('Content-Transfer-Encoding'), '8bit'); ok(! defined $p1->get('Content-Disposition')); my $h2 = Mail::Message::Head::Complete->new; my $b2 = Mail::Message::Body::Lines->new ( data => ["p2 l1\n", "p2 l2\n", "p2 l3\n", "p2 l4\n" ] , mime_type => 'text/plain' , checked => 1 , transfer_encoding => '8bit' ); ok($b2, 'body 2'); my $p2 = Mail::Message->new(head => $h2); is($b2->charset, 'PERL'); my $b2b = $p2->body($b2); is($b2b->charset, 'utf-8'); # Empty multipart my $fakeout; my $g = IO::Scalar->new(\$fakeout); cmp_ok($body->parts, "==", 0); $body->print($g); is($fakeout, "--part-separator--"); # First attachment $fakeout = ''; my $newbody = $body->attach($p1); ok($newbody != $body); cmp_ok($newbody->parts, "==", 1); $newbody->print($g); compare_message_prints($fakeout."\n", <<'EXPECTED', 'print with attachment'); --part-separator Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 8bit p1 l1 p1 l2 --part-separator-- EXPECTED # Second attachment my $newerbody = $newbody->attach($p2); ok($newerbody != $newbody); cmp_ok($newerbody->parts, "==", 2); $fakeout = ''; $newerbody->print($g); compare_message_prints($fakeout."\n", <<'EXPECTED', 'print with two attachments'); --part-separator Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 8bit p1 l1 p1 l2 --part-separator Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit p2 l1 p2 l2 p2 l3 p2 l4 --part-separator-- EXPECTED # Add preamble and epilogue my $newestbody = ref($newerbody)->new ( based_on => $newerbody , preamble => Mail::Message::Body::Lines->new ( data => [ "preamb1\n", "preamb2\n" ] , mime_type => 'text/html' , charset => 'us-ascii' , tranfer_encoding => '8bit' ) , epilogue => Mail::Message::Body::Lines ->new(data => [ "epilogue\n" ]) ); ok($newestbody != $newbody); $fakeout = ''; $newestbody->print($g); compare_message_prints($fakeout, <<'EXPECTED', 'with preamble and epilogue'); preamb1 preamb2 --part-separator Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 8bit p1 l1 p1 l2 --part-separator Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit p2 l1 p2 l2 p2 l3 p2 l4 --part-separator-- epilogue EXPECTED # Body to message. The info on preamble is used to create a whole message # header. my $message = Mail::Message->buildFromBody($newestbody, From => 'me', To => 'you', Date => 'now', 'Message-Id' => ''); $fakeout = ''; $message->print($g); compare_message_prints($fakeout, <<'EXPECTED', 'build from multipart body'); From: me To: you Date: now Message-Id: Content-Type: multipart/mixed; boundary="part-separator" Content-Transfer-Encoding: 8bit MIME-Version: 1.0 preamb1 preamb2 --part-separator Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 8bit p1 l1 p1 l2 --part-separator Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit p2 l1 p2 l2 p2 l3 p2 l4 --part-separator-- epilogue EXPECTED ### since 2.106: check partnumbers my $pn = $message->partNumber; defined $pn or $pn = 'undef'; cmp_ok($pn, 'eq', 'undef', 'partnr of top is undef'); cmp_ok($message->body->part(0)->partNumber, 'eq', '1', 'partNumber 1'); cmp_ok($message->body->part(1)->partNumber, 'eq', '2', 'partNumber 2'); my $m1 = Mail::Message->buildFromBody($body, From => 'me', To => 'you', Date => 'now', 'Message-Id' => ''); $fakeout = ''; $m1->print($g); compare_message_prints($fakeout."\n", <<'EXPECTED', 'build from multipart body'); From: me To: you Date: now Message-Id: Content-Type: multipart/mixed; boundary="part-separator" Content-Transfer-Encoding: 8bit MIME-Version: 1.0 --part-separator-- EXPECTED my $m2 = Mail::Message->buildFromBody($b1, From => 'me', To => 'you', Date => 'now', 'Message-Id' => ''); $fakeout = ''; $m2->print($g); compare_message_prints($fakeout, <<'EXPECTED', 'build from multipart body'); From: me To: you Date: now Message-Id: Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 8bit MIME-Version: 1.0 p1 l1 p1 l2 EXPECTED # # Check copying. # my $m3 = $message->clone; ok($m3); ok($m3 != $message); cmp_ok($m3->parts , "==", $message->parts); Mail-Box-2.118/tests/43pop3/0000755000175000001440000000000012473604501016047 5ustar00markovusers00000000000000Mail-Box-2.118/tests/43pop3/Definition.pm0000644000175000001440000000055412473604424020505 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::43pop3::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Box::POP3; pop3 folders"} sub critical {0} sub skip { undef } 1; Mail-Box-2.118/tests/43pop3/server0000644000175000001440000005000412473603434017303 0ustar00markovusers00000000000000=head1 NAME t/server/start - simple POP3 server for testing Mail::Transport::POP3 =head1 SYNOPSIS open( $pop3,"$^X t/server/start t/messages | " ); open( $pop3,"$^X t/server/start t/messages minimal | " ); open( $pop3,"$^X t/server/start t/messages apoponly | " ); open( $pop3,"$^X t/server/start t/messages autodelete | " ); open( $pop3,"$^X t/server/start t/messages noextra | " ); open( $pop3,"$^X t/server/start t/messages standardport | " ); =head1 DESCRIPTION This POP3 server is created for testing the Mail::Transport::POP3 only. It B as real POP3 server (yet). The server takes on a randomly selected, free port to prevent interference with existing applications. Start the server by running this script from another script while capturing the output to STDOUT, e.g. like: open( my $pop3,"$^X t/server/start t/messages |" ) or die "Could not start POP3 server: $!\n"; my $port = <$pop3>; The returned $pop3 file handle produces informational texts: it will tell you the port which is occupied by the server, and when the server shuts down. It will also report some statistics on the performance of the server. The server will be bound to localhost (127.0.0.1) at the port number of the first line that is printed to STDOUT by this script. The first parameter to the script indicates the directory in which the actual messages (each message as a seperate file) are located. In the example, this is "t/messages". Any other parameters to the script are optional: they consist of keywords to indicate any settings or peculiarities of certain POP3 server implementations. The following keywords are recognised: =over 2 =item minimal If the keyword "minimal" is specified, only the minimal set of POP3 commands will be allowed (i.e. USER, PASS, STAT, LIST, RETR, DELE, RSET, NOOP and QUIT). The optional POP3 commands (APOP, TOP and UIDL) are also supported if this keyword is B specified. =item apoponly If the keyword "apoponly" is specified, then authorization will only be allowed with the APOP command (i.e. authorization with USER will yield a negative response). Please note that you cannot use this together with the "minimal" keyword, as APOP is one of the optional POP3 commands (which is excluded if you use the "minimal" keyword). =item autodelete If the keyword "autodelete" is specified, any messages that are completely retrieved with RETR or TOP (without specification of number of lines in the body to return) will be automatically marked for deletion. This will cause those messages to be deleted if the session is finished with a QUIT command. This coincides with system resource restrictions imposed by some providers. =item noextra If the keyword "noextra" is specified, then all messages will be served with a check for a CRLF pair at the end of the original messasge: if a CRLF is found, then only ".\r\n" will be added to indicate the end of a message that are retrieved with RETR or TOP. =item standardport If the keyword "standardport" is specified, then an attempt will be made to start the POP3 server on port 110, the standard POP3 port. Please note that this will only be successful if the current user has sufficient privileges (usually only the root user will be allowed to listen on ports < 1024). =back User name is always "user" and the correct password is always "password". Any other combination will always fail. APOP authorization can be used if the "minimal" keyword is B specified. The following script will help you in debugging APOP authorization: use Digest::MD5 qw(md5_hex); while (<>) { s#\r?\n?$##s; print md5_hex( $_.'password' )."\n"; } Copy the string that was sent by the initial greeting of the server (including the <> brackets), paste this into the running script, press ENTER. The script will respond with a 32 character hexadecimal string. Copy that and the enter the authorization thus: APOP user 0123456789abcdef0123456789abcdef Note that the above hex string is only an example of course. The following commands do B exist in the POP3 protocol, but are intended to simulate certain events. The BREAK command can be used to simulate the breaking of a connection. After a BREAK is received, the connection is broken by the server (without sending a response to the client). No messages will be deleted even if any messages were marked for deletion. This can also be used to simulate a timeout, of course. The EXIT command can be used for test-suites: when sent from the client, it will cause the server to shut down (as if an EXIT was sent) whenever the client does a QUIT command. When the servers shuts down, its prints its statistics on STDOUT. Statistics returned are: - number of succesful logins - each command + frequency in alphabetical order so a statistics list for one successful session could be: 1 DELE 102 EXIT 1 LIST 1 PASS 1 QUIT 1 RETR 102 STAT 1 UIDL 1 USER 1 =cut # Make sure we do everything by the book # Make sure we can do sockets # Make sure we can do digests use strict; use IO::Socket; use Digest::MD5 qw(md5_hex); # Obtain the directory to work on # Remove trailing slash if any # Die now if there is no directory # Die now if we can't work with it my $directory = shift; $directory =~ s#/$##; die qq(Must specify directory to work with\n) unless $directory; die qq(Trouble using directory "$directory": $!\n) unless -d $directory and -w _; # Initialize the flag settings my $minimal = 0; my $apoponly = 0; my $autodelete = 0; my $noextra = 0; my $exitonquit = 0; my $exitnow = 0; my @port; # While there are keywords specified # Set appropriate flags if so specified while (my $keyword = shift) { $minimal = ($keyword eq 'minimal'); $apoponly = ($keyword eq 'apoponly'); $autodelete = ($keyword eq 'autodelete'); $noextra = ($keyword eq 'noextra'); @port = qw(LocalPort 110) if $keyword eq 'standardport'; } # Make sure no buffering takes place # Create a server that can only take one connection at a time $| = 1; my $server = IO::Socket::INET->new( Type => SOCK_STREAM, Listen => 1, @port, ) or die "Couldn't start a POP3 server:\n $@\n"; # Find out the port we're running on # Let the caller know which port we're running on my $port = $server->sockport; print "$port\n"; # Initialize the connected flag # Initialize the list of available messages # Initialize the hash of message ordinal numbers to delete # Initialize the hash of message ordinal numbers to delete automatically my $connected = 0; my @message; my %delete; my %autodelete; # Initialize user # Initialize digest password field (used by APOP only) # Initialize the line ending on output my $user = ''; my $digest; my $lf = "\x0D\x0A"; # always CRLF # Number of successful logins performed # Hash with frequency of each command my $logins = 0; my %command; # While the server is running and we got a new client # Initialize the APOP initialization string # If this is a minimal POP3 server # Don't make it appear we can do POP3 # Else # Create the APOP authentication string # Let the client know we're there and we can do APOP SERVER: while (my $client = $server->accept()) { my $apop = ''; if ($minimal) { print $client qq(+OK Welcome to the test-suite POP3 server$lf); } else { $apop = "<$$.".time().'@localhost>'; print $client qq(+OK $apop$lf); } # Obtain list of files in message directory # Reset the messages to be (automatically) deleted hashes @message = <$directory/*>; %autodelete = %delete = (); # While the client is asking us stuff to do # Lose the line ending (whatever it is) # Split into a command and parameters # Make sure the command is always uppercase (easier checks later) # Make sure the parameters are defined (if empty) while (<$client>) { s#\r?\n$##s; my ($command,$parameters) = split( /\s+/,$_,2 ); $command = uc($command); $parameters = '' unless defined($parameters); # Count this command for the statistics # Outloop if quitting this client $command{$command}++; last if $command eq 'BREAK'; # If we're connected # Allow for variable references # If there is a subroutine for this command # Execute it with the given parameters and return result # Send result to client if there is something to connect # Stop server is so requested # Outloop if we're no longer connected # Else # Indicate it's not implemented if ($connected) { no strict 'refs'; if (exists( &$command )) { my @return = &{$command}( split( /\s+/,$parameters ) ); print $client @return if @return; last SERVER if $exitnow; last unless $connected; } else { print $client "-ERR unimplemented$lf"; } # Elseif we're quitting without a connection # Show that we agree # And outloop } elsif ($command eq 'QUIT') { print $client "+OK$lf"; last; # Elseif we're trying APOP authentication # If we have a minimal POP3 server # Show that this isn't implemented # And reloop } elsif ($command eq 'APOP') { if ($minimal) { print $client "-ERR unimplemented$lf"; next; } # Obtain the user name and the digest # Log the user in if client gives the right credentials # Send the result to the client ($user,$digest) = split( /\s+/,$parameters ); my @return = login( $user eq 'user' and $digest eq md5_hex( $apop.'password') ); print $client @return; # Elseif we have a user name (and we're not connected yet) # Log the user in if client gives the right credentials now and before # Send the result to the client } elsif ($user) { my @return = login( $command eq 'PASS' and $user eq 'user' and $parameters eq 'password' ); print $client @return; # Elseif the user name is passed (and none given before) # If we only allow APOP # Let the client know it's not ok # Else # Save the user name (for later checking with PASS) # Let the client know it's ok so far } elsif ($command eq 'USER') { if ($apoponly) { print $client "-ERR APOP authorization allowed only$lf"; } else { $user = $parameters; print $client "+OK$lf"; } # Elseif the password is given (but no user name before) # Let the client know it's wrong # Else (attempting to do anything else without authorization) # Let the client know it's wrong } elsif ($command eq 'PASS') { print $client "-ERR user first$lf"; } else { print $client "-ERR authorization first$lf"; } } # Reset user name # Reset connected flag # Shut down the client connection $user = ''; $connected = 0; close( $client ); } # Show number of successful logins # For all the commands that were issued # Return name and frequency of it # And shut down the server print "$logins\n"; foreach (sort keys %command) { print "$_ $command{$_}\n"; } close($server); #------------------------------------------------------------------------ # OUT: 1 whatever needs to be sent to client sub STAT { # Initialize number of messages # Initialize number of bytes they have # Initialize ordinal number my $messages = 0; my $octets = 0; my $ordinal = 0; # For all of the messages # Reloop if message marked as delete, incrementing ordina on the fly # Increment number of messages # Add number of bytes # Return the result foreach (@message) { next if exists( $delete{$ordinal++} ); $messages++; $octets += -s; } return "+OK $messages $octets$lf"; } #STAT #------------------------------------------------------------------------ # OUT: 1 whatever needs to be sent to client sub UIDL { # Return now if running a minimal POP3 server return "-ERR unimplemented$lf" if $minimal; # Initialize message number # If a number was specified # Obtain ordinal number and possible error message # Return error message if there is one # Return the message number and the identifier of the message otherwise my $number = shift; if (defined($number)) { my ($ordinal,$error) = ordinal( $number,1 ); return $error if $error; return "+OK $number $message[$ordinal]$lf"; } # Initialize ordinal number # Initialize text to be returned # For all of the messages # Reloop if message marked as deleted, incrementing ordinal on the fly # Add the ordinal number and the identifier (just use filename for that) # Return the result with an extra . at the end to indicate end of list my $ordinal = 0; my $text = "+OK$lf"; foreach (@message) { next if exists( $delete{$ordinal++} ); $text .= "$ordinal $_$lf"; # external numbers 1-based, internal 0-based } return "$text.$lf"; } #UIDL #------------------------------------------------------------------------ # IN: 1 message to obtain (optionally) # OUT: 1 whatever needs to be sent to client sub LIST { # Initialize message number # If a number was specified # Obtain ordinal number and possible error message # Return error message if there is one # Return the message number and size of message otherwise my $number = shift; if (defined($number)) { my ($ordinal,$error) = ordinal( $number,1 ); return $error if $error; return "+OK $number ".(-s $message[$ordinal]).$lf; } # Initialize ordinal number # Initialize text to be returned # For all of the messages # Reloop if message marked as deleted, incrementing ordinal on the fly # Add the ordinal number and the identifier (just use filename for that) # Return the result with an extra . at the end to indicate end of list my $ordinal = 0; my $text = "+OK$lf"; foreach (@message) { next if exists( $delete{$ordinal++} ); $text .= "$ordinal ".(-s).$lf; # external numbers 1-based, internal 0-based } return "$text.$lf"; } #LIST #------------------------------------------------------------------------ # IN: 1 ordinal number of message to retrieve # OUT: 1 whatever needs to be sent to client sub RETR { # Obtain ordinal number and possible error message # Return now if there was an error message my ($ordinal,$error) = ordinal( shift,1 ); return $error if $error; # Open file for reading or return with empty message # Initialize text to be returned # While there are lines to be returned # Make sure any period at the start of the line becomes a double period # Add the line to the text to be returned open( my $handle,'<',$message[$ordinal] ) or return "+OK$lf.$lf"; my $text = "+OK$lf"; while (<$handle>) { s#^\.#..#; $text .= $_; } # Mark this message to be deleted automatically if flag set # Add the right marker to the text # Return the finished text $autodelete{$ordinal} = undef if $autodelete; addmarker( \$text ); $text; } #RETR #------------------------------------------------------------------------ # IN: 1 ordinal number of message to retrieve # 2 number of lines of the message to retrieve # OUT: 1 whatever needs to be sent to client sub TOP { # Return now if running a minimal POP3 server # Obtain ordinal number and possible error message # Return now if there was an error message return "-ERR unimplemented$lf" if $minimal; my ($ordinal,$error) = ordinal( shift,1 ); return $error if $error; # Open file for reading or return with empty message # Initialize text to be returned open( my $handle,'<',$message[$ordinal] ) or return "+OK$lf.$lf"; my $text = "+OK$lf"; # Obtain the number of lines # If a number of lines was specified # While there are lines to be returned # Make sure any period at the start of the line becomes a double period # Add the line to the text to be returned # Outloop if we're reached the end of the headers my $lines = shift; if (defined($lines)) { while (<$handle>) { s#^\.#..#; $text .= $_; last if m#^\s+$#s; } # While there are lines to be fetched # Outloop if no line left to be fetched # Make sure any period at the start of the line becomes a double period # Add the line to the text to be returned while ($lines--) { last unless defined($_ = <$handle>); s#^\.#..#; $text .= $_; } # Else (no limit) # While there are lines to be returned # Make sure any period at the start of the line becomes a double period # Add the line to the text to be returned # Mark this message to be deleted automatically if flag set } else { while (<$handle>) { s#^\.#..#; $text .= $_; } $autodelete{$ordinal} = undef if $autodelete; } # Add the right marker to the text # Return the result with an extra . at the end to indicate end of list addmarker( \$text ); $text; } #TOP #------------------------------------------------------------------------ # IN: 1 ordinal number of message to delete # OUT: 1 whatever needs to be sent to client sub DELE { # Obtain ordinal number and possible error message # Return now if there was an error message # Mark this message as deletable # Return the result with an extra . at the end to indicate end of list my ($ordinal,$error) = ordinal( shift,1 ); return $error if $error; $delete{$ordinal} = undef; return "+OK$lf"; } #DELE #------------------------------------------------------------------------ # IN: 1 ordinal number of message to undelete # OUT: 1 whatever needs to be sent to client sub RSET { # Obtain ordinal number and possible error message # Return now if there was an error message # Unmark this message as deletable # Return the result with an extra . at the end to indicate end of list my ($ordinal,$error) = ordinal( shift ); return $error if $error; delete( $delete{$ordinal} ); return "+OK$lf"; } #RSET #------------------------------------------------------------------------ # OUT: 1 whatever needs to be sent to client sub NOOP { "+OK$lf" } #NOOP #------------------------------------------------------------------------ sub EXIT { $exitonquit = 1; return } #EXIT #------------------------------------------------------------------------ # OUT: 1 whatever needs to be sent to client sub QUIT { # Remove all of the files that were supposed to be deleted # Remove all of the files that were supposed to be deleted automatically # Set exit now flag if QUIT is to operate as EXIT # Mark the connection as ended # Let the client now it was fun while it lasted unlink( map {$message[$_]} keys %delete ); unlink( map {$message[$_]} keys %autodelete ); $exitnow = $exitonquit; $connected = 0; return "+OK$lf"; } #QUIT #------------------------------------------------------------------------ # IN: 1 flag whether login successful # OUT: 1 what needs to be returned to the client sub login { # If successful # Increment number of successful logins # Set connected flag # Let the client know it's ok if (shift) { $logins++; $connected = 1; return "+OK$lf"; } # Reset the user that was entered before # Let the client know authorization has failed $user = ''; return "-ERR authorization failed$lf"; } #login #------------------------------------------------------------------------ # IN: 1 ordinal number of message # 2 flag: check whether message deleted already # OUT: 1 normalize message number # 2 error message (if any) sub ordinal { # Obtain the message number # Initialize error message # Set error if too low # Set error if zero # Set error if too high my $ordinal = shift; my $error = ''; $error ||= "-ERR syntax error$lf" if $ordinal < 0; $error ||= "-ERR messages are counted from 1$lf" if $ordinal == 0; $error ||= "-ERR not that many messages$lf" if $ordinal > @message; # Normalize for arrays # Set error if checking for deletion and already deleted # Return the result $ordinal--; $error ||= "-ERR already deleted$lf" if shift and exists( $delete{$ordinal} ); return ($ordinal,$error); } #ordinal #------------------------------------------------------------------------ # IN: 1 reference to text (to add the right end-of-data marker to) sub addmarker { # Obtain the reference to the text # If we should check for extra newlines at the end # Add the right stuff depending on the end of the text so far # Else # Add it as most POP3 servers do my $textref = shift; if ($noextra) { $$textref .= ($$textref =~ m#\r\n$#so ? ".$lf" : "$lf.$lf"); } else { $$textref .= "$lf.$lf"; } } Mail-Box-2.118/tests/43pop3/01basic.t0000644000175000001440000000425512473603434017470 0ustar00markovusers00000000000000#!/usr/bin/env perl use warnings; use strict; use lib qw(. .. tests); use Tools; use Test::More; BEGIN { if($windows) { plan skip_all => "not available on MicroSoft Windows."; exit 0; } plan tests => 14; } BEGIN { use_ok('Mail::Transport::POP3') } # Check if all methods are there OK can_ok('Mail::Transport::POP3', qw( deleted deleteFetched DESTROY disconnect fetched folderSize header ids id2n init message messages messageSize send sendList socket url )); my $original = File::Spec->catdir ('43pop3', 'original'); my $popbox = File::Spec->catdir ('43pop3', 'popbox'); copy_dir($original, $popbox); my ($server, $port) = start_pop3_server($popbox); my $receiver = start_pop3_client($port); isa_ok($receiver, 'Mail::Transport::POP3'); my $socket = $receiver->socket; ok($socket, "Could not get socket of POP3 server"); print $socket "EXIT\n"; my @message = <$popbox/????>; my $total = 0; $total += -s foreach @message; my $messages = @message; cmp_ok($receiver->messages, '==', $messages, "Wrong number of messages"); cmp_ok($receiver->folderSize, '==', $total, "Wrong number of bytes"); my @id = $receiver->ids; cmp_ok(scalar(@id), '==', scalar(@message), "Number of messages doesn't match"); is(join('',@id), join('',@message), "ID's don't match filenames"); my $error = ''; foreach(@id) { my ($reported, $real) = ($receiver->messageSize($_),-s); $error .= "size $_ is not right: expected $real, got $reported\n" if $reported != $real; } ok(!$error, ($error || 'No errors with sizes')); $error = ''; foreach(@id) { my $message = $receiver->message($_); open(my $handle, '<', $_); $error .= "content of $_ is not right\n" if join('', @$message) ne join('', <$handle>); } ok(!$error, $error || 'No errors with contents'); $receiver->deleted(1,@id); ok($receiver->disconnect, 'Failed to properly disconnect from server'); @message = <$popbox/????>; cmp_ok(scalar(@message) ,'==', 0, 'Did not remove messages at QUIT'); ok(rmdir($popbox), "Failed to remove $popbox directory: $!"); is(join('', <$server>), < "not available on MicroSoft Windows."; exit 0; } plan tests => 7; } BEGIN { use_ok('Mail::Transport::POP3') } my $original = File::Spec->catdir ('43pop3', 'original'); my $popbox = File::Spec->catdir ('43pop3', 'popbox'); copy_dir($original, $popbox); my ($server, $port) = start_pop3_server($popbox, 'minimal'); my $receiver = start_pop3_client($port); isa_ok($receiver, 'Mail::Transport::POP3'); my $socket = $receiver->socket; ok($socket, "Could not get socket of POP3 server"); print $socket "EXIT\n"; # make server exit on QUIT $receiver->deleted(1, $receiver->ids); ok($receiver->disconnect, 'Failed to properly disconnect from server'); my @message = <$popbox/????>; cmp_ok(scalar(@message) ,'==', 0, 'Did not remove messages at QUIT'); ok(rmdir($popbox), "Failed to remove $popbox directory: $!"); is(join('', <$server>), < "not available on MicroSoft Windows."; exit 0; } plan tests => 7; } BEGIN { use_ok('Mail::Transport::POP3') } my $original = File::Spec->catdir ('43pop3', 'original'); my $popbox = File::Spec->catdir ('43pop3', 'popbox'); copy_dir($original, $popbox); my ($server, $port) = start_pop3_server($popbox, 'autodelete'); my $receiver = start_pop3_client($port, authenticate => 'LOGIN'); isa_ok($receiver, 'Mail::Transport::POP3'); my $socket = $receiver->socket; ok($socket, "Could not get socket of POP3 server"); print $socket "EXIT\n"; # make server exit on QUIT $receiver->message($_) foreach $receiver->ids; ok($receiver->disconnect, 'Failed to properly disconnect from server'); my @message = <$popbox/????>; cmp_ok(scalar(@message) ,'==', 0, 'Did not remove messages at QUIT'); ok(rmdir($popbox), "Failed to remove $popbox directory: $!"); is(join('', <$server>), < "not available on MicroSoft Windows."; exit 0; } plan tests => 7; } BEGIN { use_ok('Mail::Transport::POP3') } my $original = File::Spec->catdir ('43pop3', 'original'); my $popbox = File::Spec->catdir ('43pop3', 'popbox'); copy_dir($original, $popbox); my ($server, $port) = start_pop3_server($popbox); my $receiver = start_pop3_client($port); isa_ok($receiver, 'Mail::Transport::POP3'); my $socket = $receiver->socket; ok($socket, "Could not get socket of POP3 server"); print $socket "EXIT\n"; # make server exit on QUIT $receiver->message($_) foreach $receiver->ids; $receiver->deleteFetched; print $socket "BREAK\n"; # force breaking of connection ok($receiver->disconnect, 'Failed to properly disconnect from server'); my @message = <$popbox/????>; cmp_ok(scalar(@message) ,'==', 0, 'Did not remove messages at QUIT'); ok(rmdir($popbox), "Failed to remove $popbox directory: $!"); is(join('', <$server>), < Delivered-To: xx-woppa@xx.nl Received: (qmail 29414 invoked from network); 8 Jul 2002 20:25:55 -0000 Received: from smtpzilla5.xs4all.nl (194.109.127.141) by ds051.xs4all.nl with SMTP; 8 Jul 2002 20:25:55 -0000 Received: from valizo (a80-127-230-87.dial.xs4all.nl [80.127.230.87]) by smtpzilla5.xs4all.nl (8.12.0/8.12.0) with ESMTP id g68KQRdP007359 for ; Mon, 8 Jul 2002 22:26:28 +0200 (CEST) Message-Id: <4.2.0.58.20020708222644.02efb4b0@mickey.dijkmat.nl> X-Sender: lm@mickey.dijkmat.nl X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Mon, 08 Jul 2002 22:26:52 +0200 To: woppa@xx.nl From: Elizabeth Mattijsen Subject: test Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Mail-Box-2.118/tests/43pop3/original/00040000644000175000001440000000676312473603434020201 0ustar00markovusers00000000000000Return-Path: Delivered-To: xx-xxxxx@xx.nl Received: (qmail 29622 invoked from network); 8 Jul 2002 20:39:46 -0000 Received: from softdnserror (HELO w0.xxxletter.com) (66.181.174.116) by ds051.xs4all.nl with SMTP; 8 Jul 2002 20:39:46 -0000 Received: (from root@localhost) by w0.xxxletter.com (8.11.4/8.11.4) id g68Kbow05230 for xxxxx@xx.nl; Mon, 8 Jul 2002 16:37:50 -0400 (EDT) Date: Mon, 8 Jul 2002 16:37:50 -0400 (EDT) Message-Id: <200207082037.g68Kbow05230@w0.xxxletter.com> Mime-Version: 1.0 To: xxxxx@xx.nl Subject: You Won The Porn Lottery! Content-type: text/html; From: PrizeCommitee@sexy-emails.com THE PORN LOTTERY!!! YOU WON!!!


    CLICK HERE NOW!!!




    Note: this is not a spam email. This email was sent to you because your email was entered in on a website
    requesting to be a registered subscriber. If you would would like to be removed from our list,
    CLICK HERE TO CANCEL YOUR ACCOUNT and you will *never* receive another email from us!
    Mail-Box-2.118/tests/43pop3/original/00030000644000175000001440000000362512473603434020172 0ustar00markovusers00000000000000Return-Path: <15ghnow@yahoo.com> Delivered-To: xx-xxx@xx.nl Received: (qmail 29529 invoked from network); 8 Jul 2002 20:32:12 -0000 Received: from unknown (HELO hlzx.bjedu.gov.cn) (211.153.20.89) by ds051.xs4all.nl with SMTP; 8 Jul 2002 20:32:12 -0000 Received: (qmail 29012 invoked by uid 0); 25 Jun 2002 21:33:30 -0000 Received: from unknown (HELO mx1.mail.yahoo.com) ([209.86.180.232]) (envelope-sender <15ghnow@yahoo.com>) by 10.91.86.1 (qmail-ldap-1.03) with SMTP for ; 25 Jun 2002 21:33:30 -0000 Message-ID: <000071e14f34$00001849$00002497@mx1.mail.yahoo.com> To: From: "Max" <15ghnow@yahoo.com> Subject: As Seen On TV15480 Date: Tue, 25 Jun 2002 17:41:37 -1600 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit Reply-To: 15ghnow@yahoo.com As seen on NBC, CBS, CNN, and even Oprah! The health discovery that actually reverses aging while burning fat, without dieting or exercise! This proven discovery has even been reported on by the New England Journal of Medicine. Forget aging and dieting forever! And it's Guaranteed! Click here: http://www.flyhost.net/betterhealth Would you like to lose weight while you sleep! No dieting! No hunger pains! No Cravings! No strenuous exercise! Change your life forever! 100% GUARANTEED! 1.Body Fat Loss 82% improvement. 2.Wrinkle Reduction 61% improvement. 3.Energy Level 84% improvement. 4.Muscle Strength 88% improvement. 5.Sexual Potency 75% improvement. 6.Emotional Stability 67% improvement. 7.Memory 62% improvement. *********************************************************** You are receiving this email as a double opt-in subscriber to the Standard Affiliates Mailing List. To remove yourself from all related email lists, just click here: mailto:optoutemails@btamail.net.cn?Subject=REMOVE Mail-Box-2.118/tests/43pop3/original/00010000644000175000001440000000143612473603434020166 0ustar00markovusers00000000000000Return-Path: Delivered-To: xx-woppa@xx.nl Received: (qmail 29439 invoked from network); 8 Jul 2002 20:27:13 -0000 Received: from smtpzilla1.xs4all.nl (194.109.127.137) by ds051.xs4all.nl with SMTP; 8 Jul 2002 20:27:13 -0000 Received: from valizo (a80-127-230-87.dial.xs4all.nl [80.127.230.87]) by smtpzilla1.xs4all.nl (8.12.0/8.12.0) with ESMTP id g68KRdEr060805 for ; Mon, 8 Jul 2002 22:27:43 +0200 (CEST) Message-Id: <4.2.0.58.20020708222802.024df4a0@mickey.dijkmat.nl> X-Sender: lm@mickey.dijkmat.nl X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Mon, 08 Jul 2002 22:28:03 +0200 To: woppa@xx.nl From: Elizabeth Mattijsen Subject: test Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Mail-Box-2.118/tests/51folder/0000755000175000001440000000000012473604501016440 5ustar00markovusers00000000000000Mail-Box-2.118/tests/51folder/21tiehash.t0000644000175000001440000000260312473603434020422 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test access to folders using ties on hashes. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 101; use Mail::Box::Mbox; use Mail::Box::Tie::HASH; use Mail::Message::Construct; # # The folder is read. # my $folder = new Mail::Box::Mbox ( folder => $src , folderdir => 't' , lock_type => 'NONE' , extract => 'ALWAYS' , access => 'rw' ); ok(defined $folder); tie my(%folder), 'Mail::Box::Tie::HASH', $folder; cmp_ok(keys %folder , "==", 45); ok(! defined $folder{not_existing}); my @keys = keys %folder; foreach (@keys) { ok(defined $folder{$_}); my $msg = $folder{$_}; is($folder{$_}->messageID, $_); } my $msg = $folder->message(4); my $msgid = $msg->messageID; is($msg, $folder{$msgid}); # delete $folder[2]; works for 5.6, but not for 5.5 ok(!$folder->message(4)->deleted); cmp_ok(keys %folder , "==", 45); $folder{$msgid}->delete; ok($folder->message(4)->deleted); cmp_ok(keys %folder , "==", 44); # Double messages will not be added. { no warnings 'uninitialized'; $folder{ (undef) } = $folder{$msgid}->clone; } cmp_ok(keys %folder , "==", 44); # Different message, however, will be added. my $newmsg = Mail::Message->build(data => [ 'empty' ]); $folder{undef} = $newmsg; cmp_ok($folder->messages , "==", 46); cmp_ok(keys %folder , "==", 45); $folder->close(write => 'NEVER'); exit 0; Mail-Box-2.118/tests/51folder/Definition.pm0000644000175000001440000000056312473604424021076 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::51folder::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Box; general folder handling"} sub critical {1} sub skip { undef } 1; Mail-Box-2.118/tests/51folder/20tieary.t0000644000175000001440000000215512473603434020273 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test access to folders using ties. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 13; use Mail::Box::Mbox; use Mail::Box::Tie::ARRAY; use Mail::Message::Construct; # # The folder is read. # my $folder = new Mail::Box::Mbox ( folder => $src , folderdir => 't' , lock_type => 'NONE' , extract => 'ALWAYS' , access => 'rw' ); ok(defined $folder); cmp_ok($folder->messages, "==", 45); tie my(@folder), 'Mail::Box::Tie::ARRAY', $folder; cmp_ok(@folder , "==", 45); is($folder->message(4), $folder[4]); ok(! $folder->message(2)->deleted); $folder[2]->delete; ok($folder->message(2)->deleted); cmp_ok(@folder , "==", 45); ok(! $folder->message(3)->deleted); my $d3 = delete $folder[3]; ok(defined $d3); ok($folder->message(3)->deleted); # Double messages will not be added. push @folder, $folder[1]->clone; cmp_ok(@folder , "==", 45); # Different message, however, will be added. push @folder, Mail::Message->build(data => []); cmp_ok($folder->messages , "==", 46); cmp_ok(@folder , "==", 46); $folder->close(write => 'NEVER'); exit 0; Mail-Box-2.118/tests/51folder/10copyto.t0000644000175000001440000000610312473603434020307 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test folder-to-folder copy # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 28; use File::Copy; use IO::Scalar; use Mail::Box::Manager; copy $src, $cpy or die "Copy failed"; # # Build a complex system with MH folders and sub-folders. # my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open($cpy, lock_type => 'NONE'); ok(defined $folder); unlink qw/a b c d e/; my $A = $mgr->open('a', type => 'mh', create => 1, access => 'w' , lock_type => 'NONE'); ok(defined $A); $mgr->copyMessage($A, $folder->message($_)) for 0..9; my $b = $A->openSubFolder('b', create => 1, access => 'w'); ok(defined $b); $mgr->copyMessage($b, $folder->message($_)) for 10..19; cmp_ok($b->messages, "==", 10); $b->close; my $c = $A->openSubFolder('c', create => 1, access => 'w'); ok(defined $c); $mgr->copyMessage($c, $folder->message($_)) for 20..29; my $d = $c->openSubFolder('d', create => 1, access => 'w'); ok(defined $c); $mgr->copyMessage($d, $folder->message($_)) for 30..39; $d->close; $c->close; $A->close; $folder->close; cmp_ok($mgr->openFolders , "==", 0, 'all folders closed'); # # Convert the built MH structure into MBOX # $A = $mgr->open('a', access => 'rw', lock_type => 'NONE'); ok($A, 'Open MH folder a'); my @sub = sort $A->listSubFolders; cmp_ok(@sub, "==", 2, "a has two subfolders"); is($sub[0], 'b', " named b"); is($sub[1], 'c', " and c"); my $e = $mgr->open('e', type => 'mbox', create => 1, access => 'rw', lock_type => 'NONE'); cmp_ok($A->messages, "==", 10, "e has 10 messages"); $A->message($_)->delete for 3,4,8; ok(defined $A->copyTo($e, select => 'ALL', subfolders => 0)); cmp_ok($e->messages, "==", 10); $e->delete; $e = $mgr->open('e', type => 'mbox', create => 1, access => 'rw', lock_type => 'NONE'); ok(defined $A->copyTo($e, select => 'DELETED', subfolders => 0)); cmp_ok($e->messages, "==", 3); $e->delete; $e = $mgr->open('e', type => 'mbox', create => 1, access => 'rw', lock_type => 'NONE'); ok(defined $A->copyTo($e, select => 'ACTIVE', subfolders => 'FLATTEN')); cmp_ok($e->messages, "==", 37); $e->delete; $e = $mgr->open('e', type => 'mbox', create => 1, access => 'rw', lock_type => 'NONE'); ok(defined $e, "e is opened again"); ok(defined $A->copyTo($e, select => 'ACTIVE', subfolders => 'RECURSE'), "copyTo reports success"); cmp_ok($e->messages, "==", 7, "e contains 7 messages"); my @subs = sort $e->listSubFolders; cmp_ok(@subs, "==", 2, "e still has two subfolders"); is($subs[0], 'b', " named b"); is($subs[1], 'c', " and c"); $b = $e->openSubFolder('b'); ok(defined $b, "opened subfolder b of e"); isa_ok($b, 'Mail::Box::Mbox', " which is a MBOX"); cmp_ok($b->messages , "==", 10, " and contains 10 messages"); ok($b->close, "b is closed"); $e->delete; $A->delete; Mail-Box-2.118/tests/52manager/0000755000175000001440000000000012473604501016600 5ustar00markovusers00000000000000Mail-Box-2.118/tests/52manager/Definition.pm0000644000175000001440000000056512473604425021241 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::52manager::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Box::Manager; library manager"} sub critical {1} sub skip { undef } 1; Mail-Box-2.118/tests/52manager/20user.t0000644000175000001440000000164312473603434020115 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the user manager, which extends the normal manager use strict; use warnings; use Test::More; use lib qw(. .. tests); use Tools; use Mail::Box::Manage::User; BEGIN { plan tests => 11; } my $id = User::Identity->new('markov'); ok(defined $id, "Identity created"); isa_ok($id, 'User::Identity'); my $user = Mail::Box::Manage::User->new(identity => $id); ok(defined $user, "User manager created"); isa_ok($user, "Mail::Box::Manager"); isa_ok($user, "Mail::Box::Manage::User"); my $i = $user->identity; ok(defined $i, "Identity defined"); isa_ok($i, 'User::Identity'); cmp_ok($id->name, 'eq', $i->name, "Same id object"); my $f = $user->topfolder; ok(defined $f, "Folder structure created"); isa_ok($f, 'Mail::Box::Identity'); isa_ok($f, 'User::Identity::Item'); Mail-Box-2.118/tests/52manager/11urlopen.t0000644000175000001440000000761412473603434020627 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the url decoding for a folder name # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 16; use File::Spec; use Mail::Box::Manager; my $mgr = Mail::Box::Manager->new; $ENV{USER} = 'Jan'; sub same(@) { my $expect = pop @_; my $made = { @_ }; unless(defined $made) { warn "Nothing produced."; return 0; } foreach (keys %$made) { next if exists $expect->{$_}; warn "Key $_ made too much."; return 0; } #warn sort keys %$made; #warn sort keys %$expect; foreach (keys %$expect) { next if exists $made->{$_}; warn "Key $_ expected too much."; return 0; } foreach (keys %$made) { next if defined $made->{$_} && defined $expect->{$_} && $made->{$_} eq $expect->{$_}; next if !defined $made->{$_} && !defined $expect->{$_}; warn "Key $_: ",(defined $made->{$_} ? $made->{$_} : ''), ";", (defined $expect->{$_} ? $expect->{$_} : ''); return 0; } return 1; } ok(not defined $mgr->decodeFolderURL('x')); ok(same($mgr->decodeFolderURL('mbox:x'), { type => 'mbox', username => 'Jan', password => '' , server_name => 'localhost', server_port => undef, folder => 'x' } )); ok(same($mgr->decodeFolderURL('mbox:/x/y'), { type => 'mbox', username => 'Jan', password => '' , server_name => 'localhost', server_port => undef, folder => '/x/y' } )); ok(same($mgr->decodeFolderURL('pop3:///x/y'), { type => 'pop3', username => 'Jan', password => '' , server_name => 'localhost', server_port => undef, folder => '/x/y' } )); ok(same($mgr->decodeFolderURL('pop3://'), { type => 'pop3', username => 'Jan', password => '' , server_name => 'localhost', server_port => undef, folder => '=' } )); ok(same($mgr->decodeFolderURL('pop3://me:secret@host:42/y'), { type => 'pop3', username => 'me', password => 'secret' , server_name => 'host', server_port => 42, folder => '/y' } )); ok(same($mgr->decodeFolderURL('pop3://me:secret@host/y'), { type => 'pop3', username => 'me', password => 'secret' , server_name => 'host', server_port => undef, folder => '/y' } )); ok(same($mgr->decodeFolderURL('pop3://me:secret@:12/y'), { type => 'pop3', username => 'me', password => 'secret' , server_name => 'localhost', server_port => 12, folder => '/y' } )); ok(same($mgr->decodeFolderURL('pop3://me:secret@/y'), { type => 'pop3', username => 'me', password => 'secret' , server_name => 'localhost', server_port => undef, folder => '/y' } )); ok(same($mgr->decodeFolderURL('pop3://me@/y'), { type => 'pop3', username => 'me', password => '' , server_name => 'localhost', server_port => undef, folder => '/y' } )); ok(same($mgr->decodeFolderURL('pop3://me@:42/y'), { type => 'pop3', username => 'me', password => '' , server_name => 'localhost', server_port => 42, folder => '/y' } )); ok(same($mgr->decodeFolderURL('pop3://me@host/y'), { type => 'pop3', username => 'me', password => '' , server_name => 'host', server_port => undef, folder => '/y' } )); ok(same($mgr->decodeFolderURL('pop3://tux.home.aq:42/y'), { type => 'pop3', username => 'Jan', password => '' , server_name => 'tux.home.aq', server_port => 42, folder => '/y' } )); ok(same($mgr->decodeFolderURL('pop3://tux.home.aq/y'), { type => 'pop3', username => 'Jan', password => '' , server_name => 'tux.home.aq', server_port => undef, folder => '/y' } )); ok(same($mgr->decodeFolderURL('pop3://tux.home.aq'), { type => 'pop3', username => 'Jan', password => '' , server_name => 'tux.home.aq', server_port => undef, folder => '=' } )); ok(same($mgr->decodeFolderURL('pop3://me:secret@tux.home.aq'), { type => 'pop3', username => 'me', password => 'secret' , server_name => 'tux.home.aq', server_port => undef, folder => '=' } )); Mail-Box-2.118/tests/52manager/30collect.t0000644000175000001440000001145112473603434020563 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Collecting folders, without opening them use strict; use warnings; use Test::More; use lib qw(. .. tests); use Tools; use Mail::Box::Manage::User; use Mail::Box::MH; BEGIN { plan tests => 72; } my @boxes = qw( a1 a1/b1 a1/b2 a1/b2/c1 a1/b2/c2 a1/b2/c3 a1/b2/c3/d1 a1/b2/c3/d2 a1/b3 a2 a3 ); # Create the directory hierarchy my $top = 'collect-test.tmp'; clean_dir($top); mkdir $top or die "$top: $!"; foreach my $box (@boxes) { my $dir = "$top/$box"; mkdir $dir or die "$dir: $!"; } # Now create the user my $id = User::Identity->new('markov'); ok(defined $id, "Identity created"); isa_ok($id, 'User::Identity'); my $user = Mail::Box::Manage::User->new ( folderdir => $top , identity => $id , default_folder_type => 'mh' ); ok(defined $user, "User manager created"); isa_ok($user, "Mail::Box::Manager"); isa_ok($user, "Mail::Box::Manage::User"); is($user->defaultFolderType, 'Mail::Box::MH'); # Let's check the list of folders my $f = $user->topfolder; isa_ok($f, 'Mail::Box::Identity'); is($f->folderType, 'Mail::Box::MH'); is($f->location, $top); is($f->manager, $user); ok(! $f->onlySubfolders, "MH toplevel"); ok(!defined $f->collection('subfolders'), "Laziness"); my @subnames = sort $f->subfolderNames; ok(defined $f->collection('subfolders'), "loaded"); cmp_ok(scalar(@subnames), '==', 3, "Subfolder names found"); is($subnames[0], 'a1'); is($subnames[1], 'a2'); is($subnames[2], 'a3'); my @subs = sort {$a->name cmp $b->name} $f->subfolders; cmp_ok(scalar(@subs), '==', 3, "Subfolders found"); my $a1 = $subs[0]; isa_ok($a1, 'Mail::Box::Identity'); is($a1->name, 'a1'); is($a1->fullname, '=/a1'); is($a1->location, "$top/a1"); is($subs[1]->name, 'a2'); is($subs[1]->fullname, '=/a2'); is($subs[2]->name, 'a3'); is($subs[2]->fullname, '=/a3'); isa_ok($f, 'User::Identity::Item'); # One nested ok(!defined $a1->collection('subfolders'), "Laziness of a1"); my @a1names = sort $a1->subfolderNames; ok(defined $a1->collection('subfolders'), "loaded"); cmp_ok(scalar(@a1names), '==', 3, "Subfolders a1 found"); is($a1names[0], 'b1'); is($a1names[1], 'b2'); is($a1names[2], 'b3'); my @a1subs = sort {$a->name cmp $b->name} $a1->subfolders; cmp_ok(scalar(@a1subs), '==', 3, "Subfolders found"); is($a1subs[1]->fullname, '=/a1/b2'); my @a1subs2 = $a1->subfolders->sorted; ok(eq_array(\@a1subs, \@a1subs2), "Auto-sort"); # get a subfolder at once my $l0 = $f->folder(); ok(defined $l0, "Subfolder top"); isa_ok($l0, 'Mail::Box::Identity'); is($l0->fullname, "="); is($l0->topfolder->name, '='); my $l1 = $f->folder('a2'); ok(defined $l1, "Subfolder level 1"); isa_ok($l1, 'Mail::Box::Identity'); is($l1->fullname, "=/a2"); is($l1->topfolder->name, '='); ok(!defined $f->folder('xx'), "Subfolder level 1 fail"); my $l2 = $f->folder('a1', 'b3'); ok(defined $l2, "Subfolder level 2"); is($l2->fullname, "=/a1/b3"); is($l2->topfolder->name, '='); my $l4 = $f->folder('a1', 'b2', 'c3', 'd1'); ok(defined $l4, "Subfolder level 4"); isa_ok($l4, 'Mail::Box::Identity'); is($l4->fullname, "=/a1/b2/c3/d1"); is($l4->topfolder->name, '='); ok(! defined$f->folder('a1', 'b3', 'xx', 'yy'), "Subfolder level 3 fail"); # Walk the tree my $count = 0; $f->foreach( sub {$count++} ); cmp_ok($count, '==', @boxes+1, "Walk the tree"); # +1 for top folder my @all; sub catch_fn($) { my $fn = $_[0]->fullname; return if $fn eq '='; $fn =~ s!^\=/!!; push @all, $fn; } $f->foreach(\&catch_fn); ok(eq_array(\@all, \@boxes), "Walk alphabetically"); # # Test remove # my $c3 = $f->folder('a1', 'b2')->remove('c3'); ok(defined $c3, "Remove c3, found"); isa_ok($c3, 'Mail::Box::Identity'); is($c3->name, "c3"); my $c3d = $f->folder('a1', 'b2', 'c3'); ok(!defined $c3d); my @a1b2names = sort $f->folder('a1', 'b2')->subfolderNames; cmp_ok(scalar(@a1b2names), '==', 2, "parent still exists"); is($a1b2names[0], 'c1'); is($a1b2names[1], 'c2'); # # Test rename # my $x = $f->folder('a1', 'b2', 'c1'); ok(defined $x, "a1/b2/c1 exists"); my $dest = $f->folder('a3'); ok(defined $dest, "a3 exists"); my $y = $x->rename($dest, 'b8'); ok(defined $y, "rename successful"); isa_ok($y, 'Mail::Box::Identity'); is($y->name, 'b8'); is($x->name, 'b8'); is($y->parent->parent->name, 'a3'); is($y->fullname, '=/a3/b8'); is($y->fullname('#'), '=#a3#b8'); is($y->location, "$top/a3/b8"); clean_dir($top); Mail-Box-2.118/tests/52manager/10open.t0000644000175000001440000000411512473603434020074 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the folder manager # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 14; use File::Spec; use Mail::Box::Manager; my $new = File::Spec->catfile('folders', 'create'); unlink $new; my $manager = Mail::Box::Manager->new ( log => 'NOTICES' , trace => 'NONE' ); my $folder = $manager->open ( folder => $src , lock_type => 'NONE' , extract => 'LAZY' ); ok(defined $folder, 'open folder'); isa_ok($folder, 'Mail::Box::Mbox'); my $second = $manager->open ( folder => $src , lock_type => 'NONE' ); ok(!defined $second, 'open same folder fails'); my @errors = $manager->report('ERRORS'); cmp_ok(@errors, "==", 1, 'mgr noticed double'); $errors[-1] =~ s#[\\/]mbox\.win#/mbox.src#g; # Windows is($errors[-1], "Folder folders/mbox.src is already open."); cmp_ok($manager->openFolders, "==", 1, 'only one folder open'); undef $second; cmp_ok($manager->openFolders, "==", 1, 'second closed, still one open'); my $n = $manager->open ( folder => $new , folderdir => 't' , type => 'mbox' , lock_type => 'NONE' ); ok(! -f $new, 'folder file does not exist'); ok(! defined $n, 'open non-ex does not succeed'); my @warnings = $manager->report('WARNINGS'); cmp_ok(@warnings, "==", 1, 'new warning'); $warnings[-1] =~ s#\\#/#g; # Windows is($warnings[-1], "Folder does not exist, failed opening mbox folder folders/create."); $manager->log('WARNINGS'); # back to default reporting. $manager->trace('WARNINGS'); my $p = $manager->open ( folder => $new , lock_type => 'NONE' , type => 'mbox' , create => 1 , access => 'w' ); ok(defined $p, 'open non-existing with create'); ok(-f $new, 'new folder created'); ok(-z $new, 'new folder is empty'); unlink $new; exit 0; Mail-Box-2.118/tests/11field/0000755000175000001440000000000012473604501016244 5ustar00markovusers00000000000000Mail-Box-2.118/tests/11field/Definition.pm0000644000175000001440000000056712473604424020706 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::11field::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Message::Field; fields in headers"} sub critical {1} sub skip { undef } 1; Mail-Box-2.118/tests/11field/20fast.t0000644000175000001440000001144012473603434017534 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test processing of header-fields with Mail::Message::Field::Fast. # Only single fields, not whole headers. This also doesn't cover reading # headers from file. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 72; use Mail::Message::Field::Fast; use Mail::Address; # # Processing unstructured lines. # my $a = Mail::Message::Field::Fast->new('A: B ; C'); is($a->name, 'a'); is($a->body, 'B ; C'); ok(not defined $a->comment); # No folding permitted. my $b1 = ' B ; C234290iwfjoj w etuwou toiwutoi'; my $b2 = ' wtwoetuw oiurotu 3 ouwout 2 oueotu2'; my $b3 = ' fqweortu3'; my $bbody = "$b1$b2$b3"; my $b = Mail::Message::Field::Fast->new("A: $bbody"); my @lines = $b->toString(100); cmp_ok(@lines, '==', 1); is($lines[0], "A:$bbody\n"); @lines = $b->toString(42); cmp_ok(@lines, '==', 3); is($lines[0], "A:$b1\n"); is($lines[1], "$b2\n"); is($lines[2], "$b3\n"); is(' '.$b->body, $bbody); # # Processing of structured lines. # my $f = Mail::Message::Field::Fast->new('Sender: B ; C'); ok($f->isStructured); is($f->name, 'sender'); is($f->body, 'B'); is($f, 'B ; C'); is($f->comment, 'C'); # No comment, strip CR LF my $g = Mail::Message::Field::Fast->new("Sender: B\015\012\n"); is($g->body, 'B'); is($g->comment, ''); # Separate head and body. my $h = Mail::Message::Field::Fast->new("Sender", "B\015\012\n"); is($h->body, 'B'); is($h->comment, ''); my $i = Mail::Message::Field::Fast->new('Sender', 'B ; C'); is($i->name, 'sender'); is($i->body, 'B'); like($i->comment, qr/^\s*C\s*/); my $j = Mail::Message::Field::Fast->new('Sender', 'B', 'C'); is($j->name, 'sender'); is($j->body, 'B'); like($j->comment, qr/^\s*C\s*/); # Check toString (for unstructured field, so no folding) my $k = Mail::Message::Field::Fast->new(A => 'short line'); is($k->toString, "A: short line\n"); my @klines = $k->toString; cmp_ok(@klines, '==', 1); my $l = Mail::Message::Field::Fast->new(A => 'oijfjslkgjhius2rehtpo2uwpefnwlsjfh2oireuqfqlkhfjowtropqhflksjhflkjhoiewurpq'); my @llines = $k->toString; cmp_ok(@llines, '==', 1); my $m = Mail::Message::Field::Fast->new(A => 'roijfjslkgjhiu, rehtpo2uwpe, fnwlsjfh2oire, uqfqlkhfjowtrop, qhflksjhflkj, hoiewurpq'); my @mlines = $m->toString; cmp_ok(@mlines, '==', 2); is($mlines[1], " hoiewurpq\n"); my $n = Mail::Message::Field::Fast->new(A => 7); my $x = $n + 0; ok($n ? 1 : 0); ok($x==7); ok($n > 6); ok($n < 8); cmp_ok($n, '==', 7); ok(6 < $n); ok(8 > $n); # # Check gluing addresses # my @mb = Mail::Address->parse('me@localhost, you@somewhere.nl'); cmp_ok(scalar @mb, '==', 2); my $r = Mail::Message::Field::Fast->new(Cc => $mb[0]); is($r->toString, "Cc: me\@localhost\n"); $r = Mail::Message::Field::Fast->new(Cc => \@mb); is($r->toString, "Cc: me\@localhost, you\@somewhere.nl\n"); my $r2 = Mail::Message::Field::Fast->new(Bcc => $r); is($r2->toString, "Bcc: me\@localhost, you\@somewhere.nl\n"); # # Checking attributes # my $charset = 'iso-8859-1'; my $comment = qq(charset="iso-8859-1"; format=flowed); my $p = Mail::Message::Field::Fast->new("Content-Type: text/plain; $comment"); is($p->comment, $comment); is($p->body, 'text/plain'); is($p->attribute('charset'), $charset); is($p->attribute('format'), 'flowed'); ok(!defined $p->attribute('boundary')); is($p->attribute(charset => 'us-ascii'), 'us-ascii'); is($p->attribute('charset'), 'us-ascii'); is($p->comment, 'charset="us-ascii"; format=flowed'); is($p->attribute(format => 'newform'), 'newform'); is($p->comment, 'charset="us-ascii"; format="newform"'); is($p->attribute(newfield => 'bull'), 'bull'); is($p->attribute('newfield'), 'bull'); is($p->comment, 'charset="us-ascii"; format="newform"; newfield="bull"'); my %attrs = $p->attributes; cmp_ok(keys %attrs, '==', 3, "list of attributes"); is($attrs{charset}, 'us-ascii'); is($attrs{format}, 'newform'); is($attrs{newfield}, 'bull'); my $q = Mail::Message::Field::Fast->new('Content-Type: text/plain'); is($q->toString, "Content-Type: text/plain\n"); is($q->attribute(charset => 'iso-10646'), 'iso-10646'); is($q->attribute('charset'), 'iso-10646'); is($q->comment, 'charset="iso-10646"'); is($q->toString, qq(Content-Type: text/plain; charset="iso-10646"\n)); # # Check preferred capitization of Labels # my @tests = ( 'Content-Transfer-Encoding' => 'Content-Transfer-Encoding' , 'content-transfer-encoding' => 'Content-Transfer-Encoding' , 'CONTENT-TRANSFER-ENCODING' => 'Content-Transfer-Encoding' , 'cONTENT-tRANSFER-eNCODING' => 'Content-Transfer-Encoding' , 'mime-version' => 'MIME-Version' , 'MIME-VERSION' => 'MIME-Version' , 'Mime-vERSION' => 'MIME-Version' , 'src-label' => 'SRC-Label' , 'my-src-label' => 'My-SRC-Label' ); while(@tests) { my ($from, $to) = (shift @tests, shift @tests); is(Mail::Message::Field->wellformedName($from), $to); } Mail-Box-2.118/tests/11field/10cfws.t0000644000175000001440000000435212473603434017544 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test stripping CFWS [comments and folding white spaces] as # specified by rfc2822. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 54; use Mail::Message::Field::Fast; use Mail::Address; my @tests = ( 'aap noot mies' => 'aap noot mies' , ' aap noot mies ' => 'aap noot mies' , "aap\n noot\n" => 'aap noot' , "aap (comment) noot" => 'aap noot' , "aap () noot" => 'aap noot' , "(a) aap (comment) noot (c)" => 'aap noot' , "aap (com (nested) ment) noot" => 'aap noot' , "aap ((nested) comment) noot" => 'aap noot' , "aap (comment (nested)) noot" => 'aap noot' , "aap (comment(nested)) noot" => 'aap noot' , "aap ((nested)comment(nested)) noot" => 'aap noot' , "((nested)comment(nested)) noot" => 'noot' , "aap ((nes(ted))comment(nested)) noot" => 'aap noot' , "(nes(ted)comment(nested)) noot (aap)" => 'noot' , "aap ((nes\n\nted)co\nmment(nested)\n) noot" => 'aap noot' , '"aap" noot' => '"aap" noot' , '"aap" (noot) mies' => '"aap" mies' , '"aap" (noot) mies ' => '"aap" mies' , '"aap" noot (mies) ' => '"aap" noot' , 'aap "noot" (mies) ' => 'aap "noot"' , 'aap (noot) "mies"' => 'aap "mies"' , 'aap (noot) "mies" ' => 'aap "mies"' , 'aap (noot) "mies" (noot(nest)) aap' => 'aap "mies" aap' , 'aap \( noot' => 'aap \( noot' , 'aap "(" noot' => 'aap "(" noot' , 'aap "(noot)" mies' => 'aap "(noot)" mies' , 'aap \"(noot) mies' => 'aap \" mies' ); my @take = @tests; while(@take) { my ($from, $to) = (shift @take, shift @take); is(Mail::Message::Field->stripCFWS($from), $to ); } @take = @tests; while(@take) { my ($from, $to) = (shift @take, shift @take); my $field = Mail::Message::Field::Fast->new('Something' => $from); is($field->stripCFWS, $to); } Mail-Box-2.118/tests/11field/30flex.t0000644000175000001440000000620012473603434017534 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test processing of header-fields in flexible format: only single fields, # not whole headers. This also doesn't cover reading headers from file. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 44; use Mail::Message::Field::Flex; use Mail::Address; # # Processing unstructured lines. # my $a = Mail::Message::Field::Flex->new('A: B ; C'); is($a->name, 'a'); is($a->body, 'B ; C'); ok(not defined $a->comment); # No folding permitted. my $bbody = 'B ; C234290iwfjoj w etuwou toiwutoi wtwoetuw oiurotu 3 ouwout 2 oueotu2 fqweortu3'; my $b = Mail::Message::Field::Flex->new("A: $bbody"); my @lines = $b->toString(100); cmp_ok(@lines, '==', 1); is($lines[0], "A: $bbody\n"); is($b->body, $bbody); @lines = $b->toString(40); cmp_ok(@lines, '==', 3); is($lines[2], " oueotu2 fqweortu3\n"); # # Processing of structured lines. # my $f = Mail::Message::Field::Flex->new('Sender: B ; C'); is($f->name, 'sender'); is($f->body, 'B'); is($f, 'B ; C'); like($f->comment, qr/^\s*C\s*/); # No comment, strip CR LF my $g = Mail::Message::Field::Flex->new("Sender: B\015\012"); is($g->body, 'B'); is($g->comment, ''); # Separate head and body. my $h = Mail::Message::Field::Flex->new("Sender", "B\015\012"); is($h->body, 'B'); is($h->comment, ''); my $i = Mail::Message::Field::Flex->new('Sender', 'B ; C'); is($i->name, 'sender'); is($i->body, 'B'); like($i->comment, qr/^\s*C\s*/); my $j = Mail::Message::Field::Flex->new('Sender', 'B', [comment => 'C']); is($j->name, 'sender'); is($j->body, 'B'); like($j->comment, qr/^\s*C\s*/); # Check toString (for unstructured field, so no folding) my $k = Mail::Message::Field::Flex->new(A => 'short line'); is($k->toString, "A: short line\n"); my @klines = $k->toString; cmp_ok(@klines, '==', 1); my $l = Mail::Message::Field::Flex->new(A => 'oijfjslkgjhius2rehtpo2uwpefnwlsjfh2oireuqfqlkhfjowtropqhflksjhflkjhoiewurpq'); my @llines = $k->toString; ok(@llines==1); my $n = Mail::Message::Field::Flex->new(A => 7); my $x = $n + 0; ok($n ? 1 : 0); ok($x==7); ok($n > 6); ok($n < 8); ok($n==7); ok(6 < $n); ok(8 > $n); # # Check gluing addresses # my @mb = Mail::Address->parse('me@localhost, you@somewhere.nl'); cmp_ok(@mb, '==', 2); my $r = Mail::Message::Field::Flex->new(Cc => $mb[0]); is($r->toString, "Cc: me\@localhost\n"); $r = Mail::Message::Field::Flex->new(Cc => \@mb); is($r->toString, "Cc: me\@localhost, you\@somewhere.nl\n"); my $r2 = Mail::Message::Field::Flex->new(Bcc => $r); is($r2->toString, "Bcc: me\@localhost, you\@somewhere.nl\n"); # # Checking attributes # my $charset = 'iso-8859-1'; my $comment = qq(charset="iso-8859-1"; format=flowed); my $p = Mail::Message::Field::Flex->new("Content-Type: text/plain; $comment"); is($p->comment, $comment); is($p->body, 'text/plain'); is($p->attribute('charset'), $charset); my $q = Mail::Message::Field::Flex->new('Content-Type: text/plain'); is($q->toString, "Content-Type: text/plain\n"); is($q->attribute(charset => 'iso-10646'), 'iso-10646'); is($q->attribute('charset'), 'iso-10646'); is($q->comment, 'charset="iso-10646"'); is($q->toString, qq(Content-Type: text/plain; charset="iso-10646"\n)); Mail-Box-2.118/tests/11field/40wrap.t0000644000175000001440000000751612473603434017563 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the refolding of fields # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 32; use Scalar::Util qw/refaddr/; # # FAST FIELDS # use Mail::Message::Field::Fast; my $fast = 'Mail::Message::Field::Fast'; my $fast1 = $fast->new(Name => 'body'); ok(defined $fast1, 'fast field created'); isa_ok($fast1, $fast); is($fast1->unfoldedBody, 'body'); is($fast1->foldedBody, " body\n"); my $fast2 = $fast1->setWrapLength; is(refaddr $fast1, refaddr $fast2, 'empty wrap'); is($fast2->unfoldedBody, 'body'); is($fast2->foldedBody, " body\n"); my $fast3 = $fast1->setWrapLength(34); is(refaddr $fast1, refaddr $fast3, 'wrap much longer'); is($fast3->unfoldedBody, 'body'); is($fast3->foldedBody, " body\n"); my $long = 'this is very long field, which has no folding yet'; my $fast4 = $fast->new(Name => $long); is($fast4->unfoldedBody, $long); is($fast4->foldedBody, " $long\n", 'long folding'); my $llong = 'this line is longer than the default fold of 78 characters. It should get folded more than once. Wow, 78 characters it quite a lot, you know! Are we on the third line already?'; my $fast5 = $fast->new(Name => $llong); is($fast5->unfoldedBody, $llong); is($fast5->foldedBody, <<__LLONG, 'llong folding'); this line is longer than the default fold of 78 characters. It should get folded more than once. Wow, 78 characters it quite a lot, you know! Are we on the third line already? __LLONG $fast5->setWrapLength(30); is($fast5->foldedBody, <<__LLONG, 'llong folding at 30'); this line is longer than the default fold of 78 characters. It should get folded more than once. Wow, 78 characters it quite a lot, you know! Are we on the third line already? __LLONG $fast5->setWrapLength(100); is($fast5->foldedBody, <<__LLONG, 'llong folding at 100'); this line is longer than the default fold of 78 characters. It should get folded more than once. Wow, 78 characters it quite a lot, you know! Are we on the third line already? __LLONG # # FLEX FIELDS # use Mail::Message::Field::Flex; my $flex = 'Mail::Message::Field::Flex'; my $flex1 = $flex->new(Name => 'body'); ok(defined $flex1, 'flex field created'); isa_ok($flex1, $flex); is($flex1->unfoldedBody, 'body'); is($flex1->foldedBody, " body\n"); my $flex2 = $flex1->setWrapLength; is(refaddr $flex1, refaddr $flex2, 'empty wrap'); is($flex2->unfoldedBody, 'body'); is($flex2->foldedBody, " body\n"); my $flex3 = $flex1->setWrapLength(34); is(refaddr $flex1, refaddr $flex3, 'wrap much longer'); is($flex3->unfoldedBody, 'body'); is($flex3->foldedBody, " body\n"); my $flex4 = $flex->new(Name => $long); is($flex4->unfoldedBody, $long); is($flex4->foldedBody, " $long\n", 'long folding'); my $flex5 = $flex->new(Name => $llong); is($flex5->unfoldedBody, $llong); is($flex5->foldedBody, <<__LLONG, 'llong folding'); this line is longer than the default fold of 78 characters. It should get folded more than once. Wow, 78 characters it quite a lot, you know! Are we on the third line already? __LLONG $flex5->setWrapLength(30); is($flex5->foldedBody, <<__LLONG, 'llong folding at 30'); this line is longer than the default fold of 78 characters. It should get folded more than once. Wow, 78 characters it quite a lot, you know! Are we on the third line already? __LLONG $flex5->setWrapLength(100); is($flex5->foldedBody, <<__LLONG, 'llong folding at 100'); this line is longer than the default fold of 78 characters. It should get folded more than once. Wow, 78 characters it quite a lot, you know! Are we on the third line already? __LLONG Mail-Box-2.118/tests/30encode/0000755000175000001440000000000012473604501016417 5ustar00markovusers00000000000000Mail-Box-2.118/tests/30encode/Definition.pm0000644000175000001440000000057712473604424021062 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::30encode::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Message::TransferEnc; transfer encodings"} sub critical {0} sub skip { undef } 1; Mail-Box-2.118/tests/30encode/10base64.t0000644000175000001440000000234412473603434020040 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Encoding and Decoding of Base64 # Could use some more tests.... # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 11; use Mail::Message::Body::Lines; use Mail::Message::TransferEnc::Base64; my $decoded = <new; ok(defined $codec); is($codec->name, 'base64'); # Test encoding my $body = Mail::Message::Body::Lines->new ( mime_type => 'text/html' , data => $decoded ); is($body->mimeType, 'text/html'); my $enc = $codec->encode($body); ok($body!=$enc); is($enc->mimeType, 'text/html'); is($enc->transferEncoding, 'base64'); is($enc->string, $encoded); # Test decoding $body = Mail::Message::Body::Lines->new ( transfer_encoding => 'base64' , mime_type => 'text/html' , data => $encoded ); my $dec = $codec->decode($body); ok($dec!=$body); is($enc->mimeType, 'text/html'); is($dec->transferEncoding, 'none'); is($dec->string, $decoded); Mail-Box-2.118/tests/30encode/50charset.t0000644000175000001440000000247312473603434020414 0ustar00markovusers00000000000000#!/usr/bin/env perl # Conversion of character-sets # use strict; use warnings; use lib qw(. .. tests); use Tools; use utf8; use Scalar::Util 'refaddr'; use Data::Dumper; use Test::More tests => 19; use Mail::Message::Body; my $src = "märkøv\n"; # fragile! must be utf8, not latin1 ok(utf8::is_utf8($src)); my $dec = Mail::Message::Body->new(data => $src); isa_ok($dec, 'Mail::Message::Body'); is($dec->charset, 'PERL', 'default charset PERL'); my $enc = $dec->encode(charset => 'PERL'); is(ref $dec, ref $enc, 'same type'); is(refaddr $dec, refaddr $enc, 'same object'); is($enc->charset, 'PERL', 'charset PERL'); $enc = $dec->encode(charset => 'utf8', transfer_encoding => 'quoted-printable'); is(ref $dec, ref $enc, 'same type'); isnt(refaddr $dec, refaddr $enc, 'new object'); is($enc->charset, 'utf8'); my @lines = $enc->lines; cmp_ok(scalar @lines, '==', 1); is($lines[0], "m=C3=A4rk=C3=B8v\n"); ok(!utf8::is_utf8($lines[0]), 'raw bytes'); my $rec = $enc->encode(charset => 'PERL', transfer_encoding => 'none'); is(ref $rec, ref $enc, 'same type'); isnt(refaddr $rec, refaddr $enc, 'new object'); isnt(refaddr $rec, refaddr $dec, 'new object'); ok($rec->charset.'', 'PERL'); @lines = $rec->lines; cmp_ok(scalar @lines, '==', 1); is($lines[0], $src, 'transfer decoded'); ok(utf8::is_utf8($lines[0]), 'is perl utf-8'); Mail-Box-2.118/tests/30encode/40seven.t0000644000175000001440000000144012473603434020073 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Encoding and Decoding of 7bit # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 6; use Mail::Message::Body::Lines; use Mail::Message::TransferEnc::SevenBit; my $decoded = <new; ok(defined $codec); is($codec->name, '7bit'); # Test encoding my $body = Mail::Message::Body::Lines->new ( mime_type => 'text/html' , data => $decoded ); my $enc = $codec->encode($body); ok($body!=$enc); is($enc->mimeType, 'text/html'); is($enc->transferEncoding, '7bit'); is($enc->string, $encoded); # Test decoding Mail-Box-2.118/tests/30encode/90body.t0000644000175000001440000000301712473603434017717 0ustar00markovusers00000000000000#!/usr/bin/env perl use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 13; use IO::Scalar; use Mail::Message; use Mail::Message::Body::Lines; use Mail::Message::TransferEnc::Base64; my $decoded = <new ( mime_type => 'text/html' , transfer_encoding => 'base64' , data => $encoded ); ok(defined $body); my $dec = $body->encode(transfer_encoding => 'none'); ok(defined $dec); isa_ok($dec, 'Mail::Message::Body'); ok(!$dec->checked, 'checked?'); is($dec->string, $decoded); is($dec->transferEncoding, 'none'); my $enc = $dec->encode(transfer_encoding => '7bit', charset => 'utf-8'); ok(defined $enc); isa_ok($enc, 'Mail::Message::Body'); ok($enc->checked, 'checked?'); is($enc->string, $decoded); my $msg = Mail::Message->buildFromBody($enc, From => 'me', To => 'you' , Date => 'now', 'Message-Id' => ''); ok($msg); ok($msg->body->checked); my $fakeout; my $g = IO::Scalar->new(\$fakeout); $msg->print($g); compare_message_prints($fakeout, <<'MSG', 'build from body'); From: me To: you Date: now Message-Id: Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 This text is used to test base64 encoding and decoding. Let see whether it works. MSG Mail-Box-2.118/tests/30encode/30quoted.t0000644000175000001440000000301312473603434020251 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Encoding and Decoding quoted-print bodies # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 10; use Mail::Message::Body::Lines; use Mail::Message::TransferEnc::QuotedPrint; my $src = <new; ok(defined $codec); is($codec->name, 'quoted-printable'); # Test encoding my $body = Mail::Message::Body::Lines->new ( mime_type => 'text/html' , data => $src ); my $enc = $codec->encode($body); ok($body!=$enc); is($enc->mimeType, 'text/html'); is($enc->transferEncoding, 'quoted-printable'); is($enc->string, $encoded); # Test decoding $body = Mail::Message::Body::Lines->new ( transfer_encoding => 'quoted-printable' , mime_type => 'text/html' , data => $encoded ); my $dec = $codec->decode($body); ok($dec!=$body); is($enc->mimeType, 'text/html'); is($dec->transferEncoding, 'none'); is($dec->string, $src); Mail-Box-2.118/tests/30encode/20eight.t0000644000175000001440000000144012473603434020051 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Encoding and Decoding of 8bit # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 6; use Mail::Message::Body::Lines; use Mail::Message::TransferEnc::EightBit; my $decoded = <new; ok(defined $codec); is($codec->name, '8bit'); # Test encoding my $body = Mail::Message::Body::Lines->new ( mime_type => 'text/html' , data => $decoded ); my $enc = $codec->encode($body); ok($body!=$enc); is($enc->mimeType, 'text/html'); is($enc->transferEncoding, '8bit'); is($enc->string, $encoded); # Test decoding Mail-Box-2.118/tests/55locking/0000755000175000001440000000000012473604501016617 5ustar00markovusers00000000000000Mail-Box-2.118/tests/55locking/Definition.pm0000644000175000001440000000056312473604424021255 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::55locking::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Box::Locker; folder locking"} sub critical {0} sub skip { undef } 1; Mail-Box-2.118/tests/55locking/90multi.t0000644000175000001440000000140212473603434020310 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the locking methods. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 7; use File::Spec; use Mail::Box::Locker::Multi; my $fakefolder = bless {MB_foldername=> 'this'}, 'Mail::Box'; my $lockfile = File::Spec->catfile('folders', 'lockfiletest'); unlink $lockfile; if($windows) { open my $OUT, '>', $lockfile or die; close $OUT; } my $locker = Mail::Box::Locker->new ( method => 'MULTI' , timeout => 1 , wait => 1 , file => $lockfile , folder => $fakefolder ); ok($locker); is($locker->name, 'MULTI'); ok($locker->lock); ok(-f $lockfile); ok($locker->hasLock); # Already got lock, so should return immediately. ok($locker->lock); $locker->unlock; ok(not $locker->hasLock); Mail-Box-2.118/tests/55locking/50mutt.t0000644000175000001440000000234012473603434020145 0ustar00markovusers00000000000000#!/usr/bin/env perl #### test run untainted! Otherwise we will not find a relative #### mutt_dotlock program. # # Test the locking methods. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use Mail::Box::Mbox; use Mail::Box::Locker::Mutt; BEGIN { eval qq{use POSIX 'sys_wait_h'; close STDERR; system('mutt_dotlock', '-u', '$0'); die "OK!" if WIFEXITED(\$?); }; if($@ =~ m/OK!/) { plan tests => 7; } else { plan skip_all => "mutt_dotlock cannot be used"; exit 0; } } my $foldername = $0; my $fakefolder = bless {MB_foldername=> $foldername}, 'Mail::Box::Mbox'; my $lockfile = "$foldername.lock"; unlink $lockfile; my $locker = Mail::Box::Locker->new ( method => 'MUTT' , timeout => 1 , wait => 1 , folder => $fakefolder ); ok($locker); is($locker->name, 'MUTT', 'locker name'); ok($locker->lock, 'can lock'); ok(-f $lockfile, 'lockfile found'); ok($locker->hasLock, 'locked status'); # Already got lock, so should return immediately. my $warn = ''; { $SIG{__WARN__} = sub {$warn = "@_"}; $locker->lock; } ok($warn =~ m/already mutt-locked/, 'second attempt'); $locker->unlock; ok(! $locker->hasLock, 'released lock'); Mail-Box-2.118/tests/55locking/30nfslock.t0000644000175000001440000000164212473603434020615 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the locking methods. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use File::Spec; use Mail::Box::Locker::NFS; my $fakefolder = bless {MB_foldername=> 'this'}, 'Mail::Box'; BEGIN { if($windows) { plan skip_all => "not available on MicroSoft Windows."; exit 0; } plan tests => 7; } my $lockfile = File::Spec->catfile('folders', 'lockfiletest'); unlink $lockfile; my $locker = Mail::Box::Locker->new ( method => 'nfs' , timeout => 1 , wait => 1 , file => $lockfile , folder => $fakefolder ); ok($locker); is($locker->name, 'NFS'); ok($locker->lock); ok(-f $lockfile); ok($locker->hasLock); # Already got lock, so should return immediately. my $warn = ''; { $SIG{__WARN__} = sub {$warn = "@_"}; $locker->lock; } ok($warn =~ m/already locked over nfs/i, 'relock no problem'); $locker->unlock; ok(not $locker->hasLock); Mail-Box-2.118/tests/55locking/40posix.t0000644000175000001440000000211512473603434020315 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the locking methods. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use File::Spec; use Mail::Box::Locker::POSIX; BEGIN { if($windows) { plan skip_all => "not available on MicroSoft Windows."; exit 0; } plan tests => 7; } my $fakefolder = bless {MB_foldername=> 'this'}, 'Mail::Box'; my $lockfile = File::Spec->catfile('folders', 'lockfiletest'); unlink $lockfile; open OUT, '>', $lockfile; close OUT; my $locker = Mail::Box::Locker->new ( method => 'POSIX' , timeout => 1 , wait => 1 , file => $lockfile , folder => $fakefolder ); ok(defined $locker); is($locker->name, 'POSIX'); ok($locker->lock); ok(-f $lockfile); ok($locker->hasLock); # Already got lock, so should return immediately. my $warn = ''; { $SIG{__WARN__} = sub {$warn = "@_"}; $locker->lock; } ok($warn =~ m/already lockf/, 'relock no problem'); $locker->unlock; ok(not $locker->hasLock); close OUT; unlink $lockfile; Mail-Box-2.118/tests/55locking/10dotlock.t0000644000175000001440000000173512473603434020616 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the locking methods. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 7; use File::Spec; use Mail::Box::Locker::DotLock; my $fakefolder = bless {MB_foldername=> 'this'}, 'Mail::Box'; my $base = -d 'folders' ? 'folders' : File::Spec->catfile('tests', 'folders'); my $lockfile = File::Spec->catfile($base, 'lockfiletest'); unlink $lockfile; my $locker = Mail::Box::Locker->new ( method => 'DotLock' , timeout => 1 , wait => 1 , file => $lockfile , folder => $fakefolder ); ok($locker); is($locker->name, 'DOTLOCK', 'locker name'); ok($locker->lock, 'can lock'); ok(-f $lockfile, 'lockfile found'); ok($locker->hasLock, 'locked status'); # Already got lock, so should return immediately. my $warn = ''; { $SIG{__WARN__} = sub {$warn = "@_"}; $locker->lock; } ok($warn =~ m/already locked/, 'second attempt'); $locker->unlock; ok(! $locker->hasLock, 'released lock'); Mail-Box-2.118/tests/55locking/20flock.t0000644000175000001440000000253212473603434020252 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the locking methods. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use File::Spec; use Mail::Box::Locker::Flock; BEGIN { if($windows) { plan skip_all => "not available on MicroSoft Windows"; exit 0; } plan tests => 7; } my $fakefolder = bless {MB_foldername=> 'this'}, 'Mail::Box'; my $base = -d 'folders' ? 'folders' : File::Spec->catfile('tests', 'folders'); my $lockfile = File::Spec->catfile($base, 'lockfiletest'); unlink $lockfile; open OUT, '>', $lockfile; my $locker = Mail::Box::Locker->new ( method => 'FLOCK' , timeout => 1 , wait => 1 , file => $lockfile , folder => $fakefolder ); ok($locker, 'create locker'); is($locker->name, 'FLOCK', 'lock name'); ok($locker->lock, 'do lock'); ok(-f $lockfile, 'locked file exists'); ok($locker->hasLock, 'lock received'); # Already got lock, so should return immediately. my $warn = ''; { $SIG{__WARN__} = sub {$warn = "@_"}; $locker->lock; } ok($warn =~ m/already flocked/, 'relock no problem'); $locker->unlock; ok(! $locker->hasLock, 'unlocked'); close OUT; unlink $lockfile; Mail-Box-2.118/tests/80msgconv/0000755000175000001440000000000012473604501016643 5ustar00markovusers00000000000000Mail-Box-2.118/tests/80msgconv/Definition.pm0000644000175000001440000000112212473604425021272 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::80msgconv::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Message::Convert; message conversions"} sub critical {0} sub skip { eval "require Mail::Internet"; my $mailtools = !$@; eval "require MIME::Entity"; my $mime = !$@; return "Neighter MailTools nor MIME::Tools are installed" unless $mailtools || $mime; undef; } 1; Mail-Box-2.118/tests/80msgconv/40emabs.t0000644000175000001440000000261012473603434020266 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test coercion from Email::Abstract to Mail::Message use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use Mail::Message; BEGIN { eval {require Email::Abstract; require Email::Simple}; if($@) { plan skip_all => "requires Email::Abstract."; exit 0; } require Mail::Message; plan tests => 6; } my $email = Email::Simple->new(<<'END_MESSAGE'); From: mailtools@overmeer.net To: the users Subject: use Mail::Box In-Reply-To: <023984hjlur29420@sruoiu.nl> X-Again: repeating header X-Again: repeating header again X-Again: repeating header and again MIME::Entity is written by Eriq, and extends Mail::Internet with many new capabilities, like multipart bodies. Actually, although it says to extend, it more or less reimplements most methods and conflicts with the other. Even the Mail::Internet constructor does not work: only the build() can be used to safely construct a message. Do not use it anymore! END_MESSAGE isa_ok($email, 'Email::Simple'); is($email->header('in-reply-to'), '<023984hjlur29420@sruoiu.nl>'); my $abstract = Email::Abstract->new($email); isa_ok($abstract, 'Email::Abstract'); is($abstract->get_header('in-reply-to'), '<023984hjlur29420@sruoiu.nl>'); my $message = Mail::Message->coerce($abstract); isa_ok($message, 'Mail::Message'); is($message->get('in-reply-to'), '<023984hjlur29420@sruoiu.nl>'); Mail-Box-2.118/tests/80msgconv/30emsimp.t0000644000175000001440000000357012473603434020476 0ustar00markovusers00000000000000#!/usr/bin/env perl # Test conversions between Mail::Message and Email::Simple # # The tests are stolen from the MIME::Entity test-script, which # makes the content bogus. use strict; use warnings; use lib qw(. .. tests lib); use Tools; use Test::More; use Mail::Message; BEGIN { eval {require Email::Simple}; if($@) { plan skip_all => "requires Email::Simple."; exit 0; } require Mail::Message::Convert::EmailSimple; plan tests => 15; } my $email = Email::Simple->new(<<'END_MESSAGE'); From: mailtools@overmeer.net To: the users Subject: use Mail::Box In-Reply-To: <023984hjlur29420@sruoiu.nl> X-Again: repeating header X-Again: repeating header again X-Again: repeating header and again MIME::Entity is written by Eriq, and extends Mail::Internet with many new capabilities, like multipart bodies. Actually, although it says to extend, it more or less reimplements most methods and conflicts with the other. Even the Mail::Internet constructor does not work: only the build() can be used to safely construct a message. Do not use it anymore! END_MESSAGE isa_ok($email, 'Email::Simple'); my $convert = Mail::Message::Convert::EmailSimple->new; ok($convert); # # Convert Email::Simple to Mail::Message # my $msg = $convert->from($email); ok($msg); my $head = $msg->head; ok($head); my @from = $head->get('From'); cmp_ok(@from, "==", 1); my @again = $head->get('X-again'); is(@again, 3); my $body = $msg->body; ok($body); my @lines = $body->lines; cmp_ok(@lines, "==", 6); is($lines[-1], "use it anymore!\n"); # # Convert message back to an Email::Simple # my $back = $convert->export($msg); ok(defined $back); is($back->header('to'), "the users"); @from = $back->header('from'); cmp_ok(@from, "==", 1); @again = $back->header('x-again'); cmp_ok(@again, "==", 3); $body = $back->body; ok($body); @lines = split /\n/, $body; cmp_ok(@lines, "==", 6); Mail-Box-2.118/tests/80msgconv/20mimeent.t0000644000175000001440000000634512473603434020644 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test conversions between Mail::Message and MIME::Entity # # MIME::Parser::Filer produces msg-????-1.txt files in the # test directory :( # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use Mail::Message; BEGIN { eval {require MIME::Entity}; if($@) { plan skip_all => "requires MIME::Entity."; exit 0; } require Mail::Message::Convert::MimeEntity; plan tests => 28; } my $me = MIME::Entity->build ( From => 'mailtools@overmeer.net' , To => 'the users' , Subject => 'use Mail::Box' , 'In-Reply-To' => '<023984hjlur29420@sruoiu.nl>' , 'X-Again' => 'repeating header' , 'X-Again' => 'repeating header again' , 'X-Again' => 'repeating header and again' , Data => [ ] ); close DATA; ok($me); my $convert = Mail::Message::Convert::MimeEntity->new; ok($convert); # # Convert MIME::Entity to Mail::Message # my $msg = $convert->from($me); ok($msg); my $head = $msg->head; ok($head); # MIME::Entity makes a mess on the headers: not usefull to test the # order of the returned. my @from = $head->get('From'); cmp_ok(@from, "==", 1); my @again = $head->get('X-again'); # cmp_ok(@again, "==", 3); # Should be 3, but bug in MIME::Entity cmp_ok(@again, "==", 1); # Wrong, but to check improvements in ME my $body = $msg->body; ok($body); my @lines = $body->lines; cmp_ok(@lines, "==", 6); is($lines[-1], "use it anymore!\n"); # # Convert message back to a MIME::Entity # my $back = $convert->export($msg); ok(defined $back); $head = $back->head; is($head->get('to'), "the users\n"); @from = $head->get('from'); cmp_ok(@from, "==", 1); @again = $head->get('x-again'); cmp_ok(@again, "==", 1); $body = $back->bodyhandle; ok($body); @lines = $body->as_lines; cmp_ok(@lines, "==", 6); $back->purge; $me->purge; # # and now: MULTIPARTS! Convert MIME::Entity to Mail::Message # $me = MIME::Entity->build ( From => 'me', To => 'you', Type => 'multipart/mixed' , Subject => 'Test mp conv' , Data => [ "Some\n", "Lines\n" ] ); $me->preamble( [ "Pre1\n", "Pre2\n" ]); $me->attach(Data => [ "First part\n" ] ); $me->attach(Data => [ "Second part\n" ] ); $me->epilogue( [ "Epi1\n", "Epi2\n" ]); $msg = $convert->from($me); ok(defined $msg); ok($msg->isMultipart); my @parts = $msg->parts; cmp_ok(@parts, "==", 2); isa_ok($msg, 'Mail::Message'); isa_ok($parts[0], 'Mail::Message::Part'); isa_ok($parts[1], 'Mail::Message::Part'); $body = $msg->body; cmp_ok($body->preamble->nrLines, "==", 2); cmp_ok($body->epilogue->nrLines, "==", 2); #$msg->print(\*STDERR); $me->purge; # # Convert MULTIPART message back to a MIME::Entity # $me = $convert->export($msg); #$me->print; isa_ok($me, 'MIME::Entity'); ok($me->is_multipart); @parts = $me->parts; cmp_ok(@parts, "==", 2); isa_ok($parts[0], 'MIME::Entity'); isa_ok($parts[1], 'MIME::Entity'); $me->purge; 1; __DATA__ MIME::Entity is written by Eriq, and extends Mail::Internet with many new capabilities, like multipart bodies. Actually, although it says to extend, it more or less reimplements most methods and conflicts with the other. Even the Mail::Internet constructor does not work: only the build() can be used to safely construct a message. Do not use it anymore! Mail-Box-2.118/tests/80msgconv/10mailint.t0000644000175000001440000000361012473603434020632 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test conversions between Mail::Internet and Mail::Message # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use Mail::Message; use Mail::Message::Convert::MailInternet; BEGIN { eval {require Mail::Internet}; if($@) { warn "requires Mail::Internet.\n"; plan tests => 0; exit 0; } plan tests => 21; } my $mi = Mail::Internet->new(\*DATA); ok($mi); my $convert = Mail::Message::Convert::MailInternet->new; ok($convert); # # Convert Mail::Internet to Mail::Message # my $msg = $convert->from($mi); ok($msg); my $head = $msg->head; ok($head); my @fields = sort $head->names; cmp_ok(@fields, "==", 5); is($fields[0], 'again'); is($fields[1], 'from'); is($fields[2], 'in-reply-to'); is($fields[3], 'subject'); is($fields[4], 'to'); my @from = $head->get('from'); cmp_ok(@from, "==", 1); my @again = $head->get('again'); cmp_ok(@again, "==", 3); my $body = $msg->body; ok($body); my @lines = $body->lines; cmp_ok(@lines, "==", 6); is($lines[-1], "that.\n"); # # Convert message back to a Mail::Internet # my $back = $convert->export($msg); ok($back); $head = $back->head; @fields = $head->tags; cmp_ok(@fields, "==", 5); is($head->get('to'), "the users\n"); @from = $head->get('from'); cmp_ok(@from, "==", 1); @again = $head->get('again'); cmp_ok(@again, "==", 3); $body = $back->body; cmp_ok(@$body, "==", 6); 1; __DATA__ From: mailtools@overmeer.net To: the users Subject: use Mail::Box In-Reply-To: <023984hjlur29420@sruoiu.nl> Again: repeating header Again: repeating header again Again: repeating header and again Mail::Internet was conceived in 1995, or even earlier, and written by Graham Barr. At that time, e-mail was not very wide-spread (the beginning of WWW) and e-mails where not poluted by graphics. Attachments were even so rare that Mail::Internet cannot handle them: see MIME::Entity for that. Mail-Box-2.118/tests/50message/0000755000175000001440000000000012473604501016610 5ustar00markovusers00000000000000Mail-Box-2.118/tests/50message/Definition.pm0000644000175000001440000000060012473604424021236 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::50message::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Message::Construct; message construction"} sub critical {1} sub skip { undef } 1; Mail-Box-2.118/tests/50message/60destruct.t0000644000175000001440000000312612473603434021006 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test destruction of (folder) messages # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 58; use Mail::Box::Mbox; my @src = (folder => "=$fn", folderdir => $folderdir); # # Destruct folder messages # my $folder = Mail::Box::Mbox->new ( @src , lock_type => 'NONE' ); ok(defined $folder, 'check success open folder'); exit 1 unless defined $folder; my ($delayed, $read) = (0,0); foreach my $msg ($folder->messages) { $msg->isDelayed ? $delayed++ : $read++; } ok($delayed, 'some messages are delayed'); ok($read, 'some messages are fully read'); foreach my $msg ($folder->messages) { $msg->destruct; isa_ok($msg, 'Mail::Box::Message::Destructed', "msg ".$msg->seqnr); } isa_ok($folder->message(0), 'Mail::Box::Message::Destructed', 'first'); # some things still work my $msg0 = $folder->message(0); ok(!$msg0->isDeleted, 'destructed is not deleted'); ok($msg0->delete, 'delete is allowed'); ok($msg0->messageId, 'has message id'); $folder->close(write => 'NEVER'); # # Destruct Mail::Message # my $msg = Mail::Message->read( <get('Subject'), "hi!", 'check headers read'); is($msg->body->string, "body\n", 'check body read'); my $alias = $msg; $msg->destruct; ok(!defined $msg, 'destruct removes link'); ok(defined $alias->body, 'body still exists'); $alias->destruct; ok(!defined $alias, 'destruct removes link'); Mail-Box-2.118/tests/50message/10stripsig.t0000644000175000001440000000571312473603434021014 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test stripping signatures # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 37; use Mail::Message::Body::Construct; use Mail::Message::Body; # # No strip possible # my @lines = map { "$_\n" } qw/1 2 3 4 5/; my $body = Mail::Message::Body::Lines->new(data => \@lines); my ($stripped, $sig) = $body->stripSignature; my $equal = $stripped==$body; ok($equal, 'stripped 1'); ok(!defined $sig); cmp_ok($stripped->nrLines, "==", @lines); my $stripped2 = $body->stripSignature; $equal = $stripped2==$body; ok($equal, 'stripped 2'); # # Simple strip # @lines = map { "$_\n" } qw(a b -- sig); $body = Mail::Message::Body::Lines->new(data => \@lines); ($stripped, $sig) = $body->stripSignature; ok($stripped!=$body); ok($sig!=$body); cmp_ok($stripped->nrLines, "==", 2); my @stripped_lines = $stripped->lines; cmp_ok(@stripped_lines, "==", 2); is($stripped_lines[0], $lines[0]); is($stripped_lines[1], $lines[1]); cmp_ok($sig->nrLines, "==", 2); my @sig_lines = $sig->lines; cmp_ok(@sig_lines, "==", 2); is($sig_lines[0], $lines[2]); is($sig_lines[1], $lines[3]); # # Try signature too large # @lines = map { "$_\n" } qw/1 2 3 -- 4 5 6 7 8 9 10/; $body = Mail::Message::Body::Lines->new(data => \@lines); ($stripped, $sig) = $body->stripSignature(max_lines => 7); ok(!defined $sig); cmp_ok($stripped->nrLines, "==", 11); ($stripped, $sig) = $body->stripSignature(max_lines => 8); cmp_ok($sig->nrLines, "==", 8); @sig_lines = $sig->lines; cmp_ok(@sig_lines, "==", 8); is($sig_lines[0], $lines[3]); is($sig_lines[1], $lines[4]); is($sig_lines[-1], $lines[-1]); cmp_ok($stripped->nrLines, "==", 3); @stripped_lines = $stripped->lines; cmp_ok(@stripped_lines, "==", 3); is($stripped_lines[0], $lines[0]); is($stripped_lines[1], $lines[1]); is($stripped_lines[2], $lines[2]); # # Try whole body is signature # @lines = map { "$_\n" } qw/-- 1 2 3 4/; $body = Mail::Message::Body::Lines->new(data => \@lines); ($stripped, $sig) = $body->stripSignature(max_lines => 7); cmp_ok($sig->nrLines , "==", 5); ok(defined $stripped); cmp_ok($stripped->nrLines , "==", 0); # # Try string to find sep # @lines = map { "$_\n" } qw/1 2 3 abc 4 5 6/; $body = Mail::Message::Body::Lines->new(data => \@lines); ($stripped, $sig) = $body->stripSignature(pattern => 'b'); ok(!defined $sig); ($stripped, $sig) = $body->stripSignature(pattern => 'a'); cmp_ok($sig->nrLines , "==", 4); # # Try regexp to find sep # @lines = map { "$_\n" } qw/1 2 3 abba baab 4 5 6/; $body = Mail::Message::Body::Lines->new(data => \@lines); ($stripped, $sig) = $body->stripSignature(pattern => qr/b{2}/); ok($sig); cmp_ok($sig->nrLines , "==", 5); cmp_ok($stripped->nrLines , "==", 3); # # Try code to find sep # @lines = map { "$_\n" } qw/1 2 3 ab 4 5 6/; $body = Mail::Message::Body::Lines->new(data => \@lines); ($stripped, $sig) = $body->stripSignature(pattern => sub {$_[0] eq "ab\n"}); ok($sig); cmp_ok($sig->nrLines , "==", 4); cmp_ok($stripped->nrLines , "==", 3); Mail-Box-2.118/tests/50message/58clone.t0000644000175000001440000000307412473603434020262 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test cloning messages # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 10; use IO::Scalar; use Mail::Address; use Mail::Message; use Mail::Message::Construct; use Mail::Message::Body::Lines; use Mail::Message::Body::Multipart; use Mail::Message::Body::Nested; my $p1 = Mail::Message::Body::Lines->new ( data => [ "line of text in part 1" ] , mime_type => 'text/plain' ); my $p2 = Mail::Message::Body::Lines->new ( data => [ "line of html in part 2" ] , mime_type => 'text/html' ); my $p3 = Mail::Message::Body::Lines->new ( data => [ "I know this is not postscript" ] , mime_type => 'application/postscript' ); my $p4 = Mail::Message::Body::Nested->new ( nested => $p3 ); my $mp = Mail::Message::Body::Multipart->new ( parts => [ $p1, $p2, $p4 ] ); my $msg = Mail::Message->buildFromBody ( $mp , To => 'you@home.com' , From => 'me@perl.org' ); #$msg->printStructure(\*STDERR); ok(!defined $msg->partNumber, 'part number'); my @parts = $msg->parts; cmp_ok($parts[0]->partNumber, 'eq', 1); cmp_ok($parts[1]->partNumber, 'eq', 2); cmp_ok($parts[2]->partNumber, 'eq', 3); cmp_ok($parts[2]->body->nested->partNumber, 'eq', 3); my $msg2 = $msg->clone; ok($msg2); cmp_ok($msg2->parts , "==", 3); ok($mp->part(-1)->body->isNested); my $orig_text = ''; my $orig = IO::Scalar->new(\$orig_text); $msg->print($orig); $orig->close; my $clone_text = ''; my $clone = IO::Scalar->new(\$clone_text); $msg2->print($clone); $clone->close; ok(length $orig_text); is($orig_text, $clone_text); Mail-Box-2.118/tests/50message/30bounce.t0000644000175000001440000000330012473603434020413 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the creation of bounce messages # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 2; use IO::Scalar; use Mail::Message; use Mail::Message::Head; use Mail::Message::Body::Lines; use Mail::Message::Construct::Bounce; # # First produce a message to reply to. # my $head = Mail::Message::Head->build ( To => 'me@example.com (Me the receiver)' , From => 'him@somewhere.else.nl (Original Sender)' , Cc => 'the.rest@world.net' , Subject => 'Test of Bounce' , Date => 'Wed, 9 Feb 2000 15:44:05 -0500' , 'Content-Something' => 'something' ); my $body = Mail::Message::Body::Lines->new ( mime_type => 'text/plain' , data => <<'TEXT' First line of orig message. Another line of message. TEXT ); my $msg = Mail::Message->new(head => $head); $msg->body($body); ok(defined $msg); # # Create a bounce # my $bounce = $msg->bounce ( To => 'new@receivers.world' , From => 'I was between' , Received => 'by me' , Date => 'Fri, 7 Dec 2001 15:44:05 -0100' , 'Message-ID' => '' ); my $filedata; my $file = IO::Scalar->new(\$filedata); $bounce->print($file); compare_message_prints($filedata, <<'EXPECTED', 'bounce print') To: me@example.com (Me the receiver) From: him@somewhere.else.nl (Original Sender) Cc: the.rest@world.net Subject: Test of Bounce Date: Wed, 9 Feb 2000 15:44:05 -0500 Content-Something: something Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Received: by me Resent-Date: Fri, 7 Dec 2001 15:44:05 -0100 Resent-From: I was between Resent-To: new@receivers.world Resent-Message-ID: First line of orig message. Another line of message. EXPECTED Mail-Box-2.118/tests/50message/50rebuild.t0000644000175000001440000001754312473603434020606 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test rebuilding existing messages # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use Mail::Message; use Mail::Message::Construct::Rebuild; my $has_htmlFormatText; BEGIN { eval "require Mail::Message::Convert::HtmlFormatText"; $has_htmlFormatText = not $@; plan tests => 55 + ($has_htmlFormatText ? 6 : 1); } # # First, produce a single level multipart message to rebuild # my $message = Mail::Message->build ( To => 'me@example.com (Me the receiver)' , From => 'him@somewhere.else.nl (Original Sender)' , Subject => 'Test of rebuild' , Date => 'Wed, 9 Feb 2000 15:44:05 -0500' , data => "part 1\n" , data => "part 2\n" ); ok(defined $message, "build success"); ok($message->isMultipart, "have a multipart"); cmp_ok($message->parts, '==', 2, "have two parts"); # # Test the deletion of parts in a 1 level multipart # my $rebuild = $message->rebuild; ok(defined $rebuild, "rebuild success"); ok($rebuild==$message, "message unchanged"); my $part = $message->body->part(0); $part->delete; ok($part->isDeleted, "delete first part"); # test to keep level with one multipart $rebuild = $message->rebuild( rules => [ qw/removeDeletedParts descendMultiparts/ ]); ok(defined $rebuild, "rebuild success"); ok($rebuild!=$message, "message has changed"); ok($rebuild->isMultipart, "still has a multipart"); cmp_ok($rebuild->body->parts, '==', 1, "has only one part left"); cmp_ok($message->body->parts, '==', 2, "original still has two parts"); is($rebuild->body->mimeType, 'multipart/mixed'); # test remove multipart level when only one is left $rebuild = $message->rebuild ( extraRules => [ qw/removeDeletedParts removeEmptyMultiparts/ ] ); ok(defined $rebuild, "rebuild success"); ok($rebuild!=$message, "message has changed"); ok(! $rebuild->isMultipart, "multipart level removed"); cmp_ok($message->body->parts, '==', 2, "original still has two parts"); is($rebuild->body->string, "part 2\n", "text found"); is($rebuild->body->mimeType, 'text/plain'); # test remove all parts, which will remove level $part = $message->body->part(1); $part->delete; ok($part->isDeleted, "delete second part as well"); $rebuild = $message->rebuild ( extraRules => [ qw/removeDeletedParts removeEmptyMultiparts/ ] ); ok(!$rebuild->isMultipart, "rebuild nothing left"); like($rebuild->decoded, qr/did not contain any parts/, 'added warning'); # # Now, we play around with a nested message # $message->body->part(0)->deleted(0); $message->body->part(1)->deleted(0); my $nested = Mail::Message::Body::Nested->new ( nested => $message ); my $message2 = Mail::Message->buildFromBody ( $nested , To => 'me@example.com (Me the receiver)' , From => 'him@somewhere.else.nl (Original Sender)' , Subject => 'Test of rebuild' , Date => 'Wed, 9 Feb 2000 15:44:05 -0500' ); ok(defined $message2, "succesfully build the message2"); ok($message2->isNested, "succesfully build the nested message2"); ok($message2->body->nested->isMultipart, "a multipart within the nested"); $rebuild = $message2->rebuild ( extraRules => [ qw/removeDeletedParts removeEmptyMultiparts/ ] ); ok($rebuild==$message2, "message2 unchanged"); # only remove the wrapper $rebuild = $message2->rebuild( extraRules => [ 'flattenNesting' ] ); ok(defined $rebuild, "rebuilding message2 success"); ok($rebuild!=$message2, "message has changed"); ok($rebuild->isMultipart, "wrapper removed, multipart visible"); cmp_ok($rebuild->parts, '==', 2, "both parts are present"); # remove one part of the multipart, leaving everything else unchanged $message2->body->nested->body->part(0)->delete; $rebuild = $message2->rebuild ( rules => [ qw/removeDeletedParts descendMultiparts descendNested/ ] ); ok(defined $rebuild, "rebuilding from message2 success"); ok($rebuild!=$message2, "message has changed"); isa_ok($rebuild->body, 'Mail::Message::Body::Nested'); ok($rebuild->body->nested->isMultipart, "still has a multipart"); cmp_ok($rebuild->body->nested->body->parts, '==', 1, "has only one part left"); cmp_ok($message2->body->nested->body->parts, '==', 2, "original still has two parts"); # have the multipart level to disappear $rebuild = $message2->rebuild ( extraRules => [ qw/removeDeletedParts removeEmptyMultiparts flattenMultiparts/ ] ); ok(defined $rebuild, "rebuilding message2 without multipart success"); ok($rebuild!=$message2, "message has changed"); isa_ok($rebuild->body, 'Mail::Message::Body::Nested'); ok(! $rebuild->body->nested->isMultipart, "multipart removed"); cmp_ok($message2->body->nested->body->parts, '==', 2, "original still has two parts"); is($rebuild->body->nested->body->string, "part 2\n", "text found in message2"); # Now delete the second multipart thing as welll. $message2->body->nested->body->part(1)->delete; $rebuild = $message2->rebuild ( extraRules => [ qw/removeDeletedParts removeEmptyMultiparts flattenMultiparts/ ] ); ok(!$rebuild->isMultipart, "whole structure collapsed"); like($rebuild->decoded, qr/did not contain any parts/, 'added warning'); # # More complex rules # Create an text/plain -- text/html multipart/alternative # and then automatically remove the html alternative. my $alttext = Mail::Message::Body->new(data => "text version\n"); my $althtml = Mail::Message::Body->new ( mime_type => 'text/html' , data => "html version\n" ); my $altmp = Mail::Message::Body::Multipart->new ( mime_type => 'multipart/alternative' , parts => [ $althtml, $alttext ] ); my $alt = Mail::Message->buildFromBody($altmp, To => 'you'); ok(defined $alt, "Succesfully created an alternative"); $rebuild = $alt->rebuild; ok($rebuild==$alt, "No rule matches by default"); $rebuild = $alt->rebuild(rules => [ 'textAlternativeForHtml']); ok($rebuild==$alt, "Already has alternative"); $rebuild = $alt->rebuild ( rules => [ qw/removeHtmlAlternativeToText descendMultiparts/ ] ); ok($rebuild!=$alt, "alt must change"); ok($rebuild->isMultipart, "alt still a multipart"); cmp_ok($rebuild->body->parts, '==', 1,"only one alternative left"); is($rebuild->body->part(0)->body->mimeType, 'text/plain' , "only text alternative survived"); # now include multipart flattening $rebuild = $alt->rebuild ( rules => [ qw/removeHtmlAlternativeToText descendMultiparts flattenMultiparts/ ] ); ok($rebuild!=$alt, "flattened alt must change"); ok(!$rebuild->isMultipart, "alt is not a multipart anymore"); is($rebuild->body->mimeType,'text/plain', "text body"); # # Create an html message, and have this translated into a # multipart with text alternative. # my $html = Mail::Message::Body->new(mime_type => 'text/html', data => <

    Hi there

    this is it

    HTML $message = Mail::Message->buildFromBody($html, To => 'you', Subject => 'hi!'); ok(defined $message, "created html message"); $rebuild = $message->rebuild( rules => [ qw/textAlternativeForHtml/ ] ); # even if htmlFromText does not work, something must be returned ok(defined $rebuild, "rebuild with html->text succesful"); if($has_htmlFormatText) { ok($rebuild!=$message, "rebuild has changed it"); ok($rebuild->isMultipart, "Changed into multipart"); my @parts = $rebuild->parts; is($parts[0]->body->mimeType, 'text/plain', "Found plain text"); is($parts[1]->body->mimeType, 'text/html', "Found html"); is($rebuild->subject, 'hi!', "Subject to main message"); ok(! $parts[1]->get('subject'), "removed subject from html"); } else { ok($rebuild==$message, "rebuild has not changed it"); } Mail-Box-2.118/tests/50message/20replsubj.t0000644000175000001440000000317512473603434020777 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the creation of reply subjects # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 21; use Mail::Message::Construct::Reply; is(Mail::Message->replySubject('subject'), 'Re: subject'); is(Mail::Message->replySubject('Re: subject'), 'Re[2]: subject'); is(Mail::Message->replySubject('Re[1]: subject'), 'Re[2]: subject'); is(Mail::Message->replySubject('Re[2]: subject'), 'Re[3]: subject'); is(Mail::Message->replySubject('Re: Re: subject'), 'Re[3]: subject'); is(Mail::Message->replySubject('Re: Re[2]: subject'), 'Re[4]: subject'); is(Mail::Message->replySubject('Re Re: subject'), 'Re[3]: subject'); is(Mail::Message->replySubject('Re,Re: subject'), 'Re[3]: subject'); is(Mail::Message->replySubject('Re Re[2]: subject'), 'Re[4]: subject'); is(Mail::Message->replySubject('subject (Re)'), 'Re[2]: subject'); is(Mail::Message->replySubject('subject (Re) (Re)'), 'Re[3]: subject'); is(Mail::Message->replySubject('Re: subject (Re)'), 'Re[3]: subject'); is(Mail::Message->replySubject('subject (Forw)'), 'Re[2]: subject'); is(Mail::Message->replySubject('subject (Re) (Forw)'), 'Re[3]: subject'); is(Mail::Message->replySubject('Re: subject (Forw)'), 'Re[3]: subject'); is(Mail::Message->replySubject('subject: sub2'), 'Re: subject: sub2'); is(Mail::Message->replySubject('Re: subject: sub2'), 'Re[2]: subject: sub2'); is(Mail::Message->replySubject('subject : sub2'), 'Re: subject : sub2'); ok(Mail::Message->replySubject('Re: subject : sub2 (Forw)') eq 'Re[3]: subject : sub2'); is(Mail::Message->replySubject(''), 'Re: your mail'); is(Mail::Message->replySubject(undef), 'Re: your mail'); Mail-Box-2.118/tests/50message/21reply.t0000644000175000001440000000605712473603434020307 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the creation of reply messages # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 23; use Mail::Address; use Mail::Message; use Mail::Message::Head; use Mail::Message::Body::Lines; use Mail::Message::Construct::Reply; # # First produce a message to reply to. # my $head = Mail::Message::Head->build ( To => 'me@example.com (Me the receiver)' , From => 'him@somewhere.else.nl (Original Sender)' , Cc => 'the.rest@world.net' , Subject => 'Test of Reply' , Skip => 'Do not take this line' , Date => 'Wed, 9 Feb 2000 15:44:05 -0500' , 'Content-Something' => 'something' ); my ($text, $sig) = (<<'TEXT', <<'SIG'); First line of orig message. Another line of message. TEXT -- And this is the signature which has a few lines too SIG my @lines = split /^/, $text.$sig; my $body = Mail::Message::Body::Lines->new ( mime_type => 'text/plain' , checked => 1 , data => \@lines ); ok(defined $body, 'created body'); my $msg = Mail::Message->new(head => $head); $msg->body($body); ok(defined $msg, 'created message'); # # Create a simple reply # my $reply = $msg->reply ( strip_signature => undef , prelude => undef , quote => undef ); ok(defined $reply, 'created reply'); isa_ok($reply, 'Mail::Message'); is( $reply->head->get('to'), $msg->head->get('from')); is($reply->head->get('from'), $msg->head->get('to')); ok(!defined $reply->head->get('cc')); ok(!defined $reply->head->get('skip')); ok(!defined $reply->head->get('content-something')); #$reply->head->print(\*STDERR); #warn $reply->body->string; is($reply->body->string, $text.$sig); # # Create a complicated reply # my $postlude = Mail::Message::Body::Lines->new ( data => [ "added to the end\n", "two lines\n" ] ); $reply = $msg->reply ( group_reply => 1 , quote => '] ' , postlude => $postlude ); ok($reply->body!=$msg->body); is( $reply->head->get('to'), $msg->head->get('from')); is($reply->head->get('from'), $msg->head->get('to')); is( $reply->head->get('cc'), $msg->head->get('cc')); ok(!defined $reply->head->get('skip')); #$reply->body->print; is($reply->body->string, <<'EXPECT'); On Wed Feb 9 20:44:05 2000, Original Sender wrote: ] First line of orig message. ] Another line of message. added to the end two lines EXPECT # # Another complicated reply # $reply = $msg->reply ( group_reply => 0 , quote => sub {chomp; "> ".reverse."\n"} , postlude => $postlude , Bcc => Mail::Address->new('username', 'user@example.com') , 'X-Extra' => 'Additional headers' ); is( $reply->head->get('to'), $msg->head->get('from')); is($reply->head->get('from'), $msg->head->get('to')); ok(!defined $reply->head->get('cc')); ok(!defined $reply->head->get('skip')); is($reply->head->get('bcc'), 'username '); is($reply->head->get('x-extra'), 'Additional headers'); #$reply->print; is($reply->body->string, <<'EXPECT'); On Wed Feb 9 20:44:05 2000, Original Sender wrote: > .egassem giro fo enil tsriF > .egassem fo enil rehtonA added to the end two lines EXPECT Mail-Box-2.118/tests/50message/41forward.t0000644000175000001440000001454012473603434020616 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the creation of forwarded messages # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 25; use Mail::Address; use Mail::Message; use Mail::Message::Head; use Mail::Message::Body::Lines; use Mail::Message::Construct::Forward; # # First produce a message to forward to. # my $head = Mail::Message::Head->build ( To => 'me@example.com (Me the receiver)' , From => 'him@somewhere.else.nl (Original Sender)' , Cc => 'the.rest@world.net' , Subject => 'Test of forward' , Date => 'Wed, 9 Feb 2000 15:44:05 -0500' , 'Content-Something' => 'something' ); my ($text, $sig) = (<<'TEXT', <<'SIG'); First line of orig message. Another line of message. TEXT -- And this is the signature which has a few lines too SIG my @lines = split /^/, $text.$sig; my $body = Mail::Message::Body::Lines->new ( mime_type => 'text/plain' , data => \@lines ); ok(defined $body); my $msg = Mail::Message->new(head => $head); $msg->body($body); ok(defined $msg); # # Create a simple forward # my $forward = $msg->forward ( strip_signature => undef , prelude => undef , postlude => undef , quote => undef , To => 'dest@example.com (New someone)' ); ok(defined $forward, 'created simple forward'); isa_ok($forward, 'Mail::Message'); my @f = $forward->body->string; my @g = $msg->body->string; is(@f, @g); #$forward->print(\*STDERR); # # Create a real forward, which defaults to INLINE # my $dest = 'dest@test.org (Destination)'; $forward = $msg->forward ( quote => '] ' , To => $dest ); ok($forward->body!=$msg->body); is( $forward->head->get('to'), $dest); is($forward->head->get('from'), $msg->head->get('to')); ok(! defined $forward->head->get('cc')); #$forward->print; is($forward->body->string, <<'EXPECT'); ---- BEGIN forwarded message From: him@somewhere.else.nl (Original Sender) To: me@example.com (Me the receiver) Cc: the.rest@world.net Date: Wed, 9 Feb 2000 15:44:05 -0500 ] First line of orig message. ] Another line of message. ---- END forwarded message EXPECT # # Complicated forward # my $postlude = Mail::Message::Body::Lines->new ( data => [ "added to the end\n", "two lines\n" ] ); $forward = $msg->forward ( group_forward => 0 , quote => sub {chomp; "> ".reverse."\n"} , prelude => "From me!\n" , postlude => $postlude , Cc => 'xyz' , Bcc => Mail::Address->new('username', 'user@example.com') , To => $dest ); is( $forward->head->get('to'), $dest); is($forward->head->get('from'), $msg->head->get('to')); is($forward->head->get('cc'), 'xyz'); ok(!defined $forward->head->get('skip')); is($forward->head->get('bcc'), 'username '); #$forward->print; is($forward->body->string, <<'EXPECT'); From me! > .egassem giro fo enil tsriF > .egassem fo enil rehtonA added to the end two lines EXPECT # # Try forwardAttach # $msg = Mail::Message->build(To => 'you', 'X-Loop' => 'yes', data => "greetings!\n"); my $preamble = Mail::Message::Body->new(data => "just checking\n"); my $fwd = $msg->forwardAttach(preamble => $preamble, To => 'us'); ok(defined $fwd, "create forwardAttach"); isa_ok($fwd, 'Mail::Message'); is(reproducable_text($fwd->string."\n"), < Content-Type: multipart/mixed; boundary="boundary-" Message-Id: Date: MIME-Version: 1.0 --boundary- Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit just checking --boundary- Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit greetings! --boundary--- ATTACH # # Try forwardEncapsulate # my $fwd2 = $msg->forwardEncapsulate(preamble => $preamble, To => 'us'); ok(defined $fwd2, "create forwardEncapsulate"); is(reproducable_text($fwd2->string."\n"), < Content-Type: multipart/mixed; boundary="boundary-" Message-Id: Date: MIME-Version: 1.0 --boundary- Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit just checking --boundary- Content-Type: message/rfc822 To: you X-Loop: yes Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: Date: MIME-Version: 1.0 greetings! --boundary--- ENCAPS # # Try complex attach # my $one = Mail::Message::Body->new(data => "this is the first\n"); my $two = Mail::Message::Body->new(data => "this is the second\n", mime_type => 'application/pgp-signature'); my $multi = Mail::Message::Body::Multipart->new(parts => [ $one, $two ]); $msg = Mail::Message->buildFromBody($multi, To => 'you'); ok(defined $msg, 'created complex multipart'); my $fwd3 = $msg->forwardAttach(preamble => $preamble, To => 'us'); is(reproducable_text($fwd3->string."\n"), < Content-Type: multipart/mixed; boundary="boundary-" Message-Id: Date: MIME-Version: 1.0 --boundary- Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit just checking --boundary- Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit this is the first --boundary--- ATTACH # # Binary message used with inline, which becomes an attach # $body = Mail::Message::Body->new ( mime_type => 'application/octet-stream' , data => [ "line 1\n", "line2\n" ] ); ok($body->isBinary); $msg = Mail::Message->buildFromBody($body, To => 'you'); #$msg->print(\*STDERR); my $fwd4 = $msg->forwardInline ( prelude => "Prelude\n" , postlude => "Postlude\n" #, is_attached => "My own text\n" , To => 'everyone' ); #$fwd4->print(\*STDERR); is(reproducable_text($fwd4->string."\n"), <<'EXPECTED'); From: you To: everyone Subject: Forwarded References: Content-Type: multipart/mixed; boundary="boundary-" Message-Id: Date: MIME-Version: 1.0 --boundary- Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Prelude [The forwarded message is attached] Postlude --boundary- Content-Type: application/octet-stream Content-Transfer-Encoding: base64 bGluZSAxCmxpbmUyCg== --boundary--- EXPECTED Mail-Box-2.118/tests/50message/40forwsubj.t0000644000175000001440000000123012473603434021002 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test the creation of forward subjects # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 7; use Mail::Message::Construct::Forward; is(Mail::Message->forwardSubject('subject'), 'Forw: subject'); is(Mail::Message->forwardSubject('Re: subject'), 'Forw: Re: subject'); is(Mail::Message->forwardSubject('Re[2]: subject'), 'Forw: Re[2]: subject'); is(Mail::Message->forwardSubject('subject (forw)'), 'Forw: subject (forw)'); is(Mail::Message->forwardSubject('subject (Re)'), 'Forw: subject (Re)'); is(Mail::Message->forwardSubject(undef), 'Forwarded'); is(Mail::Message->forwardSubject(''), 'Forwarded'); Mail-Box-2.118/tests/42maildir/0000755000175000001440000000000012473604501016606 5ustar00markovusers00000000000000Mail-Box-2.118/tests/42maildir/Definition.pm0000644000175000001440000000074212473604424021243 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::42maildir::Definition; use vars '$VERSION'; $VERSION = '2.118'; use Tools qw/$windows/; sub name {"Mail::Box::Maildir; maildir folders"} sub critical { 0 } sub skip() { $windows ? 'Maildir filenames are not compatible with Windows.' : undef; } 1; Mail-Box-2.118/tests/42maildir/30append.t0000644000175000001440000000400112473603434020404 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test appending messages on Maildir folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use File::Compare; use File::Copy; use Mail::Box::Manager; use Mail::Message::Construct; BEGIN { if($windows) { plan skip_all => 'Filenames not compatible with Windows'; exit 1; } plan tests => 14; } my $mdsrc = File::Spec->catfile('folders', 'maildir.src'); unpack_mbox2maildir($src, $mdsrc); my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open ( folder => $mdsrc , extract => 'LAZY' , access => 'rw' , save_on_exit => 0 ); die "Couldn't read $mdsrc: $!\n" unless $folder; # We checked this in other scripts before, but just want to be # sure we have enough messages again. cmp_ok($folder->messages, "==", 45); # Add a message which is already in the opened folder. However, the # message heads are not yet parsed, hence the message can not be # ignored. my $message3 = $folder->message(3); ok($message3->isDelayed); my $added = $message3->clone; ok(defined $added); is(ref $added, 'Mail::Message'); ok(!$message3->isDelayed); my $coerced = $folder->addMessage($added); # coerced == added (reblessed) is(ref $added, 'Mail::Box::Maildir::Message'); is(ref $coerced, 'Mail::Box::Maildir::Message'); cmp_ok($folder->messages, "==", 45); ok(not $message3->deleted); ok($added->deleted); # # Create an Mail::Message and add this to the open folder. # my $msg = Mail::Message->build ( From => 'me@example.com' , To => 'you@anywhere.aq' , Subject => 'Just a try' , data => [ "a short message\n", "of two lines.\n" ] ); $coerced = $mgr->appendMessage($mdsrc, $msg); isa_ok($coerced, 'Mail::Box::Maildir::Message'); cmp_ok($folder->messages, "==", 46); cmp_ok($mgr->openFolders, "==", 1); $mgr->close($folder); # changes are not saved. cmp_ok($mgr->openFolders, "==", 0); $mgr->appendMessage($mdsrc, $msg , lock_type => 'NONE' , extract => 'LAZY' , access => 'rw' ); clean_dir $mdsrc; Mail-Box-2.118/tests/42maildir/20write.t0000644000175000001440000000570712473603434020304 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test writing of maildir folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use File::Compare; use File::Copy; use Mail::Box::Maildir; BEGIN { if($windows) { plan skip_all => 'Filenames not compatible with Windows'; exit 1; } plan tests => 45; } my $mdsrc = File::Spec->catfile('folders', 'maildir.src'); clean_dir $mdsrc; unpack_mbox2maildir($src, $mdsrc); my $folder = new Mail::Box::Maildir ( folder => $mdsrc , extract => 'LAZY' , access => 'rw' ); ok(defined $folder); ok($folder->message(40)->label('accepted'), "40 accepted"); ok(!$folder->message(41)->label('accepted'), "41 not accepted"); # # Count files flagged for deletion (T flag) # my $to_be_deleted =0; $_->deleted && $to_be_deleted++ foreach $folder->messages; cmp_ok($to_be_deleted, "==", 7); $folder->close; # # Reopen the folder and see whether the messages flagged for deletion # are away. # $folder = new Mail::Box::Maildir ( folder => $mdsrc , extract => 'LAZY' , access => 'rw' ); cmp_ok($folder->messages, "==", 38); my $msg6 = $folder->message(6); like($msg6->filename , qr/:2,$/); ok(!$msg6->label('draft')); ok(!$msg6->label('flagged')); ok(!$msg6->label('replied')); ok(!$msg6->label('seen')); ok(!$msg6->modified); my $msg12 = $folder->message(12); like($msg12->filename , qr/:2,DFRS$/); ok($msg12->label('draft')); ok($msg12->label('flagged')); ok($msg12->label('replied')); ok($msg12->label('seen')); ok(!$msg12->label(flagged => 0)); ok(!$msg12->label('flagged')); like($msg12->filename , qr/:2,DRS$/); ok(!$msg12->label(draft => 0)); ok(!$msg12->label('draft')); like($msg12->filename , qr/:2,RS$/); ok(!$msg12->label(seen => 0)); ok(!$msg12->label('seen')); like($msg12->filename , qr/:2,R$/); ok($msg12->label(flagged => 1)); ok($msg12->label('flagged')); like($msg12->filename , qr/:2,FR$/); ok(!$msg12->label(flagged => 0, replied => 0)); ok(!$msg12->label('flagged')); ok(!$msg12->label('replied')); like($msg12->filename , qr/:2,$/); ok(!$msg12->modified); # # Test accepting and unaccepting # # test are only run on unix, so we can simply use '/'s is($msg12->filename, 'folders/maildir.src/cur/110000010.l.43:2,'); ok($msg12->label('accepted'), "12 accepted"); cmp_ok($msg12->label(accepted => 0), '==', 0, 'un-accept a message'); ok(! $msg12->label('accepted')); is($msg12->filename, 'folders/maildir.src/new/110000010.l.43:2,'); ok(!$msg12->modified); # message is not modified ok($folder->modified); # ... but the folder is modified # (which implies nothing) cmp_ok($msg12->label(accepted => 1), '==', 1, 'accept the message'); ok($msg12->label('accepted')); is($msg12->filename, 'folders/maildir.src/cur/110000010.l.43:2,'); ok(! $folder->message(-1)->label('accepted')); $folder->message(-1)->accept; ok($folder->message(-1)->label('accepted')); $folder->close; clean_dir $mdsrc; Mail-Box-2.118/tests/42maildir/10read.t0000644000175000001440000001023612473603434020055 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test reading of Maildir folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use File::Compare; use File::Copy; use Mail::Box::Maildir; use Mail::Box::Mbox; BEGIN { if($windows) { plan skip_all => 'Filenames not compatible with Windows'; exit 1; } plan tests => 29; } my $mdsrc = File::Spec->catfile('folders', 'maildir.src'); unpack_mbox2maildir($src, $mdsrc); ok(Mail::Box::Maildir->foundIn($mdsrc)); my $folder = new Mail::Box::Maildir ( folder => $mdsrc , extract => 'LAZY' , access => 'r' , trace => 'NONE' ); ok(defined $folder); isa_ok($folder, 'Mail::Box::Maildir'); cmp_ok($folder->messages, "==", 45); is($folder->organization, 'DIRECTORY'); # # Count drafts (from Tools.pm flags) # my $drafts = 0; $_->label('draft') && $drafts++ foreach $folder->messages; cmp_ok($drafts, "==", 8); # # No single head should be read now, because extract == LAZY # the default. # my $heads = 0; foreach ($folder->messages) { $heads++ unless $_->head->isDelayed; } cmp_ok($heads, "==", 0); # # Loading a header should not be done unless really necessary. # my $message = $folder->message(7); ok($message->head->isDelayed); ok($message->filename); # already known, but should not trigger header ok($message->head->isDelayed); # # Nothing should be parsed yet # my $parsed = 0; foreach ($folder->messages) { $parsed++ if $_->isParsed; } cmp_ok($parsed, "==", 0); # # Trigger one message to get read. # ok($message->body->string); # trigger body loading. ok($message->isParsed); # # Test taking header # $message = $folder->message(8); ok(defined $message->head->get('subject')); ok(not $message->isParsed); is(ref $message->head, 'Mail::Message::Head::Complete'); # This shouldn't cause any parsings: we do lazy extract, but Mail::Box # will always take the `Subject' header for us. my @subjects = map { chomp; $_ } map {$_->head->get('subject') || '' } $folder->messages; $parsed = 0; $heads = 0; foreach ($folder->messages) { $parsed++ unless $_->isDelayed; $heads++ unless $_->head->isDelayed; } cmp_ok($parsed, "==", 1); # message 7 cmp_ok($heads, "==", 45); # # The subjects must be the same as from the original Mail::Box::Mbox # There are some differences with new-lines at the end of headerlines # my $mbox = Mail::Box::Mbox->new ( folder => $src , lock_type => 'NONE' , access => 'r' ); my @fsubjects = map { chomp; $_ } map {$_->head->get('subject') || ''} $mbox->messages; my (%subjects); $subjects{$_}++ foreach @subjects; $subjects{$_}-- foreach @fsubjects; my $missed = 0; foreach (keys %subjects) { $missed++ if $subjects{$_}; warn "Still left: $_ ($subjects{$_}x)\n" if $subjects{$_}; } ok(!$missed); # # Check if we can read a body. # my $msg3 = $folder->message(3); my $body = $msg3->body; ok(defined $body); cmp_ok(@$body, "==", 42); # check expected number of lines in message 4. $folder->close; # # Now with partially lazy extract. # my $parse_size = 5000; $folder = new Mail::Box::Maildir ( folder => $mdsrc , lock_type => 'NONE' , extract => $parse_size # messages > $parse_size bytes stay unloaded. , access => 'rw' ); ok(defined $folder); cmp_ok($folder->messages, "==", 45); $parsed = 0; $heads = 0; my $mistake = 0; foreach ($folder->messages) { $parsed++ unless $_->isDelayed; $heads++ unless $_->head->isDelayed; $mistake++ if !$_->isDelayed && $_->size > $parse_size; } ok(not $mistake); ok(not $parsed); # The new messages ok(not $heads); $folder->message($_)->head->get('subject') foreach 5..13; $parsed = 0; $heads = 0; $mistake = 0; foreach ($folder->messages) { $parsed++ unless $_->isDelayed; $heads++ unless $_->head->isDelayed; $mistake++ if !$_->isDelayed && $_->body->size > $parse_size; } ok(not $mistake); cmp_ok($parsed , "==", 7); cmp_ok($heads , "==", 9); $folder->close; # No clean-dir: see how it behaves when the folder is not explictly # closed before the program terminates. Terrible things can happen # during auto-cleanup #clean_dir $mdsrc; Mail-Box-2.118/tests/81bodyconv/0000755000175000001440000000000012473604501017013 5ustar00markovusers00000000000000Mail-Box-2.118/tests/81bodyconv/Definition.pm0000644000175000001440000000065712473604424021455 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::81bodyconv::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Message::Convert; body type conversions"} sub critical {0} sub skip() {undef} # try even when some modules are not installed. 1; Mail-Box-2.118/tests/81bodyconv/10textaf.t0000644000175000001440000000245312473603434020644 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test formatting as plain text with Text::Autoformat # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use Mail::Message; BEGIN { eval 'require Text::Autoformat'; if($@) { plan skip_all => "requires Text::Autoformat."; exit 0; } require Mail::Message::Convert::TextAutoformat; require Text::Autoformat; Text::Autoformat->import('break_wrap'); plan tests => 3; } my $content = <<'TEXT'; This is some raw text to form the body of the message which has to be printed. I hope it is nice. > some badly formatted > input lines > are also in here, to test whether autoformat works.... This line is for instance much too long and should be spread over multiple lines. TEXT my $body = Mail::Message::Body->new ( type => 'text/html' , data => $content ); my $af = Mail::Message::Convert::TextAutoformat ->new( options => {break => break_wrap} ); ok($af); my $dump = $af->autoformatBody($body); ok(defined $dump); is("$dump", <<'DUMP'); This is some raw text to form the body of the message which has to be printed. I hope it is nice. > some badly formatted input lines are also in here, to test whether > autoformat works.... This line is for instance much too long and > should be spread over multiple lines. DUMP Mail-Box-2.118/tests/81bodyconv/20html.t0000644000175000001440000000710112473603434020311 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test conversions as HTML/XHTML without help of external modules # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 7; use Mail::Message; use Mail::Message::Head::Complete; use Mail::Message::Field::Fast; use Mail::Message::Convert::Html; my $html = Mail::Message::Convert::Html->new; my $xhtml = Mail::Message::Convert::Html->new(produce => 'XHTML'); # # test fieldToHtml # my $to = Mail::Message::Field::Fast->new(To => 'me@example.com (Mark Overmeer)'); is($html->fieldToHtml($to), 'To: me@example.com (Mark Overmeer)'); my $to2 = Mail::Message::Field::Fast->new('reply-to' => 'me@example.com, you@tux.aq'); is($html->fieldToHtml($to2), 'Reply-To: me@example.com, you@tux.aq'); # # test headToHtmlTable # my $head = Mail::Message::Head::Complete->new; $head->add(To => 'me@example.com (Mark Overmeer)'); $head->add(From => 'you@tux.aq, john.doe@some.where.else (Doe, John)'); $head->add('X-Sender' => 'Mail::Box software cooperation'); $head->add(Subject => 'No e-mail@at.this.line'); my $table_dump = <<'TABLE-DUMP'; "50%">
    To: me@example.com (Mark Overmeer)
    From: you@tux.aq, john.doe@some.where.else (Doe, John)
    Subject: No e-mail@at.this.line
    TABLE-DUMP my $table = $html->headToHtmlTable($head, 'width=>"50%"'); is($table, $table_dump); my $xtable = $xhtml->headToHtmlTable($head, 'width=>"50%"'); is($xtable, $table_dump); # # test headToHtmlHead # my $html_head_dump = <<'HTML_HEAD_DUMP'; No e-mail@at.this.line HTML_HEAD_DUMP my $html_head = $html->headToHtmlHead($head); is($html_head, $html_head_dump); (my $xhtml_head_dump = $html_head_dump) =~ s!"\>!" />!g; my $xhtml_head = $xhtml->headToHtmlHead($head); is($xhtml_head, $xhtml_head_dump); $html_head = $html->headToHtmlHead ( $head , title => 'Title, not subject' , keywords => 'html tags like < and >, & and ", must be encoded' ); $html_head_dump = <<'HTML_HEAD_DUMP'; Title, not subject HTML_HEAD_DUMP is($html_head, $html_head_dump); $html_head = $html->headToHtmlHead ( $head , title => 'Title, not subject' , keywords => 'html tags' , subject => '' , extra => 'new one' , TO => 'overrule' ); $html_head_dump = <<'HTML_HEAD_DUMP'; Title, not subject HTML_HEAD_DUMP exit 0; Mail-Box-2.118/tests/81bodyconv/31htmltxt.t0000644000175000001440000000277712473603434021071 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test conversions from HTML/XHTML to plain text with HTML::FormatText # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use Mail::Message::Body::Lines; BEGIN { eval 'require HTML::FormatText'; if($@) { plan skip_all => "requires HTML::FormatText.\n"; exit 0; } require Mail::Message::Convert::HtmlFormatText; plan tests => 7; } my $html = Mail::Message::Convert::HtmlFormatText->new; my $body = Mail::Message::Body::Lines->new ( type => 'text/html' , data => $raw_html_data ); my $f = $html->format($body); ok(defined $f); ok(ref $f); isa_ok($f, 'Mail::Message::Body'); is($f->mimeType, 'text/plain'); is($f->charset, 'iso-8859-1'); is($f->transferEncoding, 'none'); is($f->string, <<'EXPECTED'); Life according to Brian ======================= This is normal text, but not in a paragraph. New paragraph in a bad way. And this is just a continuation. When texts get long, they must be auto-wrapped; and even that is working already. Silly subsection at once and another chapter =================== again a section --------------- Normal paragraph, which contains an [IMAGE], some italics with linebreak and code And now for the preformatted stuff it should stay as it was even with strange blanks and indentations And back to normal text... * list item 1 1. list item 1.1 2. list item 1.2 * list item 2 EXPECTED exit 0; Mail-Box-2.118/tests/81bodyconv/30htmlps.t0000644000175000001440000000154012473603434020656 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test conversions from HTML/XHTML to postscript with HTML::FormatPS # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use Mail::Message::Body::Lines; BEGIN { eval 'require HTML::FormatPS'; if($@) { plan skip_all => "requires HTML::FormatPS.\n"; exit 0; } require Mail::Message::Convert::HtmlFormatPS; plan tests => 5; } my $html = Mail::Message::Convert::HtmlFormatPS->new; my $body = Mail::Message::Body::Lines->new ( type => 'text/html' , data => $raw_html_data ); my $f = $html->format($body); ok(defined $f); ok(ref $f); isa_ok($f, 'Mail::Message::Body'); is($f->type, 'application/postscript'); is($f->transferEncoding, 'none'); # The result of the conversion is not checked, because the output # is rather large and may vary over versions of HTML::FormatPS Mail-Box-2.118/tests/53threads/0000755000175000001440000000000012473604501016621 5ustar00markovusers00000000000000Mail-Box-2.118/tests/53threads/Definition.pm0000644000175000001440000000056512473604424021261 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::53threads::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Box::Threads; message threads"} sub critical {0} sub skip { undef } 1; Mail-Box-2.118/tests/53threads/10single.t0000644000175000001440000000035612473603434020440 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test threads over multi-folders. # use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More tests => 1; #use Mail::Box::Manager; pass(" * Multi-folder threads status ALPHA (not tested)"); Mail-Box-2.118/tests/folders/0000755000175000001440000000000012473604501016455 5ustar00markovusers00000000000000Mail-Box-2.118/tests/folders/mbox.cpy0000644000175000001440000041010212473604500020134 0ustar00markovusers00000000000000From magick-owner@unca-don.wizards.dupont.com Wed Feb 9 22:02 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id WAA23694 for ; Wed, 9 Feb 2000 22:02:24 +0100 (MET) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id WAA01128 for ; Wed, 9 Feb 2000 22:02:24 +0100 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma001126; Wed, 9 Feb 00 22:02:01 +0100 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id QAA21962; Wed, 9 Feb 2000 16:00:43 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id PAA29389 for magick-outgoing; Wed, 9 Feb 2000 15:38:42 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Date: Wed, 9 Feb 2000 15:44:05 -0500 From: William Park To: Mark Sappol Cc: "magick@wizards.dupont.com" Subject: Re: File Conversion From HTML to PS and TIFF Message-ID: <20000209154405.C265@better.net> Mail-Followup-To: Mark Sappol , "magick@wizards.dupont.com" References: <38A11D0E.A2064062@ipicorp.com> Mime-Version: 1.0 X-Mailer: Mutt 1.0pre3i In-Reply-To: <38A11D0E.A2064062@ipicorp.com> Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: William Park Content-Type: text/plain; charset=us-ascii Status: RO Content-Length: 1280 Lines: 33 On Wed, Feb 09, 2000 at 07:53:50AM +0000, Mark Sappol wrote: > I am new to this list so please forgive me if I am asking something that > has already been answered previously. I did check the archives but too > no avail. > > I need to create a postscript file from an HTML document. I have no > problem here with the text but I do have a logo (gif file) on this > document which does not get converted. How can I go about converting > the HTML documents I generate, along with any linked GIF images, to > PostScript, as well as at other times, to TIFF? > > I would appreciate any feedback and help on this request. > > Thanks in advance, > Mark You can convert .html to .ps using Netscape. You can do this manually by clicking mouse, or through '-remote' command line option. For example, netscape -remote "openURL(http://sexybabes.for.you/)" \ -remote "saveAs(xxx.ps, Postscript)" You can then convert .ps to .tiff like FAX program does. William *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Wed Feb 9 23:15 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id XAA24500 for ; Wed, 9 Feb 2000 23:15:56 +0100 (MET) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id XAA01235 for ; Wed, 9 Feb 2000 23:15:55 +0100 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma001233; Wed, 9 Feb 00 23:15:42 +0100 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id RAA04724; Wed, 9 Feb 2000 17:13:49 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id QAA29779 for magick-outgoing; Wed, 9 Feb 2000 16:56:19 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-Id: <200002092200.RAA19561@mailfw3.ford.com> Date: Wed, 09 Feb 2000 17:00:14 -0500 From: "Lincoln, D. E. (Daniel)" Organization: R&VT VCP&M X-Mailer: Mozilla 4.7C-CCK-MCD cf47 [en] (X11; I; SunOS 5.6 sun4u) X-Accept-Language: en, en-GB, de, fr, ja, ko, zh Mime-Version: 1.0 To: Jeffrey Krzysztow Cc: William Park , Mark Sappol , "magick@wizards.dupont.com" Subject: Re: File Conversion From HTML to PS and TIFF References: <38A11D0E.A2064062@ipicorp.com> <20000209154405.C265@better.net> <38A1DBE7.9D3718C9@pvii.com> Content-Transfer-Encoding: 7bit Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: "Lincoln, D. E. (Daniel)" Content-Type: text/plain; charset=us-ascii Status: RO Content-Length: 2109 Lines: 60 If I may interject... It can be found at: http://developer.netscape.com/docs/manuals/deploymt/options.htm Jeffrey Krzysztow wrote: > > William, > > Where did you find information about -remote command line option for Netscape? > > William Park wrote: > > > On Wed, Feb 09, 2000 at 07:53:50AM +0000, Mark Sappol wrote: > > > I am new to this list so please forgive me if I am asking something that > > > has already been answered previously. I did check the archives but too > > > no avail. > > > > > > I need to create a postscript file from an HTML document. I have no > > > problem here with the text but I do have a logo (gif file) on this > > > document which does not get converted. How can I go about converting > > > the HTML documents I generate, along with any linked GIF images, to > > > PostScript, as well as at other times, to TIFF? > > > > > > I would appreciate any feedback and help on this request. > > > > > > Thanks in advance, > > > Mark > > > > You can convert .html to .ps using Netscape. You can do this manually > > by clicking mouse, or through '-remote' command line option. For > > example, > > netscape -remote "openURL(http://sexybabes.for.you/)" \ > > -remote "saveAs(xxx.ps, Postscript)" > > > > You can then convert .ps to .tiff like FAX program does. > > > > William > > > > *********************************************************************** > > To remove yourself from this mailing list, send mail to: > > majordomo@wizards.dupont.com > > > > Include the following command in the body of your message: > > unsubscribe magick > > *********************************************************************** -- Regards, Daniel E. Lincoln - Digital Buck Mechanic Ford Motor Company - R&VT Vehicle CAD Process & Methods *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Wed Feb 9 23:15 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id XAA24495 for ; Wed, 9 Feb 2000 23:15:26 +0100 (MET) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id XAA01230 for ; Wed, 9 Feb 2000 23:15:25 +0100 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma001228; Wed, 9 Feb 00 23:15:21 +0100 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id RAA04756; Wed, 9 Feb 2000 17:13:55 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id QAA29764 for magick-outgoing; Wed, 9 Feb 2000 16:55:37 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <38A1E3B0.F148D74A@websidestory.com> Date: Wed, 09 Feb 2000 14:01:20 -0800 From: Steve Dotson X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.5-15 i686) X-Accept-Language: en MIME-Version: 1.0 To: Jeffrey Krzysztow CC: William Park , Mark Sappol , "magick@wizards.dupont.com" Subject: Re: File Conversion From HTML to PS and TIFF References: <38A11D0E.A2064062@ipicorp.com> <20000209154405.C265@better.net> <38A1DBE7.9D3718C9@pvii.com> Content-Transfer-Encoding: 7bit Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Steve Dotson Content-Type: text/plain; charset=us-ascii Status: RO Content-Length: 2129 Lines: 63 http://home.netscape.com/newsref/std/x-remote.html Jeffrey Krzysztow wrote: > > William, > > Where did you find information about -remote command line option for Netscape? > > William Park wrote: > > > On Wed, Feb 09, 2000 at 07:53:50AM +0000, Mark Sappol wrote: > > > I am new to this list so please forgive me if I am asking something that > > > has already been answered previously. I did check the archives but too > > > no avail. > > > > > > I need to create a postscript file from an HTML document. I have no > > > problem here with the text but I do have a logo (gif file) on this > > > document which does not get converted. How can I go about converting > > > the HTML documents I generate, along with any linked GIF images, to > > > PostScript, as well as at other times, to TIFF? > > > > > > I would appreciate any feedback and help on this request. > > > > > > Thanks in advance, > > > Mark > > > > You can convert .html to .ps using Netscape. You can do this manually > > by clicking mouse, or through '-remote' command line option. For > > example, > > netscape -remote "openURL(http://sexybabes.for.you/)" \ > > -remote "saveAs(xxx.ps, Postscript)" > > > > You can then convert .ps to .tiff like FAX program does. > > > > William > > > > *********************************************************************** > > To remove yourself from this mailing list, send mail to: > > majordomo@wizards.dupont.com > > > > Include the following command in the body of your message: > > unsubscribe magick > > *********************************************************************** -- Steve Dotson Software Engineer WebSideStory, Inc. 10182 Telesis Court, Sixth Floor San Diego, California 92121 P: 858.546.0040 ext. 417 F: 858.546.0480 E: steve@websidestory.com *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Wed Feb 23 17:28 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id RAA20894 for ; Wed, 23 Feb 2000 17:28:05 +0100 (MET) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id RAA21883 for ; Wed, 23 Feb 2000 17:28:04 +0100 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma021881; Wed, 23 Feb 00 17:27:46 +0100 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id LAA28560; Wed, 23 Feb 2000 11:25:57 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id KAA09345 for magick-outgoing; Wed, 23 Feb 2000 10:53:09 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <177E035AF8BDD311858B00A0C9D8E324886A3B@EMAILSRVR_KPR> From: Steve Sapovits To: magick@wizards.dupont.com Subject: Transparency question Date: Wed, 23 Feb 2000 10:58:16 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Steve Sapovits Content-Type: text/plain Status: RO Content-Length: 1447 Lines: 42 I'm trying to do the following: 1) Take a JPEG image and size it down to a particular size. 2) Overlay that JPEG on top of an GIF image to form a combined result. This works fine for the most part: I use mogrify to resize, followed by combine to overlay. Now I'm presented with GIF images (the ones the JPEG is put on top of) that have colors or other background attributes we want to 'show through' the overlay where there is no image. Even without any transparency options this seems to ALMOST work. The problem is that there's a small area around each image of 'white' that always shows up. Trying transparency or the 'matte' option of '-draw' seems to have no effect. Any ideas? I'm an engineer -- not an image expert. The images in question are handed to me. I can change them if necessary and if it can be done via the ImageMagick tool. The volume we generate makes manual changes to each image out of the question. ---- Steve Sapovits Global Sports Interactive Work Email: sapovitss@globalsportsinc.com Home Email: steves@delanet.com Work Phone: 610-491-7087 Cell: 610-574-7706 Pager: 877-239-4003 *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Wed Feb 23 20:13 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id UAA24120 for ; Wed, 23 Feb 2000 20:13:38 +0100 (MET) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id UAA22110 for ; Wed, 23 Feb 2000 20:13:38 +0100 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma022108; Wed, 23 Feb 00 20:13:37 +0100 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id OAA00687; Wed, 23 Feb 2000 14:11:56 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id NAA10192 for magick-outgoing; Wed, 23 Feb 2000 13:26:44 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <177E035AF8BDD311858B00A0C9D8E324886AB2@EMAILSRVR_KPR> From: Steve Sapovits To: Steve Sapovits , magick@wizards.dupont.com Subject: RE: Transparency question Date: Wed, 23 Feb 2000 13:31:41 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Steve Sapovits Content-Type: text/plain Status: RO Content-Length: 2483 Lines: 73 Someone on this list and my image folks here seem to confirm that the problem here is with 'fringe' pixels that were not trimmed back as neatly as possible. Any suggestions for automating this? This whole thing needs to be batched. I played with the transparency and fuzz options with no real difference noted. Trying crop 0x0 makes some of the fringe whitespace areas neater, but it doesn't get rid of them. Any suggestions? > -----Original Message----- > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > Sent: Wednesday, February 23, 2000 10:58 AM > To: magick@wizards.dupont.com > Subject: Transparency question > > > I'm trying to do the following: > > 1) Take a JPEG image and size it down to a particular size. > 2) Overlay that JPEG on top of an GIF image to form a combined result. > > This works fine for the most part: I use mogrify to resize, followed by > combine to overlay. > > Now I'm presented with GIF images (the ones the JPEG is put on top of) > that have colors or other background attributes we want to 'show through' > the overlay where there is no image. > > Even without any transparency options this seems to ALMOST work. The > problem is that there's a small area around each image of 'white' that > always > shows up. Trying transparency or the 'matte' option of '-draw' seems to > have > no effect. > > Any ideas? I'm an engineer -- not an image expert. The images in > question > are handed to me. I can change them if necessary and if it can be done > via > the ImageMagick tool. The volume we generate makes manual changes to > each image out of the question. > > ---- > Steve Sapovits > Global Sports Interactive > Work Email: sapovitss@globalsportsinc.com > Home Email: steves@delanet.com > Work Phone: 610-491-7087 > Cell: 610-574-7706 > Pager: 877-239-4003 > > > *********************************************************************** > To remove yourself from this mailing list, send mail to: > majordomo@wizards.dupont.com > > Include the following command in the body of your message: > unsubscribe magick > *********************************************************************** *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Thu Feb 24 17:27 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id RAA19964 for ; Thu, 24 Feb 2000 17:27:35 +0100 (MET) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id RAA23400 for ; Thu, 24 Feb 2000 17:27:34 +0100 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma023398; Thu, 24 Feb 00 17:27:10 +0100 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id LAA14646; Thu, 24 Feb 2000 11:25:37 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id LAA15770 for magick-outgoing; Thu, 24 Feb 2000 11:04:56 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <8100014B48DAD111AA4100805F9F3FC903A0E5B2@host60.corbis.com> From: Bill Radcliffe To: "'Steve Sapovits'" , "'magick@wizards.dupont.com'" Subject: RE: Transparency question Date: Thu, 24 Feb 2000 08:06:44 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Bill Radcliffe Content-Type: text/plain Status: RO Content-Length: 3362 Lines: 93 It would help me if you could send some small samples of exactly the effect you are trying to achieve. I'm sure IM can do whatever you want but the road to get there may not be at all obvious. > -----Original Message----- > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > Sent: Wednesday, February 23, 2000 10:32 AM > To: Steve Sapovits; magick@wizards.dupont.com > Subject: RE: Transparency question > > > Someone on this list and my image folks here seem to confirm that the > problem > here is with 'fringe' pixels that were not trimmed back as neatly as > possible. Any > suggestions for automating this? This whole thing needs to be batched. I > played > with the transparency and fuzz options with no real difference noted. > Trying > crop 0x0 makes some of the fringe whitespace areas neater, but it doesn't > get rid > of them. > > Any suggestions? > > > -----Original Message----- > > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > > Sent: Wednesday, February 23, 2000 10:58 AM > > To: magick@wizards.dupont.com > > Subject: Transparency question > > > > > > I'm trying to do the following: > > > > 1) Take a JPEG image and size it down to a particular size. > > 2) Overlay that JPEG on top of an GIF image to form a combined result. > > > > This works fine for the most part: I use mogrify to resize, followed by > > > combine to overlay. > > > > Now I'm presented with GIF images (the ones the JPEG is put on top of) > > that have colors or other background attributes we want to 'show > through' > > the overlay where there is no image. > > > > Even without any transparency options this seems to ALMOST work. The > > problem is that there's a small area around each image of 'white' that > > always > > shows up. Trying transparency or the 'matte' option of '-draw' seems to > > have > > no effect. > > > > Any ideas? I'm an engineer -- not an image expert. The images in > > question > > are handed to me. I can change them if necessary and if it can be done > > via > > the ImageMagick tool. The volume we generate makes manual changes to > > each image out of the question. > > > > ---- > > Steve Sapovits > > Global Sports Interactive > > Work Email: sapovitss@globalsportsinc.com > > Home Email: steves@delanet.com > > Work Phone: 610-491-7087 > > Cell: 610-574-7706 > > Pager: 877-239-4003 > > > > > > *********************************************************************** > > To remove yourself from this mailing list, send mail to: > > majordomo@wizards.dupont.com > > > > Include the following command in the body of your message: > > unsubscribe magick > > *********************************************************************** > > *********************************************************************** > To remove yourself from this mailing list, send mail to: > majordomo@wizards.dupont.com > > Include the following command in the body of your message: > unsubscribe magick > *********************************************************************** *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Thu Feb 24 18:17 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id SAA21506 for ; Thu, 24 Feb 2000 18:17:36 +0100 (MET) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id SAA23500 for ; Thu, 24 Feb 2000 18:17:35 +0100 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma023498; Thu, 24 Feb 00 18:17:21 +0100 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id MAA27594; Thu, 24 Feb 2000 12:14:53 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id LAA16076 for magick-outgoing; Thu, 24 Feb 2000 11:52:40 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <8100014B48DAD111AA4100805F9F3FC903A0E5B9@host60.corbis.com> From: Bill Radcliffe To: "'Steve Sapovits'" Cc: "'magick@wizards.dupont.com'" Subject: RE: Transparency question Date: Thu, 24 Feb 2000 08:54:32 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Bill Radcliffe Content-Type: text/plain; charset="ISO-8859-1" Status: RO Content-Length: 5643 Lines: 161 Your problem is that you are trying to use transparency, but you really want to use alpha channel blending. I'll show you how if you can send me another copy of MCS_C_11452.gif before it is flattened out into a GIF file. You need to have an input file were the "image" pixels are in the RGB parts of the file, and the "cutout" is in the "alpha" channel. The alpha channel contains a value for each and every pixel that defines the opacity of the pixel. Two file formats that support this are Photoshop and TIFF. > -----Original Message----- > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > Sent: Thursday, February 24, 2000 8:34 AM > To: Bill Radcliffe > Subject: RE: Transparency question > > > Good idea, of course. > > This is run from a bigger program but I distilled it down to a simpler > set of commands to reproduce. I run these two commands: > > mogrify -geometry 120x120! 'MCS_C_11452.gif' > combine 'MCS_C_120x150.gif' -gravity south 'MCS_C_11452.gif' -compose over > 'result.gif' > > I get this output: > > mogrify: no delegates configuration file found (delegates.mgk). > mogrify: no encode delegate for this image format (Y). > combine: no delegates configuration file found (delegates.mgk). > > I've gotten these 'delegates' messages before with no ill effects. > > Here are the files I'm using. The 'result.gif' has the whitespace I > mentioned. Any help > would be greatly appreciated. I'll write a perl program for you in > exchange > or something. 8-) > > <> <> <> > > > > -----Original Message----- > > From: Bill Radcliffe [SMTP:BillR@corbis.com] > > Sent: Thursday, February 24, 2000 11:07 AM > > To: 'Steve Sapovits'; 'magick@wizards.dupont.com' > > Subject: RE: Transparency question > > > > It would help me if you could send some small samples of exactly the > > effect > > you are trying to achieve. I'm sure IM can do whatever you want but the > > road > > to get there may not be at all obvious. > > > > > -----Original Message----- > > > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > > > Sent: Wednesday, February 23, 2000 10:32 AM > > > To: Steve Sapovits; magick@wizards.dupont.com > > > Subject: RE: Transparency question > > > > > > > > > Someone on this list and my image folks here seem to confirm that the > > > problem > > > here is with 'fringe' pixels that were not trimmed back as neatly as > > > possible. Any > > > suggestions for automating this? This whole thing needs to be > batched. > > I > > > played > > > with the transparency and fuzz options with no real difference noted. > > > Trying > > > crop 0x0 makes some of the fringe whitespace areas neater, but it > > doesn't > > > get rid > > > of them. > > > > > > Any suggestions? > > > > > > > -----Original Message----- > > > > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > > > > Sent: Wednesday, February 23, 2000 10:58 AM > > > > To: magick@wizards.dupont.com > > > > Subject: Transparency question > > > > > > > > > > > > I'm trying to do the following: > > > > > > > > 1) Take a JPEG image and size it down to a particular size. > > > > 2) Overlay that JPEG on top of an GIF image to form a combined > > result. > > > > > > > > This works fine for the most part: I use mogrify to resize, > followed > > by > > > > > > > combine to overlay. > > > > > > > > Now I'm presented with GIF images (the ones the JPEG is put on top > of) > > > > that have colors or other background attributes we want to 'show > > > through' > > > > the overlay where there is no image. > > > > > > > > Even without any transparency options this seems to ALMOST work. > The > > > > problem is that there's a small area around each image of 'white' > that > > > > always > > > > shows up. Trying transparency or the 'matte' option of '-draw' > seems > > to > > > > have > > > > no effect. > > > > > > > > Any ideas? I'm an engineer -- not an image expert. The images in > > > > question > > > > are handed to me. I can change them if necessary and if it can be > > done > > > > via > > > > the ImageMagick tool. The volume we generate makes manual changes > to > > > > each image out of the question. > > > > > > > > ---- > > > > Steve Sapovits > > > > Global Sports Interactive > > > > Work Email: sapovitss@globalsportsinc.com > > > > Home Email: steves@delanet.com > > > > Work Phone: 610-491-7087 > > > > Cell: 610-574-7706 > > > > Pager: 877-239-4003 > > > > > > > > > > > > > > *********************************************************************** > > > > To remove yourself from this mailing list, send mail to: > > > > majordomo@wizards.dupont.com > > > > > > > > Include the following command in the body of your message: > > > > unsubscribe magick > > > > > > *********************************************************************** > > > > > > > *********************************************************************** > > > To remove yourself from this mailing list, send mail to: > > > majordomo@wizards.dupont.com > > > > > > Include the following command in the body of your message: > > > unsubscribe magick > > > > *********************************************************************** << > File: MCS_C_11452.gif >> << File: MCS_C_120x150.gif >> << File: > result.gif >> *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Thu Feb 24 20:21 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id UAA23276 for ; Thu, 24 Feb 2000 20:21:08 +0100 (MET) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id UAA23679 for ; Thu, 24 Feb 2000 20:21:08 +0100 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma023676; Thu, 24 Feb 00 20:20:57 +0100 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id OAA10625; Thu, 24 Feb 2000 14:17:28 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id NAA16562 for magick-outgoing; Thu, 24 Feb 2000 13:40:21 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <8100014B48DAD111AA4100805F9F3FC903A0E5BF@host60.corbis.com> From: Bill Radcliffe To: "'Steve Sapovits'" Cc: "'magick@wizards.dupont.com'" Subject: RE: Transparency question Date: Thu, 24 Feb 2000 10:42:23 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Bill Radcliffe Content-Type: text/plain; charset="ISO-8859-1" Status: RO Content-Length: 7382 Lines: 206 OK - here is a "possible" solution. This sequence relies on the fact that the input image was originally composited on a white background. It takes the image and generates a "fake" alpha channel (mask) and uses this during the compositing operation. It looks pretty good, but has the disadvantage that the background will tend to influence the colors in the final image more then you would want. : first convert to an RGB format with no more transparency or mask channel convert -compression none MCS_C_11452.gif MCS_C_11452_rgb.bmp : now make a fake alpha channel using a grayscale version of the image (inverted) convert -compression none -colorspace gray -negate MCS_C_11452.gif MCS_C_11452_a.bmp : combine the original image along with the fake alpha channel onto the background combine -gravity south -compose over MCS_C_120x150.gif MCS_C_11452.gif MCS_C_11452_a.bmp result.gif > -----Original Message----- > From: Bill Radcliffe > Sent: Thursday, February 24, 2000 8:55 AM > To: 'Steve Sapovits' > Cc: 'magick@wizards.dupont.com' > Subject: RE: Transparency question > > Your problem is that you are trying to use transparency, but you really > want > to use alpha channel blending. I'll show you how if you can send me > another > copy of MCS_C_11452.gif before it is flattened out into a GIF file. You > need > to have an input file were the "image" pixels are in the RGB parts of the > file, and the "cutout" is in the "alpha" channel. The alpha channel > contains > a value for each and every pixel that defines the opacity of the pixel. > Two > file formats that support this are Photoshop and TIFF. > > > -----Original Message----- > > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > > Sent: Thursday, February 24, 2000 8:34 AM > > To: Bill Radcliffe > > Subject: RE: Transparency question > > > > > > Good idea, of course. > > > > This is run from a bigger program but I distilled it down to a simpler > > set of commands to reproduce. I run these two commands: > > > > mogrify -geometry 120x120! 'MCS_C_11452.gif' > > combine 'MCS_C_120x150.gif' -gravity south 'MCS_C_11452.gif' -compose > over > > 'result.gif' > > > > I get this output: > > > > mogrify: no delegates configuration file found (delegates.mgk). > > mogrify: no encode delegate for this image format (Y). > > combine: no delegates configuration file found (delegates.mgk). > > > > I've gotten these 'delegates' messages before with no ill effects. > > > > Here are the files I'm using. The 'result.gif' has the whitespace I > > mentioned. Any help > > would be greatly appreciated. I'll write a perl program for you in > > exchange > > or something. 8-) > > > > <> <> <> > > > > > > > -----Original Message----- > > > From: Bill Radcliffe [SMTP:BillR@corbis.com] > > > Sent: Thursday, February 24, 2000 11:07 AM > > > To: 'Steve Sapovits'; 'magick@wizards.dupont.com' > > > Subject: RE: Transparency question > > > > > > It would help me if you could send some small samples of exactly the > > > effect > > > you are trying to achieve. I'm sure IM can do whatever you want but > the > > > road > > > to get there may not be at all obvious. > > > > > > > -----Original Message----- > > > > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > > > > Sent: Wednesday, February 23, 2000 10:32 AM > > > > To: Steve Sapovits; magick@wizards.dupont.com > > > > Subject: RE: Transparency question > > > > > > > > > > > > Someone on this list and my image folks here seem to confirm that > the > > > > problem > > > > here is with 'fringe' pixels that were not trimmed back as neatly as > > > > possible. Any > > > > suggestions for automating this? This whole thing needs to be > > batched. > > > I > > > > played > > > > with the transparency and fuzz options with no real difference > noted. > > > > Trying > > > > crop 0x0 makes some of the fringe whitespace areas neater, but it > > > doesn't > > > > get rid > > > > of them. > > > > > > > > Any suggestions? > > > > > > > > > -----Original Message----- > > > > > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > > > > > Sent: Wednesday, February 23, 2000 10:58 AM > > > > > To: magick@wizards.dupont.com > > > > > Subject: Transparency question > > > > > > > > > > > > > > > I'm trying to do the following: > > > > > > > > > > 1) Take a JPEG image and size it down to a particular size. > > > > > 2) Overlay that JPEG on top of an GIF image to form a combined > > > result. > > > > > > > > > > This works fine for the most part: I use mogrify to resize, > > followed > > > by > > > > > > > > > combine to overlay. > > > > > > > > > > Now I'm presented with GIF images (the ones the JPEG is put on top > > of) > > > > > that have colors or other background attributes we want to 'show > > > > through' > > > > > the overlay where there is no image. > > > > > > > > > > Even without any transparency options this seems to ALMOST work. > > The > > > > > problem is that there's a small area around each image of 'white' > > that > > > > > always > > > > > shows up. Trying transparency or the 'matte' option of '-draw' > > seems > > > to > > > > > have > > > > > no effect. > > > > > > > > > > Any ideas? I'm an engineer -- not an image expert. The images in > > > > > question > > > > > are handed to me. I can change them if necessary and if it can be > > > done > > > > > via > > > > > the ImageMagick tool. The volume we generate makes manual changes > > to > > > > > each image out of the question. > > > > > > > > > > ---- > > > > > Steve Sapovits > > > > > Global Sports Interactive > > > > > Work Email: sapovitss@globalsportsinc.com > > > > > Home Email: steves@delanet.com > > > > > Work Phone: 610-491-7087 > > > > > Cell: 610-574-7706 > > > > > Pager: 877-239-4003 > > > > > > > > > > > > > > > > > > > *********************************************************************** > > > > > To remove yourself from this mailing list, send mail to: > > > > > majordomo@wizards.dupont.com > > > > > > > > > > Include the following command in the body of your message: > > > > > unsubscribe magick > > > > > > > > > *********************************************************************** > > > > > > > > > > *********************************************************************** > > > > To remove yourself from this mailing list, send mail to: > > > > majordomo@wizards.dupont.com > > > > > > > > Include the following command in the body of your message: > > > > unsubscribe magick > > > > > > *********************************************************************** > << > > File: MCS_C_11452.gif >> << File: MCS_C_120x150.gif >> << File: > > result.gif >> > > *********************************************************************** > To remove yourself from this mailing list, send mail to: > majordomo@wizards.dupont.com > > Include the following command in the body of your message: > unsubscribe magick > *********************************************************************** *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From markov Sun Aug 8 10:04:17 1999 Subject: Resize with Transparency To: magick@wizards.dupont.com Date: Sun, 8 Aug 1999 10:04:17 +0200 (MET DST) Reply-To: markov@ATComputing.nl (Mark Overmeer) X-Mailer: ELM [version 2.4 PL21] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Status: RO Content-Length: 1376 Lines: 37 Hi, Maybe someone knows a solution, maybe for enhancement: I have an image (say black on white), where white is set to be transparent. I can display the image on any background, without seeing white. Now I resize the image with anti-aliasing. For that, we have to intermediate pixels, which also requires interpolating the black pixels and background pixels. But: I my case, the background has a different (but known) color every time i.e. need to anti-alias the same image to different backgrounds. I would like to write: my $image->Read('original.gif'); $image->Set(background => 'blue'); $image->Scale('50%x50%'); $image->Write('small.gif'); However, ImageMagick (ImageMagick 4.2.7, PerlMagick 4.27 on Linux) takes as value for a transparent pixel not the value of `background', but the color used to define a transparent color: in this case `white'. My image reduced as above shows white pixels on my blue background. Is my expectation wrong? Does anyone know a work-around? -- Thanks, Mark Overmeer %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From magick-owner@unca-don.wizards.dupont.com Thu Mar 30 19:09 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id TAA14579 for ; Thu, 30 Mar 2000 19:09:10 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id TAA31447 for ; Thu, 30 Mar 2000 19:09:10 +0200 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma031440; Thu, 30 Mar 00 19:08:51 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id MAA10121; Thu, 30 Mar 2000 12:04:52 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id LAA03360 for magick-outgoing; Thu, 30 Mar 2000 11:44:20 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <8100014B48DAD111AA4100805F9F3FC903A0E75D@host60.corbis.com> From: Bill Radcliffe To: "'Ivo'" , magick@wizards.dupont.com, tiff@olympiakos.com Subject: RE: jpeg2000 question Date: Thu, 30 Mar 2000 08:46:50 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Bill Radcliffe Content-Type: text/plain Status: RO Content-Length: 2759 Lines: 66 I worked on the definition of the JP2 file format. The situation with JPEG2000 is not at all like JPEG. You should know is that JP2 is a very simple wrapper around the formal JPEG2000 "codestream". It was based on the Quicktime idea of "atoms". This simple idea is that you have a tag and a length followed by the "stuff". You know what the "stuff" is based on the tag type. You can also nest these atoms to build more complex structures. JP2 is a very simple set of these atoms, most of which are optional. You could write a program to implement this in about 15 minutes. The "hard" part of JP2 is the "codestream". This is the encoded JPEG2000 data. Good luck on that. We don't have a freely available reference implementation at this point because nobody has signed up to do it. There was an effort underway by the same group that did the JPEG-LS implementation. This was given to the public domain.. http://spmg.ece.ubc.ca/research/jpeg/jpeg_ls/jpegls.html They actually had an implementation of JPEG2000 on their website but pulled it off: http://www.ece.ubc.ca/~mdadams/jasper/ Apparently, they decided to sell out and try to charge for it instead of providing it to the public domain. We all know how well that is going to work. When are people going to learn that you can't make money selling compression software? It's not a business - its just an enabler. My opinion is that without a "Tom Lane" type signing up to make a free implementation available, JPEG2000 is doomed. You just don't get real interoperability from a paper spec. We know this. The good news is that the Digital Imaging Group (DIG) has a project underway to do this. The bad news is that it has not yet started. And so we wait :-) > -----Original Message----- > From: Ivo [SMTP:ivo.penzar@infolink-software.com] > Sent: Thursday, March 30, 2000 1:37 AM > To: magick@wizards.dupont.com; tiff@olympiakos.com > Subject: jpeg2000 question > > Does anybody know of some repository of jp2 (jpeg2000, to be approved by > ISO/ITU-T by the end of this year) and/or a tool to write (some sort of) > those images. > > Thanks, > Ivo > > > > *********************************************************************** > To remove yourself from this mailing list, send mail to: > majordomo@wizards.dupont.com > > Include the following command in the body of your message: > unsubscribe magick > *********************************************************************** *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From markov@ATComputing.nl Fri Mar 31 17:01:17 2000 Date: Fri, 31 Mar 2000 17:01:17 +0200 From: Mark Overmeer To: Carl Knoos Cc: magick@wizards.dupont.com Subject: Re: Problem resizing images through perl script Message-ID: <20000331170117.B2095@atcmpg.ATComputing.nl> References: <10F4E7B8292FD311B34400A0C978B70532A61B@a254.117.208.207.ded23.interaccess.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: ; from cknoos@atg.com on Thu, Mar 30, 2000 at 06:27:54PM -0500 Status: RO Content-Length: 820 Lines: 23 * Carl Knoos (cknoos@atg.com) [000331 01:39]: > if I run mogrify -geometry 95x95 whatever.jpg > I get exactly what I want, except when I try > to do it from Perl... > # resize it. > $result="$mogrifypath/mogrify -geometry 96x96 > $GalleryPath/tn_$ShortFilename"; I assume you try to execute this code: use back-tics: $result=`$mogrifypath/mogrify -geometry 96x96 $GalleryPath/tn_$ShortFilename`; or better qx(...) Is it just a slip of pen here, or just usual programmers-blindness? -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From magick-owner@unca-don.wizards.dupont.com Fri Mar 31 01:39 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id BAA16135 for ; Fri, 31 Mar 2000 01:39:18 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id BAA31743 for ; Fri, 31 Mar 2000 01:39:18 +0200 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma031741; Fri, 31 Mar 00 01:39:12 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id SAA08310; Thu, 30 Mar 2000 18:37:29 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id SAA05154 for magick-outgoing; Thu, 30 Mar 2000 18:24:04 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f From: "Carl Knoos" To: Subject: Problem resizing images through perl script Date: Thu, 30 Mar 2000 18:27:54 -0500 Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <10F4E7B8292FD311B34400A0C978B70532A61B@a254.117.208.207.ded23.interaccess.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: "Carl Knoos" Content-Type: text/plain; charset="iso-8859-1" Status: RO X-Status: A Content-Length: 1270 Lines: 47 I know this probably doesn't belong here, but I don't who else to ask :) Basically, I have imagemagick installed and it works like a charm! if I run mogrify -geometry 95x95 whatever.jpg I get exactly what I want, except when I try to do it from Perl... If I in a perl script say: sub GenerateThumb { $fsize = -s "$GalleryPath/$ShortFilename"; if ($thumbmethod == 1) { # copy image. open(IMGFILE, "$GalleryPath/$ShortFilename"); open(TNFILE, ">$GalleryPath/tn_$ShortFilename"); binmode(IMGFILE); binmode(TNFILE); read(IMGFILE, $buffer, $fsize); print TNFILE $buffer; close(TNFILE); close(IMGFILE); chmod (0777, "$GalleryPath/tn_$ShortFilename"); # resize it. $result="$mogrifypath/mogrify -geometry 96x96 $GalleryPath/tn_$ShortFilename"; } } It all works great until it comes to the resizing, it just seem to skip the last step. the variable $mogrifypath is set correctly to /usr/bin Does anyone what I'm doing wrong? /Carl *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Fri Mar 31 02:25 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id CAA16260 for ; Fri, 31 Mar 2000 02:25:19 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id CAA31781 for ; Fri, 31 Mar 2000 02:25:19 +0200 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma031779; Fri, 31 Mar 00 02:25:12 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id TAA21824; Thu, 30 Mar 2000 19:23:29 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id TAA05326 for magick-outgoing; Thu, 30 Mar 2000 19:16:20 -0500 (EST) <10F4E7B8292FD311B34400A0C978B70532A61B@a254.117.208.207.ded23. interaccess.com> X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Mime-Version: 1.0 X-Sender: leonardr@mail1.netreach.net Message-Id: In-Reply-To: <10F4E7B8292FD311B34400A0C978B70532A61B@a254.117.208.207.ded23.interaccess.com> References: <10F4E7B8292FD311B34400A0C978B70532A61B@a254.117.208.207.ded23.interaccess.com> Date: Thu, 30 Mar 2000 19:15:48 -0500 To: Joseph Korabelnikov magick@wizards.dupont.com From: Leonard Rosenthol Subject: Re: Convert HTM, HTML files to the .jpg format X-MIME-Autoconverted: from quoted-printable to 8bit by unca-don.wizards.dupont.com id TAA05323 Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Leonard Rosenthol X-MIME-Autoconverted: from 8bit to quoted-printable by mustang.oldcity.dca.net id TAA21824 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by atcmpg.ATComputing.nl id CAA16260 Content-Type: text/plain; charset="iso-8859-1" ; format="flowed" Status: RO Content-Length: 1198 Lines: 33 At 4:12 PM -0600 3/30/00, Joseph Korabelnikov wrote: >I attempted to convert HTML file to the .jpg format from Command Prompt >window and got an error : > > convert: delegate failed (html2ps -o %o %i). > convert: no delegate for this image format (HTML). > >As I understood situation I need to install mgtl2ps library. Am I right. If >so, where to get it? > You can find it at . LDR -- ---------------------------------------------------------------------------- You've got a SmartFriend in Pennsylvania ---------------------------------------------------------------------------- Leonard Rosenthol Internet: leonardr@lazerware.com America Online: MACgician Web Site: FTP Site: PGP Fingerprint: C76E 0497 C459 182D 0C6B AB6B CA10 B4DF 8067 5E65 *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From markov@ATComputing.nl Mon Apr 3 08:25:55 2000 Date: Mon, 3 Apr 2000 08:25:55 +0200 From: Mark Overmeer To: Carl Knoos Subject: Re: Problem resizing images through perl script Message-ID: <20000403082555.B11537@atcmpg.ATComputing.nl> References: <20000331170117.B2095@atcmpg.ATComputing.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: ; from cknoos@atg.com on Sat, Apr 01, 2000 at 03:40:32PM -0500 Status: RO Content-Length: 1046 Lines: 23 * Carl Knoos (cknoos@atg.com) [000401 22:42]: > ld.so.1: /usr/local/bin/mogrify: fatal: libttf.so.2: open failed: No such > file or directory Typical for installing ImageMagick binaries: they are precompiled on a system with a long list of shared-libs. IM is very powerful, so there are many libs. While starting, the libs are contacted. Search for a libttf.so : you may not have it, have the wrong version or just a lacking link. ttf = True Type Fonts, and the lib is available at freetype.org. > I've asked the company that I rent space from to install > PerlMagick on the box, hopefully I won't have all these > problems if they do. Compatibility between all those libs and apps will continue to haunt us. -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From cknoos@atg.com Sat Apr 1 22:42 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id WAA04105 for ; Sat, 1 Apr 2000 22:42:15 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id WAA01429 for ; Sat, 1 Apr 2000 22:42:14 +0200 Received: from art.atg.com(205.181.94.1) by ns.ATComputing.nl via smap (V2.1) id xma001427; Sat, 1 Apr 00 22:42:05 +0200 Received: from donkeykong (donkey-kong.atg.com [205.181.107.218]) by art.atg.com (8.9.1/8.9.1) with SMTP id PAA24854 for ; Sat, 1 Apr 2000 15:42:29 -0500 (EST) From: "Carl Knoos" To: "Mark Overmeer" Subject: RE: Problem resizing images through perl script Date: Sat, 1 Apr 2000 15:40:32 -0500 Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Importance: Normal In-Reply-To: <20000331170117.B2095@atcmpg.ATComputing.nl> Content-Type: text/plain; charset="iso-8859-1" Status: RO X-Status: A Content-Length: 1865 Lines: 63 Blindness :) Now I'm on to the next problem though... when I try to execute the line from the script, my webservers error log contains this: ld.so.1: /usr/local/bin/mogrify: fatal: libttf.so.2: open failed: No such file or directory I'm seriously starting to get ticked now... hehe :) I've asked the company that I rent space from to install PerlMagick on the box, hopefully I won't have all these problems if they do. Thanks for your help! :) /Carl -----Original Message----- From: owner-magick@wizards.dupont.com [mailto:owner-magick@wizards.dupont.com]On Behalf Of Mark Overmeer Sent: Friday, March 31, 2000 10:01 AM To: Carl Knoos Cc: magick@wizards.dupont.com Subject: Re: Problem resizing images through perl script * Carl Knoos (cknoos@atg.com) [000331 01:39]: > if I run mogrify -geometry 95x95 whatever.jpg > I get exactly what I want, except when I try > to do it from Perl... > # resize it. > $result="$mogrifypath/mogrify -geometry 96x96 > $GalleryPath/tn_$ShortFilename"; I assume you try to execute this code: use back-tics: $result=`$mogrifypath/mogrify -geometry 96x96 $GalleryPath/tn_$ShortFilename`; or better qx(...) Is it just a slip of pen here, or just usual programmers-blindness? -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From markov@ATComputing.nl Tue May 9 15:14:18 2000 Date: Tue, 9 May 2000 15:14:18 +0200 From: Mark Overmeer To: Pletschette Andre Subject: Re: Undefined Symbol: SetWarningHandler Message-ID: <20000509151418.B15139@atcmpg.ATComputing.nl> References: <3917FC90.8B8B0CF@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <3917FC90.8B8B0CF@gmx.net>; from andre.pletschette@gmx.net on Tue, May 09, 2000 at 01:54:56PM +0200 Status: RO Content-Length: 1095 Lines: 25 * Pletschette Andre (andre.pletschette@gmx.net) [000509 15:11]: > When I tried to write a perl script with the following line in it: > use Image::Magick; > I get the following error-message: > > perl: error in loading shared librairies: > /usr/lib/perl5/site_perl/5.005/i586-lin > ux/auto/Image/Magick/Magick.so: undefined symbol: SetWarningHandler > > Could anybody tell me what this means, and how I can get it run, I run > Suse Linux 6.3 and I've installed Image Magick with the C++ and the Perl > Modules. The Perl::Magick and Image::Magick/ImageMagick modules are not compatible. Just reinstall all yourself from www.ImageMagick.org. Be warned: you have to remove the old Perl::Magick *.pm files too, otherwise you may still use the old versions... -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From magick-owner@unca-don.wizards.dupont.com Tue May 9 15:11 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id PAA15311 for ; Tue, 9 May 2000 15:11:14 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id PAA24539 for ; Tue, 9 May 2000 15:11:13 +0200 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma024537; Tue, 9 May 00 15:11:01 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id JAA17934; Tue, 9 May 2000 09:09:29 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id IAA13522 for magick-outgoing; Tue, 9 May 2000 08:42:00 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <3917FC90.8B8B0CF@gmx.net> Date: Tue, 09 May 2000 13:54:56 +0200 From: Pletschette Andre X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13 i586) X-Accept-Language: fr, en, de MIME-Version: 1.0 To: "magick@wizards.dupont.com" Subject: Undefined Symbol: SetWarningHandler Content-Transfer-Encoding: 7bit Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Pletschette Andre Content-Type: text/plain; charset=us-ascii Status: RO X-Status: A Content-Length: 747 Lines: 19 When I tried to write a perl script with the following line in it: use Image::Magick; I get the following error-message: perl: error in loading shared librairies: /usr/lib/perl5/site_perl/5.005/i586-lin ux/auto/Image/Magick/Magick.so: undefined symbol: SetWarningHandler Could anybody tell me what this means, and how I can get it run, I run Suse Linux 6.3 and I've installed Image Magick with the C++ and the Perl Modules. *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Wed May 17 16:07 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id QAA15770 for ; Wed, 17 May 2000 16:07:07 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id QAA04359 for ; Wed, 17 May 2000 16:07:06 +0200 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma004357; Wed, 17 May 00 16:06:40 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id KAA02079; Wed, 17 May 2000 10:05:01 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id JAA23880 for magick-outgoing; Wed, 17 May 2000 09:41:41 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Date: Wed, 17 May 2000 08:46:17 -0500 (CDT) From: Bob Friesenhahn X-Sender: bfriesen@scooby.simplesystems.org To: Martin Bobrovsky cc: ImageMagick Mailing List Subject: Re: watermarks/embossing In-Reply-To: <4.3.1.2.20000517112416.00c72e30@mail.dot.at> Message-ID: MIME-Version: 1.0 Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Bob Friesenhahn Content-Type: TEXT/PLAIN; charset=US-ASCII Status: RO Content-Length: 1859 Lines: 53 If you can afford the Digimarc library (see http://www.digimarc.com/licensing/sdk.html & http://www.digimarc.com/news/pr00-13.html), Bill Radcliffe can send you source for an ImageMagick module to do professional-grade watermarking. ImageMagick's 'combine' utility supports simplistic hidden watermarking via its -stegano option. If you want a visible logo, you could use -compose to compose your logo on top of, or blended with, the base image. Your visible logo can be mostly transparent in order to not disturb the image too much. See this interesting article about digital watermarking: http://www.spie.org/web/oer/november/nov99/cover1.html Bob On Wed, 17 May 2000, Martin Bobrovsky wrote: > Hi! > > Can someone tell how I achieve the effect of embossing a text onto an > image? My intention is to "secure" images on the web by applying a symbol > or text which on the one hand does not affect the impression of the image > too much, but on the other hand, makes the image "unusable" for > professional printing purposes ... > > thanks, > martin > > > *********************************************************************** > To remove yourself from this mailing list, send mail to: > majordomo@wizards.dupont.com > > Include the following command in the body of your message: > unsubscribe magick > *********************************************************************** > ====================================== Bob Friesenhahn bfriesen@simple.dallas.tx.us http://www.simplesystems.org/users/bfriesen *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-bugs@simple.dallas.tx.us Wed Jun 14 16:54 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id QAA25632 for ; Wed, 14 Jun 2000 16:54:28 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id QAA12167 for ; Wed, 14 Jun 2000 16:54:27 +0200 Received: from ns.simplesystems.org(204.252.75.242) by ns.ATComputing.nl via smap (V2.1) id xma012165; Wed, 14 Jun 00 16:54:12 +0200 Received: from localhost (localhost [127.0.0.1]) by ns.simplesystems.org (8.9.3/8.9.3) with ESMTP id JAA14556 for ; Wed, 14 Jun 2000 09:54:08 -0500 (CDT) From: magick-bugs@simple.dallas.tx.us Date: Wed, 14 Jun 2000 09:54:08 -0500 (CDT) Message-Id: <200006141454.JAA14556@ns.simplesystems.org> To: markov@ATComputing.nl Subject: Re: Annotate problems (PR#298) X-Loop: magick-bugs@simple.dallas.tx.us Content-Type: text Status: RO X-Status: A Content-Length: 307 Lines: 9 Thank you for submitting an ImageMagick bug report to magick-bugs@simplesystems.org. Your bug report is available on the web at the URL http://www.simplesystems.org/ImageMagick/bugs?findid=298 Report any problems with the bug tracking system itself to Bob Friesenhahn . From markov@ATComputing.nl Wed Jun 14 17:43:34 2000 Date: Wed, 14 Jun 2000 17:43:34 +0200 From: Mark Overmeer To: Cristy Subject: Re: your mail Message-ID: <20000614174334.G22766@atcmpg.ATComputing.nl> References: <8172.960997992@mystic> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <8172.960997992@mystic>; from cristy@mystic.es.dupont.com on Wed, Jun 14, 2000 at 11:53:11AM -0400 Status: RO X-Status: A Content-Length: 1403 Lines: 34 * Cristy (cristy@mystic.es.dupont.com) [000614 17:23]: > $img->Read("logo:"); > $text="I am a LumberJack"; > $poinsize=40; > my ($width, $height) = $img->Get('width', 'height'); > $img->Annotate > ( fill => 'yellow' > , text => $text > , font => > '-bitstream-charter-medium-r-normal--40-0-0-0-p-0-iso8859-1' > , gravity => 'SouthEast' > , 'x' => 5 > , 'y' => $poinsize+5 > ); > $img->Write(filename => "test.gif"); So: gravity work differently from my well known "anchor", where x,y defines a point and anchor the location of the point wrt the item to be put on the background. It was not clear from the docs. It what you propose a feature or a designed thing? You specify the coordinate of the right-top (NorthEast) wrt to the right-bottom (SouthEast). I expect that x=0,y=0,SouthWest will work wrt to NorthWest. It is not logical for me to treat North/South differently from East/West (designed before the fall of the Iron curtain?) And also: the text still appears in black. -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From cristy@mystic.es.dupont.com Wed Jun 14 17:23 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id RAA27207 for ; Wed, 14 Jun 2000 17:23:28 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id RAA12199 for ; Wed, 14 Jun 2000 17:23:27 +0200 Received: from gatekeeper.es.dupont.com(192.26.233.2) by ns.ATComputing.nl via smap (V2.1) id xma012197; Wed, 14 Jun 00 17:23:08 +0200 Received: from mystic.es.dupont.com (mystic.es.dupont.com [138.196.253.24]) by gatekeeper.es.dupont.com (8.9.3/8.9.3) with ESMTP id LAA26619 for ; Wed, 14 Jun 2000 11:23:06 -0400 (EDT) Received: (from cristy@localhost) by mystic.es.dupont.com (8.10.0.Beta12/8.10.0.Beta12) id e5EFrBI08173 for markov@ATComputing.nl; Wed, 14 Jun 2000 11:53:11 -0400 (EDT) Date: Wed, 14 Jun 2000 11:53:11 -0400 (EDT) From: Cristy Message-ID: <8172.960997992@mystic> Mime-Version: 1.0 To: markov@ATComputing.nl Content-Type: multipart/mixed; boundary="-" Status: RO X-Status: A Content-Length: 1042 Lines: 21 This is a MIME encoded message. Decode it with "munpack" or any other MIME reading software. Mpack/munpack is available via anonymous FTP in ftp.andrew.cmu.edu:pub/mpack/ --- Content-Type: application/octet-stream; name="test.pl" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="test.pl" Content-MD5: el1GVGE1xEpFTeim4lKdYA== ICAgdXNlIEltYWdlOjpNYWdpY2s7CiAgICRpbWc9SW1hZ2U6Ok1hZ2ljay0+bmV3OwogICAk aW1nLT5SZWFkKCJsb2dvOiIpOwogICAkdGV4dD0iSSBhbSBhIEx1bWJlckphY2siOwogICAk cG9pbnNpemU9NDA7CiAgIG15ICgkd2lkdGgsICRoZWlnaHQpID0gJGltZy0+R2V0KCd3aWR0 aCcsICdoZWlnaHQnKTsKICAgJGltZy0+QW5ub3RhdGUKICAgICAgKCBmaWxsICAgID0+ICd5 ZWxsb3cnCiAgICAgICwgdGV4dCAgICAgID0+ICR0ZXh0CiAgICAgICwgZm9udCAgICAgID0+ CictYml0c3RyZWFtLWNoYXJ0ZXItbWVkaXVtLXItbm9ybWFsLS00MC0wLTAtMC1wLTAtaXNv ODg1OS0xJwogICAgICAsIHBvaW50c2l6ZSA9PiAkcG9pbnNpemUKICAgICAgLCBncmF2aXR5 ICAgPT4gJ1NvdXRoRWFzdCcKICAgICAgLCAneCcgICAgICAgPT4gNQogICAgICAsICd5JyAg ICAgICA9PiAkcG9pbnNpemUrNQogICAgICApOwogICAkaW1nLT5Xcml0ZShmaWxlbmFtZSAg PT4gInRlc3QuZ2lmIik7Cgo= ----- From markov@ATComputing.nl Wed Jun 14 17:49:26 2000 Date: Wed, 14 Jun 2000 17:49:26 +0200 From: Mark Overmeer To: Cristy Subject: Re: your mail Message-ID: <20000614174926.H22766@atcmpg.ATComputing.nl> References: <200006141616.e5EGG3x19487@mystic.es.dupont.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <200006141616.e5EGG3x19487@mystic.es.dupont.com>; from cristy@mystic.es.dupont.com on Wed, Jun 14, 2000 at 12:16:03PM -0400 Status: RO Content-Length: 686 Lines: 17 * Cristy (cristy@mystic.es.dupont.com) [000614 17:46]: > > It was not clear from the docs. > > There is alot that is not clear in the docs. We're writing a book due > out next year to fix these sorts of problems. I'll certainly buy the book. But: will you also respond to the two remaining quesions from my previous mail? -- Thanks for the fast response, MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From cristy@mystic.es.dupont.com Wed Jun 14 17:46 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id RAA27475 for ; Wed, 14 Jun 2000 17:46:29 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id RAA12244 for ; Wed, 14 Jun 2000 17:46:28 +0200 Received: from gatekeeper.es.dupont.com(192.26.233.2) by ns.ATComputing.nl via smap (V2.1) id xma012242; Wed, 14 Jun 00 17:45:59 +0200 Received: from mystic.es.dupont.com (mystic.es.dupont.com [138.196.253.24]) by gatekeeper.es.dupont.com (8.9.3/8.9.3) with ESMTP id LAA26733 for ; Wed, 14 Jun 2000 11:45:58 -0400 (EDT) Received: (from cristy@localhost) by mystic.es.dupont.com (8.10.0.Beta12/8.10.0.Beta12) id e5EGG3x19487 for markov@ATComputing.nl; Wed, 14 Jun 2000 12:16:03 -0400 (EDT) Date: Wed, 14 Jun 2000 12:16:03 -0400 (EDT) From: Cristy Message-Id: <200006141616.e5EGG3x19487@mystic.es.dupont.com> To: markov@ATComputing.nl Subject: Re: your mail Content-Type: text Status: RO X-Status: A Content-Length: 152 Lines: 4 > It was not clear from the docs. There is alot that is not clear in the docs. We're writing a book due out next year to fix these sorts of problems. From cristy@mystic.es.dupont.com Wed Jun 14 17:56 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id RAA27517 for ; Wed, 14 Jun 2000 17:55:59 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id RAA12254 for ; Wed, 14 Jun 2000 17:55:58 +0200 Received: from gatekeeper.es.dupont.com(192.26.233.2) by ns.ATComputing.nl via smap (V2.1) id xma012252; Wed, 14 Jun 00 17:55:29 +0200 Received: from mystic.es.dupont.com (mystic.es.dupont.com [138.196.253.24]) by gatekeeper.es.dupont.com (8.9.3/8.9.3) with ESMTP id LAA26777 for ; Wed, 14 Jun 2000 11:55:28 -0400 (EDT) Received: (from cristy@localhost) by mystic.es.dupont.com (8.10.0.Beta12/8.10.0.Beta12) id e5EGPYM19527 for markov@ATComputing.nl; Wed, 14 Jun 2000 12:25:34 -0400 (EDT) Date: Wed, 14 Jun 2000 12:25:34 -0400 (EDT) From: Cristy Message-Id: <200006141625.e5EGPYM19527@mystic.es.dupont.com> To: markov@ATComputing.nl Subject: Re: your mail Content-Type: text Status: RO Content-Length: 189 Lines: 5 > But: will you also respond to the two > remaining quesions from my previous mail? Sure if you remind me what they are. I get upwards of 100+ e-mails a day so it's hard to keep track... From markov@ATComputing.nl Wed Jun 14 18:00:18 2000 Date: Wed, 14 Jun 2000 18:00:18 +0200 From: Mark Overmeer To: Cristy Subject: Re: your mail Message-ID: <20000614180018.I22766@atcmpg.ATComputing.nl> References: <8172.960997992@mystic> <20000614174334.G22766@atcmpg.ATComputing.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <20000614174334.G22766@atcmpg.ATComputing.nl>; from markov@ATComputing.nl on Wed, Jun 14, 2000 at 05:43:34PM +0200 Status: RO Content-Length: 1972 Lines: 47 >> But: will you also respond to the two >> remaining quesions from my previous mail? >Sure if you remind me what they are. I get upwards of 100+ e-mails a day >so it's hard to keep track... You replied just a few seconds earlier on my message below. I replied in a few seconds to it... but I understand you have to scan mail that fast. (I maintain 6 websites, so know getting large amounts of e-mail means) Thanks for the example anyway. * Mark Overmeer (markov@ATComputing.nl) [000614 17:43]: > * Cristy (cristy@mystic.es.dupont.com) [000614 17:23]: > > $img->Read("logo:"); > > $text="I am a LumberJack"; > > $poinsize=40; > > my ($width, $height) = $img->Get('width', 'height'); > > $img->Annotate > > ( fill => 'yellow' > > , text => $text > > , font => > > '-bitstream-charter-medium-r-normal--40-0-0-0-p-0-iso8859-1' > > , gravity => 'SouthEast' > > , 'x' => 5 > > , 'y' => $poinsize+5 > > ); > > $img->Write(filename => "test.gif"); > > So: gravity work differently from my well known "anchor", where > x,y defines a point and anchor the location of the point wrt the > item to be put on the background. It was not clear from the docs. > > It what you propose a feature or a designed thing? You specify the > coordinate of the right-top (NorthEast) wrt to the right-bottom > (SouthEast). I expect that x=0,y=0,SouthWest will work wrt to > NorthWest. It is not logical for me to treat North/South differently > from East/West (designed before the fall of the Iron curtain?) > > And also: the text still appears in black. > -- > MarkOv %-] > > ------------------------------------------------------------------------ > drs Mark A.C.J. Overmeer markov@ATComputing.nl > AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl > http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From markov@ATComputing.nl Wed Jun 14 18:17:41 2000 Date: Wed, 14 Jun 2000 18:17:41 +0200 From: Mark Overmeer To: Cristy Subject: Re: your mail Message-ID: <20000614181741.J22766@atcmpg.ATComputing.nl> References: <200006141634.e5EGYfI19547@mystic.es.dupont.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="5vNYLRcllDrimb99" X-Mailer: Mutt 1.0pre4i In-Reply-To: <200006141634.e5EGYfI19547@mystic.es.dupont.com>; from cristy@mystic.es.dupont.com on Wed, Jun 14, 2000 at 12:34:41PM -0400 Status: RO Content-Length: 4505 Lines: 82 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii * Cristy (cristy@mystic.es.dupont.com) [000614 18:05]: > > It what you propose a feature or a designed thing? You specify the > > coordinate of the right-top (NorthEast) wrt to the right-bottom > > (SouthEast). I expect that x=0,y=0,SouthWest will work wrt to > > NorthWest. It is not logical for me to treat North/South differently > > from East/West (designed before the fall of the Iron curtain?) > > I'll send you a script that illustrates how gravity works. The x,y > offset basically creates a bounding box within the image and the text > is placed relative to the virtual bounding box. As you can see in your own demo script, it is not consequent: W and E are inside the square, while N and S are outside... in my run. Image attached. I changed the line-color you yellow (stroke) which worked, but it still does not work for the text. > Are you using ImageMagick 5.2.0? When I used the script I sent the > text color was indeed yellow. The latest 5.2.0 (less than 48 hours ago directly from imagemagick.org). Sorry, no more time to investigate for me today: have to go... -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl --5vNYLRcllDrimb99 Content-Type: image/gif Content-Disposition: attachment; filename="test.gif" Content-Transfer-Encoding: base64 R0lGODlhkAGQAfECAP///wAAAP//AAAAACH5BAAAAAAALAAAAACQAZABAAL+hI+py+0Po5y0 2ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8YhMKpfMpvMJjUqn1Kr1is1q t9yu9wsOi8fksvmMTqvX7Lb7DY/L5/S6/Y7P6/f8vv8PGCg4SFhoeIiYqLjI2Oj4CBkpOUlZ aXmJmam5ydnp+QkaKjpKWmp6ipqqusra6voKGys7S1tre4ubq7vL2+v7CxwsPExcbHyMnKy8 zNzs/AwdLT1NXW19jZ2tvc3d7f0NHi4+Tl5ufo6err7O3u7+Dh8vP09fb3+Pn6+/z9/v/w8w oMCBBAsaPIgwocIgARo2VOAwokQAEh8eiLhiYoL+ijI0IqgIkmM6jx8DXHRY0iRElRkxrqxB 8mTKl+pcbmRJ0eJJnAZ4qrBZ0gZQmUEhrouZ8+ZNnz5TINU54ylPqBePmkRZdKfSrCweYiVK wyvVsU3ZWfyadOZOnGVRnIVKNcZbtlOZmmUJlylduDB05hWKl+5WsCMDB16JN63iFn4bA9ba sy7Iu2rjYhWrsq3bvZEfQyY7WFtIm2SvNkWZ+Szi0RBGfy2t2HVcCbIPzwS9MSXrbZZNL/A4 lLHexR2H4/5IefVvtMG7nkZbfPlxeLOb55QcXTnM59ORF2YAHTLhF7Ove0Yc2ju22uzbu38P P778+fTrt1+meW35tqf+5WoUkFtUSPUUWW204XcGgGbkBwyDWyhYhoO+SJgFhGRQyAuGV1g4 hoa6eFgFh2KAiAuJU4gYhom2qBgFimCwSAuMT7j4hYyy2NgEjV7gCAuPS+jYhY+uCJkEkFwQ yQqSRxi5hZKqOFkEk1pAiQqVQ0iZhZWmaBkEllhwSQqYP3h5hZiimNkDmVagCQqbO6hZhZue yJkDnFTQyQmeN9g5hZ6a+FkDn1IAigmhMwgahaGWKBoDolAwSgmkLzj6hKSSWNoCpU5gCgmn K2jahKeOiJoCqEyQygiqJ5i6hKqKuFoCq0rAigitI8iahK2G6BoCrkjwSgiwH/h6hLCCGNv+ AbFGIAsIsxsoW4SzfkibAbREUMsHthdYO4S2enhbAbdCgIsHuROIyxCCZqALhLl2uBsBuz/A Swe9D8jrg71y6NsAvj3wCwfAC/jLg8BuGJwAwTsgzAbDByisg8NqSAwAxDlQjAbFFuOA8Rka e6xuGRvf0PGCCYKszMcmp3zyysmoHGHIZIwslMxj0AyTzWLgHJbOYfAclc9gAN2R0F8QLZfR XiDdl9JdME2e01xA7ULJMa+L8sstX6011i4jA/OFUj+YNdhbi82y11ybrTbaXYtc9jFhdzi2 FlQzVneFcRsz94h5Y3F3V39vuHcxfac4uBWBZ5R4iIUTc/iLjVP+sfhPk5/4+DCR13i5FJU7 1XmLmQuz+Y6hQ/G5W6fPOHowpQe5uhOpn2C12zO33mAEHE22FkOTucregWm3xlx1nGKkoHXt 9ib828RjF2C+OllYnu+/Nc82bdCr9y9OHNpaHfZyUwBddxFD9X2uKtZO9wTF8zUvT7M7YJn7 +AmAf/76749/Q/pH9D/+CXCABCygAQnovwMqcIEMbGABE5g/CB6QfX4jn19iczz5VSok9hue 9lJjHopYDwHza4D5TIgfAy1FhCGUzG5AoEKquEiFTpENVwhUINckDjjhKRj6NmgU8fHNAkBR 3sV+uKn1Na581TsfS0oInrI4iIKII+L+Cbv3xOgtS4q6m9xwroUSCDVxeehpjRevt8UBjSt4 ZvTgzXD3i9cdKXY5guOEztY+573xa+NrWx6zdzs+DtGPFdTjzuzYCzk2iY5MgOIIqCg5QlbR kD9DZIbwWEhA7nFtfYSbIA2HyUlq8pCfhFwoI0nJoVlyF4qcEiN/tMoPnZJzbiQlJwfpyVuC UpKoHGUlS6m5WZqulr/UpSl5SctUHi2WuWhlll6pBEeKAJLJDKQxg4nMYSpzacwskTBhR0xV ApN035xjOJc5TteVc5Hn5GY6c5dNcG7zad28hTO/BM0i1XNF63RlO+n5zjj285n/nNo+a3HP MuUTCdIMATX+tWlN23Uyon+c6CYlikuKZtKitsToLnPp0WOCtKIZvShJP6pRUXK0mCHF5kg3 WtKOnlSkKe3lSsV5TXLG05zzNGhA77hTdvaUbD9N5EDxWVCi5lSdQfXnUO120BgdVaFJhWpR L9lUgj5Vb1dl5VTXtNAlRXUWCQVrVbm6VHi+VKUxZelMXVrTat4UnWkVaFaRulXAjfVGX41T WI3QUBim0D6ELaxhD4vYxMJnIYwNEu92J5IchoV3C3ssDdHxmsbk5TmTNYwPPSue8ZhjOky0 y2TTQ7K6oJaF39EiccKjp/pVNoiiZS1mSdudMf7kigJSbW3v0sT3sQUwut1OcE3+a5Xj6oZ7 vfWU8nhbDjW+BoMcMyJxjUdZ4GK3M5dxYnGb+8XfVuOyy0VPajKzGg5WgLy9y6F6OcBeyd7Q tvHlDWxJ08PUfre5831oH7ijHfnmrIwck858zRJFA6tlwDQp8HIObNvocpbAnUntg4944QrT 9hybReFqs1MgHy5Yw6EdbXY3XJXqRta7+K1vY18M4xjLeMY0rrGNb4zjHOt4xzzusY9/DOQg C3nIRC6ykY+M5CQreclMbrKTnwzlKEt5ylSuspWvjOUsa3nLXO6yl78M5jCLecxkLrOZz4zm NKt5zWxus5vfDOc4y3nOdK6zne+M5zzrec987rOf/wwg6EALetCELrShD43oRCt60YxutKMf DelIS3rSlF50AQAAOw== --5vNYLRcllDrimb99-- From cristy@mystic.es.dupont.com Wed Jun 14 18:05 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id SAA28005 for ; Wed, 14 Jun 2000 18:04:59 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id SAA12271 for ; Wed, 14 Jun 2000 18:04:58 +0200 Received: from gatekeeper.es.dupont.com(192.26.233.2) by ns.ATComputing.nl via smap (V2.1) id xma012267; Wed, 14 Jun 00 18:04:36 +0200 Received: from mystic.es.dupont.com (mystic.es.dupont.com [138.196.253.24]) by gatekeeper.es.dupont.com (8.9.3/8.9.3) with ESMTP id MAA26846 for ; Wed, 14 Jun 2000 12:04:35 -0400 (EDT) Received: (from cristy@localhost) by mystic.es.dupont.com (8.10.0.Beta12/8.10.0.Beta12) id e5EGYfI19547 for markov@ATComputing.nl; Wed, 14 Jun 2000 12:34:41 -0400 (EDT) Date: Wed, 14 Jun 2000 12:34:41 -0400 (EDT) From: Cristy Message-Id: <200006141634.e5EGYfI19547@mystic.es.dupont.com> To: markov@ATComputing.nl Subject: Re: your mail Content-Type: text Status: RO X-Status: A Content-Length: 670 Lines: 14 > It what you propose a feature or a designed thing? You specify the > coordinate of the right-top (NorthEast) wrt to the right-bottom > (SouthEast). I expect that x=0,y=0,SouthWest will work wrt to > NorthWest. It is not logical for me to treat North/South differently > from East/West (designed before the fall of the Iron curtain?) I'll send you a script that illustrates how gravity works. The x,y offset basically creates a bounding box within the image and the text is placed relative to the virtual bounding box. > And also: the text still appears in black. Are you using ImageMagick 5.2.0? When I used the script I sent the text color was indeed yellow. From cristy@eplrx7.es.dupont.com Wed Jun 14 18:05 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id SAA28006 for ; Wed, 14 Jun 2000 18:04:59 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id SAA12272 for ; Wed, 14 Jun 2000 18:04:58 +0200 Received: from gatekeeper.es.dupont.com(192.26.233.2) by ns.ATComputing.nl via smap (V2.1) id xma012268; Wed, 14 Jun 00 18:04:47 +0200 Received: from eplrx7.es.dupont.com (eplrx7.es.dupont.com [138.196.252.7]) by gatekeeper.es.dupont.com (8.9.3/8.9.3) with ESMTP id MAA26850 for ; Wed, 14 Jun 2000 12:04:46 -0400 (EDT) Received: from fantasia.es.dupont.com (fantasia.es.dupont.com [138.196.253.22]) by eplrx7.es.dupont.com (8.9.3/8.9.3) with ESMTP id MAA06403 for ; Wed, 14 Jun 2000 12:04:45 -0400 (EDT) Received: by fantasia.es.dupont.com (8.9.3+Sun) id MAA01601; Wed, 14 Jun 2000 12:03:33 -0400 (EDT) From: Cristy Date: Wed, 14 Jun 2000 12:03:33 -0400 (EDT) Message-ID: <1600.960998613@fantasia> Mime-Version: 1.0 To: markov@ATComputing.nl Content-Type: multipart/mixed; boundary="-" Status: RO Content-Length: 2009 Lines: 34 This is a MIME encoded message. Decode it with "munpack" or any other MIME reading software. Mpack/munpack is available via anonymous FTP in ftp.andrew.cmu.edu:pub/mpack/ --- Content-Type: application/octet-stream; name="gravity.pl" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="gravity.pl" Content-MD5: faVMCotdBUpHJCDAv7HACA== IyEvdXNyL2xvY2FsL2Jpbi9wZXJsCgp1c2UgSW1hZ2U6Ok1hZ2ljazsKCiRwaWMgPSBJbWFn ZTo6TWFnaWNrLT5uZXcoc2l6ZT0+IjQwMHg0MDAiKTsKJHBpYy0+UmVhZCgieGM6d2hpdGUi KTsKCiR4ID0gMTAwOwokeSA9IDEwMDsKJHBpYy0+RHJhdyhwcmltaXRpdmU9PidsaW5lJyxw b2ludHM9PiIyMDAsMTAwIDIwMCwzMDAiLHN0cm9rZT0+J2JsYWNrJyk7CiRwaWMtPkRyYXco cHJpbWl0aXZlPT4nbGluZScscG9pbnRzPT4iMTAwLDIwMCAzMDAsMjAwIixzdHJva2U9Pidi bGFjaycpOwokcGljLT5EcmF3KHByaW1pdGl2ZT0+J3JlY3RhbmdsZScscG9pbnRzPT4iMTAw LDEwMCAzMDAsMzAwIixzdHJva2U9PidibGFjaycpOwokcGljLT5Bbm5vdGF0ZShwb2ludHNp emU9PjI0LGZvbnQ9PidUaW1lcycsdGV4dD0+Ii1OVy0iLGdyYXZpdHk9PiJOb3J0aFdlc3Qi LHg9PiR4LHk9PiR5KTsKJHBpYy0+QW5ub3RhdGUocG9pbnRzaXplPT4yNCxmb250PT4nVGlt ZXMnLHRleHQ9PiItTi0iLGdyYXZpdHk9PiJOb3J0aCIseD0+JHgseT0+JHkpOwokcGljLT5B bm5vdGF0ZShwb2ludHNpemU9PjI0LGZvbnQ9PidUaW1lcycsdGV4dD0+Ii1ORS0iLGdyYXZp dHk9PiJOb3J0aEVhc3QiLHg9PiR4LHk9PiR5KTsKJHBpYy0+QW5ub3RhdGUocG9pbnRzaXpl PT4yNCxmb250PT4nVGltZXMnLHRleHQ9PiItRS0iLGdyYXZpdHk9PiJFYXN0Iix4PT4keCx5 PT4keSk7CiRwaWMtPkFubm90YXRlKHBvaW50c2l6ZT0+MjQsZm9udD0+J1RpbWVzJyx0ZXh0 PT4iLUMtIixncmF2aXR5PT4iQ2VudGVyIix4PT4keCx5PT4keSk7CiRwaWMtPkFubm90YXRl KHBvaW50c2l6ZT0+MjQsZm9udD0+J1RpbWVzJyx0ZXh0PT4iLVNFLSIsZ3Jhdml0eT0+IlNv dXRoRWFzdCIseD0+JHgseT0+JHkpOwokcGljLT5Bbm5vdGF0ZShwb2ludHNpemU9PjI0LGZv bnQ9PidUaW1lcycsdGV4dD0+Ii1TLSIsZ3Jhdml0eT0+IlNvdXRoIix4PT4keCx5PT4keSk7 CiRwaWMtPkFubm90YXRlKHBvaW50c2l6ZT0+MjQsZm9udD0+J1RpbWVzJyx0ZXh0PT4iLVNX LSIsZ3Jhdml0eT0+IlNvdXRoV2VzdCIseD0+JHgseT0+JHkpOwokcGljLT5Bbm5vdGF0ZShw b2ludHNpemU9PjI0LGZvbnQ9PidUaW1lcycsdGV4dD0+Ii1XLSIsZ3Jhdml0eT0+Ildlc3Qi LHg9PiR4LHk9PiR5KTsKCiRwaWMtPldyaXRlKGZpbGVuYW1lPT4idGVzdC5naWYiKTsKc3lz dGVtKCJkaXNwbGF5IHRlc3QuZ2lmIik7Cg== ----- From magick-owner@unca-don.wizards.dupont.com Thu Jun 29 18:01 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id SAA10314 for ; Thu, 29 Jun 2000 18:01:15 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id SAA00740 for ; Thu, 29 Jun 2000 18:01:14 +0200 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma000732; Thu, 29 Jun 00 18:01:07 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id MAA07078; Thu, 29 Jun 2000 12:00:36 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id LAA10740 for magick-outgoing; Thu, 29 Jun 2000 11:48:25 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <395B7519.F40670B@northrim.net> Date: Thu, 29 Jun 2000 10:11:05 -0600 From: Karl Sloth X-Mailer: Mozilla 4.72 [en] (X11; I; Linux 2.2.14 i586) X-Accept-Language: en MIME-Version: 1.0 To: magick@wizards.dupont.com Subject: mailing list archives Content-Transfer-Encoding: 7bit Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Karl Sloth Content-Type: text/plain; charset=us-ascii Status: RO Content-Length: 552 Lines: 17 Hi all- The folks at The Aims Group have added the ImageMagick mailing list to their online mailing list archives. They have a searchable history going back to 1996. Very handy. http://marc.theaimsgroup.com/?l=imagemagick&r=1&w=2 -karl *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From markov@ATComputing.nl Tue Jul 4 12:33:47 2000 Date: Tue, 4 Jul 2000 12:33:47 +0200 From: Mark Overmeer To: magick-bugs@simple.dallas.tx.us Subject: Re: Annotate problems (PR#298) Message-ID: <20000704123347.F2009@atcmpg.ATComputing.nl> References: <200006141454.JAA14556@ns.simplesystems.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <200006141454.JAA14556@ns.simplesystems.org>; from magick-bugs@simple.dallas.tx.us on Wed, Jun 14, 2000 at 09:54:08AM -0500 Status: RO Content-Length: 573 Lines: 12 * magick-bugs@simple.dallas.tx.us (magick-bugs@simple.dallas.tx.us) [000614 16:54]: > Your bug report is available on the web at the URL > http://www.simplesystems.org/ImageMagick/bugs?findid=298 Both indicated problems are fixed in 5.2.1 -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From magick-owner@unca-don.wizards.dupont.com Sun Jul 2 02:40 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id CAA01634 for ; Sun, 2 Jul 2000 02:40:25 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id CAA03454 for ; Sun, 2 Jul 2000 02:40:24 +0200 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma003450; Sun, 2 Jul 00 02:40:07 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id UAA32165; Sat, 1 Jul 2000 20:39:55 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id UAA16952 for magick-outgoing; Sat, 1 Jul 2000 20:30:03 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <395E8F1F.B804FCB7@interak.com> Date: Sat, 01 Jul 2000 16:38:55 -0800 From: Marc Grober X-Mailer: Mozilla 4.61 [en] (X11; I; UnixWare 5 i386) MIME-Version: 1.0 To: magick@wizards.dupont.com Subject: delegates.mgk set-up for unixware printing Content-Transfer-Encoding: 7bit Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Marc Grober Content-Type: text/plain; charset=us-ascii Status: RO Content-Length: 1403 Lines: 45 Under unixware to print from displayt to an HP laserjet (usual command to print postscript being lp -dhpraw -Tpostscript), I changed the delegates.mgk file (which I found in /usr/local/share/Magick as installed from the SCO skunkware CD) from ps<=print /usr/bin/lp -c -s %i to ps<=print /usr/bin/lp -dhpraw -c -s -Tpostscript %i and it appears everything is working. The -c make an immediate copy and feeds it to the spooler and without it you get an error message (below) which my guess is is a bit misleading in that I have to assume that what is really happening is that without the -c IM is not passing anything to the spooler........ ****************************************************************************** Subject: Status of lp request hpraw-347 Your request hpraw-347 destined for hpraw encountered an error during filtering. Reason for failure: UX:lp: ERROR: Cannot read the file "/tmp/hacienda.jpg". TO FIX: See if it still exists and is readable, or consult your system administrator. *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Mon Jul 3 16:12 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id QAA28389 for ; Mon, 3 Jul 2000 16:12:41 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id QAA05092 for ; Mon, 3 Jul 2000 16:12:40 +0200 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma005088; Mon, 3 Jul 00 16:12:32 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id KAA12560; Mon, 3 Jul 2000 10:12:03 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id KAA20768 for magick-outgoing; Mon, 3 Jul 2000 10:01:07 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <395BACF9.CFA6970@interak.com> Date: Thu, 29 Jun 2000 12:09:30 -0800 From: Marc Grober X-Mailer: Mozilla 4.61 [en] (X11; I; UnixWare 5 i386) MIME-Version: 1.0 To: magick@wizards.dupont.com Subject: printing solution for UW 7.1 Content-Transfer-Encoding: 7bit Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Marc Grober Content-Type: text/plain; charset=us-ascii Status: RO Content-Length: 1500 Lines: 46 Under unixware to print from displayt to an HP laserjet (usual command to print postscript being lp -dhpraw -Tpostscript), I changed the delegates.mgk file (which I found in /usr/local/share/Magick as installed from the SCO skunkware CD) from ps<=print /usr/bin/lp -c -s %i to ps<=print /usr/bin/lp -dhpraw -c -s -Tpostscript %i and it appears everything is working. The -c make an immediate copy and feeds it to the spooler and without it you get an error message (below) which my guess is is a bit misleading in that I have to assume that what is really happening is that without the -c IM is not passing anything to the spooler........ ****************************************************************************** Subject: Status of lp request hpraw-347 Your request hpraw-347 destined for hpraw encountered an error during filtering. Reason for failure: UX:lp: ERROR: Cannot read the file "/tmp/hacienda.jpg". TO FIX: See if it still exists and is readable, or consult your system administrator. I have tried this with jpegs, gifs etc and in quite a number of locations Placed the -c -s back in *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Fri Jul 7 09:27 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id JAA27505 for ; Fri, 7 Jul 2000 09:27:32 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id JAA11016 for ; Fri, 7 Jul 2000 09:27:31 +0200 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma011014; Fri, 7 Jul 00 09:27:21 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id DAA06530; Fri, 7 Jul 2000 03:26:27 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id DAA06369 for magick-outgoing; Fri, 7 Jul 2000 03:15:15 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Date: Fri, 7 Jul 2000 17:24:12 +1000 From: Martien Verbruggen To: Geoff Armstrong Cc: ImageMagick Mailing List Subject: Re: converts new sharpen factors Message-ID: <20000707172412.C23320@martien.heliotrope.home> References: <00070515380200.26142@berlioz> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.2.2i In-Reply-To: <00070515380200.26142@berlioz>; from geofstro@monaco.mc on Wed, Jul 05, 2000 at 03:35:26PM +0200 Organisation: Heliotrope Productions Pty. Ltd. Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Martien Verbruggen Content-Type: text/plain; charset=us-ascii Status: RO Content-Length: 1483 Lines: 36 -- Geoff Armstrong wrote on Wed 5 Jul 15:35 PM -- > Hi, > > I know the sharpen factors for convert have changed since 5.2.0; but I > can't find the new factors documented anywhere. The factors are no longer really factors, but orders for a convolution kernel, if I've understood it all correctly. Since convolution has become available in ImageMagick, many of the old filters have been rewritten to use a kernel (blur, sharpen, charcoal, emboss, edge). The convert manual page mentions that good values are odd numbers between 3 and 31. Martien PS. If you don't know what convolution is: apply a matrix to each pixel, and it's surrounding neighbors covered by the matrix. The values of each covered pixel get multiplied by the matrix cell's value, and all added together. The new value for the target pixel is this sum. The 'order' that I talked about above is the height and width of the matrix involved (in ImageMagick they're always square). -- Martien Verbruggen | Interactive Media Division | "In a world without fences, Commercial Dynamics Pty. Ltd. | who needs Gates?" NSW, Australia | *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Fri Jul 7 17:55 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id RAA13560 for ; Fri, 7 Jul 2000 17:55:42 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id RAA15121 for ; Fri, 7 Jul 2000 17:55:42 +0200 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma015105; Fri, 7 Jul 00 17:55:27 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id LAA24776; Fri, 7 Jul 2000 11:54:30 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id LAA07897 for magick-outgoing; Fri, 7 Jul 2000 11:44:52 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Date: Fri, 7 Jul 2000 12:23:40 -0400 (EDT) From: Cristy Message-Id: <200007071623.e67GNev10760@mystic.es.dupont.com> To: magick@wizards.dupont.com Subject: New ImageMagick mailing list Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Cristy Content-Type: text Status: RO Content-Length: 1242 Lines: 31 *********************************************************************** This list is being decommissioned. Please join one or more of the new ImageMagick mailing lists as described at http://www.imagemagick.org/www/magick-list.html. *********************************************************************** In response to a number of suggestions and/or complaints about the magick@wizards.dupont.com ImageMagick mailing list, I have created three new lists: magick-user@imagemagick.org magick-deveoper@imagemagick.org magick-announce@imagemagick.org See http://www.imagemagick.org/www/magick-list.html for instructions on joining and/or posting. I will keep the current list at magick@wizards.dupont.com running for the next couple of months to cause the least amount of disruption. At your convenience unsubscribe from magick@wizards.dupont.com and choose one of the lists above, whichever is appropriate. *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From markov@ATComputing.nl Sat Jul 8 10:27:08 2000 Date: Sat, 8 Jul 2000 10:27:08 +0200 From: Mark Overmeer To: majordomo@imagemagick.org Subject: subscribe Message-ID: <20000708102708.B1570@atcmpg.ATComputing.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i Status: RO Content-Length: 27 Lines: 1 subscribe magick-developer From markov@ATComputing.nl Sat Jul 8 13:53:18 2000 Date: Sat, 8 Jul 2000 13:53:18 +0200 From: Mark Overmeer To: Majordomo@imagemagick.org Subject: Re: Confirmation for subscribe magick-developer Message-ID: <20000708135318.A2549@atcmpg.ATComputing.nl> References: <200007080855.EAA15589@imagemagick.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <200007080855.EAA15589@imagemagick.org>; from Majordomo@imagemagick.org on Sat, Jul 08, 2000 at 04:55:40AM -0400 Status: RO Content-Length: 63 Lines: 1 auth 44b84310 subscribe magick-developer markov@ATComputing.nl From Majordomo-Owner@imagemagick.org Sat Jul 8 10:27 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id KAA01750 for ; Sat, 8 Jul 2000 10:27:39 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id KAA25253 for ; Sat, 8 Jul 2000 10:27:38 +0200 Received: from magick.imagemagick.org(38.220.172.2) by ns.ATComputing.nl via smap (V2.1) id xma025238; Sat, 8 Jul 00 10:27:26 +0200 Received: (from majordomo@localhost) by imagemagick.org (8.9.3/8.9.3) id EAA15589; Sat, 8 Jul 2000 04:55:40 -0400 Date: Sat, 8 Jul 2000 04:55:40 -0400 Message-Id: <200007080855.EAA15589@imagemagick.org> X-Authentication-Warning: magick.imagemagick.org: majordomo set sender to Majordomo-Owner@imagemagick.org using -f To: markov@ATComputing.nl From: Majordomo@imagemagick.org Subject: Confirmation for subscribe magick-developer Reply-To: Majordomo@imagemagick.org Content-Type: text Status: RO X-Status: A Content-Length: 822 Lines: 25 -- Someone (possibly you) has requested that your email address be added to or deleted from the mailing list "magick-developer@imagemagick.org". If you really want this action to be taken, please send the following commands (exactly as shown) back to "Majordomo@imagemagick.org": auth 44b84310 subscribe magick-developer markov@ATComputing.nl If you do not want this action to be taken, simply ignore this message and the request will be disregarded. If your mailer will not allow you to send the entire command as a single line, you may split it using backslashes, like so: auth 44b84310 subscribe magick-developer \ markov@ATComputing.nl If you have any questions about the policy of the list owner, please contact "magick-developer-approval@imagemagick.org". Thanks! Majordomo@imagemagick.org From owner-magick@imagemagick.org Sat Jul 8 13:53 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id NAA02564 for ; Sat, 8 Jul 2000 13:53:33 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id NAA00576 for ; Sat, 8 Jul 2000 13:53:28 +0200 Received: from magick.imagemagick.org(38.220.172.2) by ns.ATComputing.nl via smap (V2.1) id xma000568; Sat, 8 Jul 00 13:53:23 +0200 Received: (from majordomo@localhost) by imagemagick.org (8.9.3/8.9.3) id IAA16219; Sat, 8 Jul 2000 08:21:42 -0400 Date: Sat, 8 Jul 2000 08:21:42 -0400 Message-Id: <200007081221.IAA16219@imagemagick.org> X-Authentication-Warning: magick.imagemagick.org: majordomo set sender to owner-magick@imagemagick.org using -f To: markov@ATComputing.nl From: Majordomo@imagemagick.org Subject: Welcome to magick-developer Reply-To: Majordomo@imagemagick.org Content-Type: text Status: RO Content-Length: 11286 Lines: 274 -- Welcome to the magick-developer mailing list! Please save this message for future reference. Thank you. If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe magick-developer or from another account, besides markov@ATComputing.nl: unsubscribe magick-developer markov@ATComputing.nl If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. Here's the general information for the list you've subscribed to, in case you don't already have it: The ImageMagick mailing list (magick@wizards.dupont.com) is a low noise and subject oriented mailing list. The subject is the discussion of ImageMagick software and its use. Although the list is unmoderated, do not post off-topic messages to the list. Off-topic messages will result in the offender being silently removed from the list and prevented from rejoining. Please follow these guidelines when posting or responding to posted messages: 1. postings must be related to ImageMagick, PerlMagick, CineMagick, or WebMagick. Here is an example of what not to post: Does anyone know of a program that converts WWF to JPG on the Mac? Post these to comp.graphics instead. 2. postings should be concise but provide enough detail for readers to discern what the problem is and respond with a solution. Here is an example of what not to post: I downloaded ImageMagick and it doesn't work. What's up? Yes, I have seen these messages. More detail is needed for a proper response. 3. responses should be sent to the author, and not the list, if the response is not of general interest. For example, I'm converting libMagick to a C++ class library. Anyone want to help? Discuss this privately with the author and make a general announcement when you complete your work. 4. Only relevant portions of a message should be quoted. Do not quote the entire message, for example, and give a one line response. 5. Do not post administriva messages such as "How do I unsubscribe from the list?" Instead, see http://www.imagemagick.org/www/magick-list.html for help. 6. Do not post test messages to the list. An archive of all messages posted to the mailing list is available to peruse. See ftp://ftp.wizards.dupont.com/pub/ImageMagick/mailing-list You can also browse or search the archive. See http://marc.theaimsgroup.com/?l=imagemagick&r=1&w=2 * * * ImageMagick is a robust collection of tools and libraries to read, write, and manipulate an image in many image formats (over 68 major formats) including popular formats like TIFF, JPEG, PNG, PDF, Photo CD, and GIF. With ImageMagick you can create images dynamically, making it suitable for Web applications. You can also resize, rotate, sharpen, color reduce, or add special effects to an image and save your completed work in the same or differing image format. Image processing operations are available from the command line, as well as through C, C++, and PERL-based programming interfaces. Here is just a few examples of what ImageMagick can do: Convert an image from one format to another (e.g. TIFF to GIF) Resize, rotate, sharpen, color reduce, or add special effects to an image Create a montage of image tumbnails Create a transparent image suitable for use on the Web Turn a group of images into a GIF animation sequence Create a composite image by combining several separate images Draw shapes or text on an image Decorate an image with a border or frame Describe the format and characteristics of an image You can access ImageMagick functions directly from the command line using the ImageMagick tools convert, mogrify, montage, combine, or identify. Use the display program to interactively manipulate your images or animate an image sequence from a graphical panel. Finally you have access to the various image manipulation methods directly from your favorite application development environment: Perl, C++, C, or Java. These programs and much more are explained by following the links from this page or read the ImageMagick Users Guide. ImageMagick is known to compile and run on virtually any Unix. system and Linux. It also runs under Windows 2000, Windows 95/98, Macintosh, VMS, and OS2. See the install guide for compiling instructions. Pre-compiled binaries are available for some of the more popular operating systems. The offical ImageMagick web page is: http://ww.imagemagick.org/ ImageMagick is available via ftp as ftp://ftp.wizards.dupont.com/pub/ImageMagick Other versions are available as ftp://ftp.wizards.dupont.com/pub/ImageMagick/binaries ftp://ftp.wizards.dupont.com/pub/ImageMagick/mac ftp://ftp.wizards.dupont.com/pub/ImageMagick/nt ftp://ftp.wizards.dupont.com/pub/ImageMagick/vms ftp://ftp.wizards.dupont.com/pub/ImageMagick/linux * * * * * * * * * ImageMagick Tools display Display is a machine architecture independent image and display program. It can display an image on any workstation display running an X server. Display can read and write many of the more popular image formats (e.g. JPEG, TIFF, PNM, Photo CD, etc.). You can perform these functions on the image: o load an image from a file o display the next image o display the former image o display a sequence of images as a slide show o write the image to a file o print the image to a Postscript printer o delete the image file o create a Visual Image Directory o select the image to display by its thumbnail rather than name o undo last image transformation o copy a region of the image o paste a region to the image o restore the image to its original size o refresh the image o half the image size o double the image size o resize the image o crop the image o cut the image o flop image in the horizontal direction o flip image in the vertical direction o rotate the image 90 degrees clockwise o rotate the image 90 degrees counter-clockwise o rotate the image o shear the image o trim the image edges o invert the colors of the image o vary the color brightness o vary the color saturation o vary the image hue o gamma correct the image o sharpen the image contrast o dull the image contrast o perform histogram equalization on the image o perform histogram normalization on the image o negate the image colors o convert the image to grayscale o set the maximum number of unique colors in the image o reduce the speckles within an image o eliminate peak noise from an image o detect edges within the image o emboss an image o oil paint an image o segment the image by color o annotate the image with text o draw on the image o edit an image pixel color o edit the image matte information o composite an image with another o add a border to the image o add an image comment o apply image processing techniques to a region of interest o display information about the image o display information about this program o display image to background of a window o set user preferences o discard all images and exit program o change the level of magnification o display images specified by a World Wide Web (WWW) uniform resource locator (URL) import Import reads an image from any visible window on an X server and outputs it as an image file. You can capture a single window, the entire screen, or any rectangular portion of the screen. You can use display (see display(1)) utility for redisplay, printing, editing, formatting, archiving, image processing, etc. of the captured image. The target window can be specified by id, name, or may be selected by clicking the mouse in the desired window. If you press a button and then drag, a rectangle will form which expands and contracts as the mouse moves. To save the portion of the screen defined by the rectangle, just release the button. The keyboard bell is rung once at the beginning of the screen capture and twice when it completes. animate Animate displays a sequence of images on any workstation display running an X server. Animate first determines the hardware capabilities of the workstation. If the number of unique colors in an image is less than or equal to the number the workstation can support, the image is displayed in an X window. Otherwise the number of colors in the image is first reduced to match the color resolution of the workstation before it is displayed. This means that a continuous-tone 24 bits/pixel image can display on a 8 bit pseudo-color device or monochrome device. In most instances the reduced color image closely resembles the original. Alternatively, a monochrome or pseudo-color image sequence can display on a continuous-tone 24 bits/pixels device. montage Montage creates a composite image by combining several separate images. The images are tiled on the composite image with the name of the image optionally appearing just below the individual tile. convert Convert converts an input file using one image format to an output file with a differing image format. By default, the image format is determined by it's magic number. To specify a particular image format, precede the filename with an image format name and a colon (i.e. ps:image) or specify the image type as the filename suffix (i.e. image.ps). Specify file as - for standard input or output. If file has the extension .Z, the file is decoded with uncompress. mogrify Mogrify transforms an image or a sequence of images. These transforms include image scaling, image rotation, color reduction, and others. The transmogrified image overwrites the original image. identify describes the format and characteristics of one or more image files. It will also report if an image is incomplete or corrupt. The information displayed includes the scene number, the file name, the width and height of the image, whether the image is colormapped or not, the number of colors in the image, the number of bytes in the image, the format of the image (JPEG, PNM, etc.), and finally the number of seconds it took to read and process the image. combine Combine combines images to create new images. From markov@ATComputing.nl Wed Jul 26 13:32:31 2000 Date: Wed, 26 Jul 2000 13:32:31 +0200 From: Mark Overmeer To: Chris Wareham Subject: Re: core dump in simple ImageMagick example Message-ID: <20000726133231.G25170@atcmpg.ATComputing.nl> References: <397C6C6B.989E4BB2@catchword.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <397C6C6B.989E4BB2@catchword.com>; from chris.wareham@catchword.com on Mon, Jul 24, 2000 at 05:18:51PM +0100 Status: RO Content-Length: 2223 Lines: 55 * Chris Wareham (chris.wareham@catchword.com) [000724 18:24]: > *********************************************************************** > This list is being decommissioned. Please join one or more of the new > ImageMagick mailing lists as described at > http://www.imagemagick.org/www/magick-list.html. > *********************************************************************** > > The following snippet of code coew dumps on ReadImage(): > > GetExceptionInfo(&exception); > image_info = CloneImageInfo((ImageInfo *)NULL); > > strcpy(image_info->filename, IMAGEDIR); > strcat(image_info->filename, "/"); > strcat(image_info->filename, filename); > > image = ReadImage(image_info, &exception); > if(image == (Image *)NULL) { > log_error("unable to read image '%s'", filename); > return; > } > > The debugger output is the following: > > Program received signal SIGSEGV, Segmentation fault. > 0x403a0058 in _IO_getc (fp=0x67616d69) at getc.c:39 > 39 getc.c: No such file or directory. > (gdb) bt > #0 0x403a0058 in _IO_getc (fp=0x67616d69) at getc.c:39 > #1 0x4005eb8d in SetImageInfo () from /usr/local/lib/libMagick.so.5 > #2 0x4003c91e in ReadImage () from /usr/local/lib/libMagick.so.5 > #3 0x80491dd in process_image (dbm=0x804bea0, filename=0x806a157 > "00132aac.tif") at tif2png.c:107 > #4 0x8048fd3 in convert_images (args=0xbffff9f4) at tif2png.c:55 > #5 0x8048e6c in main (argc=1, argv=0xbffff9f4) at tif2png.c:21 I have the same problem using PerlMagick 5.2.2 calling ReadImage. However, it is only reproduceable when this statement is included in my huge Perl program with a small IM part, not is a smaller sample as you have. I run Solaris 2.5.1 and all newest image-libs attached. Did you get any useful reply which fixed your problem. Didi you know there is a bug-list: http://www.simplesystems.org/ImageMagick/bugs/ Please let me know. -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From magick-owner@unca-don.wizards.dupont.com Mon Jul 24 18:24 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id SAA27465 for ; Mon, 24 Jul 2000 18:24:10 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id SAA20827 for ; Mon, 24 Jul 2000 18:24:09 +0200 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma020823; Mon, 24 Jul 00 18:23:51 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id MAA20883; Mon, 24 Jul 2000 12:23:50 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id MAA01738 for magick-outgoing; Mon, 24 Jul 2000 12:07:32 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <397C6C6B.989E4BB2@catchword.com> Date: Mon, 24 Jul 2000 17:18:51 +0100 From: Chris Wareham X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.17pre13 i686) X-Accept-Language: en MIME-Version: 1.0 To: magick@wizards.dupont.com Subject: core dump in simple ImageMagick example Content-Transfer-Encoding: 7bit Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Chris Wareham Content-Type: text/plain; charset=us-ascii Status: RO X-Status: A Content-Length: 1736 Lines: 47 *********************************************************************** This list is being decommissioned. Please join one or more of the new ImageMagick mailing lists as described at http://www.imagemagick.org/www/magick-list.html. *********************************************************************** The following snippet of code coew dumps on ReadImage(): GetExceptionInfo(&exception); image_info = CloneImageInfo((ImageInfo *)NULL); strcpy(image_info->filename, IMAGEDIR); strcat(image_info->filename, "/"); strcat(image_info->filename, filename); image = ReadImage(image_info, &exception); if(image == (Image *)NULL) { log_error("unable to read image '%s'", filename); return; } The debugger output is the following: Program received signal SIGSEGV, Segmentation fault. 0x403a0058 in _IO_getc (fp=0x67616d69) at getc.c:39 39 getc.c: No such file or directory. (gdb) bt #0 0x403a0058 in _IO_getc (fp=0x67616d69) at getc.c:39 #1 0x4005eb8d in SetImageInfo () from /usr/local/lib/libMagick.so.5 #2 0x4003c91e in ReadImage () from /usr/local/lib/libMagick.so.5 #3 0x80491dd in process_image (dbm=0x804bea0, filename=0x806a157 "00132aac.tif") at tif2png.c:107 #4 0x8048fd3 in convert_images (args=0xbffff9f4) at tif2png.c:55 #5 0x8048e6c in main (argc=1, argv=0xbffff9f4) at tif2png.c:21 image_info->filename points to a valid TIFF image, so any ideas as to what gives??? Chris *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From markov@ATComputing.nl Wed Jul 26 13:49:09 2000 Date: Wed, 26 Jul 2000 13:49:09 +0200 From: Mark Overmeer To: Chris Wareham Subject: Re: core dump in simple ImageMagick example Message-ID: <20000726134909.I25170@atcmpg.ATComputing.nl> References: <397C6C6B.989E4BB2@catchword.com> <20000726133231.G25170@atcmpg.ATComputing.nl> <397ECFEF.598EE285@catchword.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <397ECFEF.598EE285@catchword.com>; from chris.wareham@catchword.com on Wed, Jul 26, 2000 at 12:47:59PM +0100 Status: RO Content-Length: 754 Lines: 16 * Chris Wareham (chris.wareham@catchword.com) [000726 13:46]: > > I have the same problem using PerlMagick 5.2.2 calling ReadImage. > This solved my problem with a C based ImageMagick client, but > I don't know whether it is relevant for PerlMagick programs. So: to install IM, I need to have the libs installed. To install the libs, I need IM to be installed for Magic-config.... Ok. Still strange spot to dump core... -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From chris.wareham@catchword.com Wed Jul 26 13:46 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id NAA29434 for ; Wed, 26 Jul 2000 13:46:33 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id NAA24001 for ; Wed, 26 Jul 2000 13:46:32 +0200 Received: from figaro.catchword.co.uk(194.129.29.1) by ns.ATComputing.nl via smap (V2.1) id xma023999; Wed, 26 Jul 00 13:46:13 +0200 Received: from catchword.com (valkyrie.catchword.co.uk [194.129.29.105]) by figaro.catchword.co.uk (8.9.2/8.9.2) with ESMTP id LAA10217 for ; Wed, 26 Jul 2000 11:49:37 GMT Sender: cwareham@figaro.catchword.co.uk Message-ID: <397ECFEF.598EE285@catchword.com> Date: Wed, 26 Jul 2000 12:47:59 +0100 From: Chris Wareham X-Mailer: Mozilla 4.74 [en] (X11; U; Linux 2.2.17pre13 i686) X-Accept-Language: en MIME-Version: 1.0 To: Mark Overmeer Subject: Re: core dump in simple ImageMagick example References: <397C6C6B.989E4BB2@catchword.com> <20000726133231.G25170@atcmpg.ATComputing.nl> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Status: RO X-Status: A Content-Length: 882 Lines: 26 Mark Overmeer wrote: > > I have the same problem using PerlMagick 5.2.2 calling ReadImage. > However, it is only reproduceable when this statement is included in > my huge Perl program with a small IM part, not is a smaller sample > as you have. > > I run Solaris 2.5.1 and all newest image-libs attached. > > Did you get any useful reply which fixed your problem. > Didi you know there is a bug-list: > http://www.simplesystems.org/ImageMagick/bugs/ > > Please let me know. > I wasn't passing all the required compiler flags when building my program. I had looked at the output of Magick-config, and simply copied the library dependencies into a Makefile. To successfully build, ImageMagick clients also need the correct CFLAGS arguments, etc. This solved my problem with a C based ImageMagick client, but I don't know whether it is relevant for PerlMagick programs. Chris From markov@ATComputing.nl Mon Aug 7 11:38:44 2000 Date: Mon, 7 Aug 2000 11:38:44 +0200 From: Mark Overmeer To: Bryan Burchette Subject: Re: Core Dump on ReadImage Message-ID: <20000807113844.A22119@atcmpg.ATComputing.nl> References: <4.3.1.0.20000801154753.00ae3ed0@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <4.3.1.0.20000801154753.00ae3ed0@mindspring.com>; from blburch@mindspring.com on Tue, Aug 01, 2000 at 03:54:42PM -0400 Status: RO Content-Length: 1041 Lines: 24 (I was away for holidays last week, so not able to response earlier) * Bryan Burchette (blburch@mindspring.com) [000801 22:37]: > I am using ImageMagick 5.2.2 and for testing puposes I am using the little > test program on the website under the API section. No matter what I do, the > program cores on ReadImage(). > Current function is main > 33 image=ReadImage(image_info,&exception); I located the problem in the getc() of ReadImage using PerlMagick. I did not succeed in creating a reduced sized example for my program which reproduces the problem, so I'm glad I'm not the only one with this problem. Is there are more clarity on the cause of the crash? Any response from the developers? -- Mark Overmeer %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From magick-owner@unca-don.wizards.dupont.com Tue Aug 1 22:37 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id WAA14913 for ; Tue, 1 Aug 2000 22:37:13 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id WAA04892 for ; Tue, 1 Aug 2000 22:37:12 +0200 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma004890; Tue, 1 Aug 00 22:37:04 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id QAA28454; Tue, 1 Aug 2000 16:36:07 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id PAA24962 for magick-outgoing; Tue, 1 Aug 2000 15:46:55 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-Id: <4.3.1.0.20000801154753.00ae3ed0@mindspring.com> X-Sender: blburch@mindspring.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Date: Tue, 01 Aug 2000 15:54:42 -0400 To: magick@wizards.dupont.com From: Bryan Burchette Subject: Core Dump on ReadImage Mime-Version: 1.0 Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Bryan Burchette Content-Type: text/plain; charset="us-ascii"; format=flowed Status: RO X-Status: A Content-Length: 2042 Lines: 55 *********************************************************************** This list is being decommissioned. Please join one or more of the new ImageMagick mailing lists as described at http://www.imagemagick.org/www/magick-list.html. *********************************************************************** Hey List, This has me stumped! Maybe I am just missing something really obvious. I am using ImageMagick 5.2.2 and for testing puposes I am using the little test program on the website under the API section. No matter what I do, the program cores on ReadImage(). This is the program I am using to test: http://www.wizards.dupont.com/cristy/www/api.html I have pointed the MagickIncarnate() function to the appropriate directory on my box. Does anybody have any ideas?? What could I be doing wrong. Here is my ouput from DBX (dbx) step stopped in main at line 29 in file "test.c" 29 GetExceptionInfo(&exception); (dbx) where =>[1] main(argc = 1, argv = 0xeffff3c4 "\xef\xff\xf5^H"), line 29 in "test.c" (dbx) step stopped in main at line 30 in file "test.c" 30 image_info=CloneImageInfo((ImageInfo *) NULL); (dbx) step stopped in main at line 31 in file "test.c" 31 (void) strcpy(image_info->filename,"test.jpg"); (dbx) step stopped in main at line 32 in file "test.c" 32 printf("iamge_info->filename is %s\n",image_info->filename); (dbx) step iamge_info->filename is test.jpg stopped in main at line 33 in file "test.c" 33 image=ReadImage(image_info,&exception); (dbx) step signal SEGV (no mapping at the fault address) in getc at 0xef267b24 0xef267b24: getc+0x0024: ld [%i0], %o0 Current function is main 33 image=ReadImage(image_info,&exception); *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@imagemagick.org Wed Oct 4 19:56 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id TAA26427 for ; Wed, 4 Oct 2000 19:56:00 +0200 (MET DST) Received: from imagemagick.org (magick.imagemagick.org [38.220.172.2]) by ns.ATComputing.nl (Postfix) with ESMTP id 84B2DED32 for ; Wed, 4 Oct 2000 19:55:58 +0200 (CEST) Received: (from majordomo@localhost) by imagemagick.org (8.11.0.Beta3/8.9.3) id e94IMj420302 for magick-developer-outgoing; Wed, 4 Oct 2000 14:22:45 -0400 X-Authentication-Warning: magick.imagemagick.org: majordomo set sender to owner-magick@imagemagick.org using -f From: cristy@mystic.es.dupont.com Date: Wed, 4 Oct 2000 14:22:35 -0400 (EDT) Message-Id: <200010041822.e94IMZr19712@mystic.es.dupont.com> To: magick-developer@imagemagick.org Subject: Font metrics Sender: owner-magick@imagemagick.org Precedence: bulk Reply-To: cristy@mystic.es.dupont.com Content-Type: text Status: RO Content-Length: 1620 Lines: 32 The problem with general font metrics in ImageMagick is that there are four schemes for obtaining fonts FreeType 1, FreeType 2, Postscript/Ghostscript fonts, and X11 fonts. Freetype returns plenty of information associated with font metrics. I know of no way to get the font metrics from Ghostscript and X11 fonts returns metrics but they do not exactly match the information returned by Freetype. Layered on top of that is the fonts can be manipulated with an affine matrix with varying results for the different font schemes. Currently I write fonts to an image that bounds the font and turn all pixels not covered by the font lettering to transparent then composite this on top of the image being annotated. The only metrics available now are the maximum font height and string width. In Perl, for example, use $font->Read('label:This is a test'); ($width,$height)=$font->Get('width','height'); I can certainly include other metric information as well but how to do this consistently for all font schemes? Perhaps I could retain the font metrics for Freetype fonts only? Or can you think of a few specific font metrics that would be useful to you that we can get for FreeType, X11, and Postscript fonts? What is a minimal set of font metrics you need to make annotating more useable? *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@imagemagick.org Include the following command in the body of your message: unsubscribe magick-developer *********************************************************************** Mail-Box-2.118/tests/folders/mbox.src0000644000175000001440000041010212473603434020135 0ustar00markovusers00000000000000From magick-owner@unca-don.wizards.dupont.com Wed Feb 9 22:02 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id WAA23694 for ; Wed, 9 Feb 2000 22:02:24 +0100 (MET) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id WAA01128 for ; Wed, 9 Feb 2000 22:02:24 +0100 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma001126; Wed, 9 Feb 00 22:02:01 +0100 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id QAA21962; Wed, 9 Feb 2000 16:00:43 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id PAA29389 for magick-outgoing; Wed, 9 Feb 2000 15:38:42 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Date: Wed, 9 Feb 2000 15:44:05 -0500 From: William Park To: Mark Sappol Cc: "magick@wizards.dupont.com" Subject: Re: File Conversion From HTML to PS and TIFF Message-ID: <20000209154405.C265@better.net> Mail-Followup-To: Mark Sappol , "magick@wizards.dupont.com" References: <38A11D0E.A2064062@ipicorp.com> Mime-Version: 1.0 X-Mailer: Mutt 1.0pre3i In-Reply-To: <38A11D0E.A2064062@ipicorp.com> Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: William Park Content-Type: text/plain; charset=us-ascii Status: RO Content-Length: 1280 Lines: 33 On Wed, Feb 09, 2000 at 07:53:50AM +0000, Mark Sappol wrote: > I am new to this list so please forgive me if I am asking something that > has already been answered previously. I did check the archives but too > no avail. > > I need to create a postscript file from an HTML document. I have no > problem here with the text but I do have a logo (gif file) on this > document which does not get converted. How can I go about converting > the HTML documents I generate, along with any linked GIF images, to > PostScript, as well as at other times, to TIFF? > > I would appreciate any feedback and help on this request. > > Thanks in advance, > Mark You can convert .html to .ps using Netscape. You can do this manually by clicking mouse, or through '-remote' command line option. For example, netscape -remote "openURL(http://sexybabes.for.you/)" \ -remote "saveAs(xxx.ps, Postscript)" You can then convert .ps to .tiff like FAX program does. William *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Wed Feb 9 23:15 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id XAA24500 for ; Wed, 9 Feb 2000 23:15:56 +0100 (MET) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id XAA01235 for ; Wed, 9 Feb 2000 23:15:55 +0100 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma001233; Wed, 9 Feb 00 23:15:42 +0100 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id RAA04724; Wed, 9 Feb 2000 17:13:49 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id QAA29779 for magick-outgoing; Wed, 9 Feb 2000 16:56:19 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-Id: <200002092200.RAA19561@mailfw3.ford.com> Date: Wed, 09 Feb 2000 17:00:14 -0500 From: "Lincoln, D. E. (Daniel)" Organization: R&VT VCP&M X-Mailer: Mozilla 4.7C-CCK-MCD cf47 [en] (X11; I; SunOS 5.6 sun4u) X-Accept-Language: en, en-GB, de, fr, ja, ko, zh Mime-Version: 1.0 To: Jeffrey Krzysztow Cc: William Park , Mark Sappol , "magick@wizards.dupont.com" Subject: Re: File Conversion From HTML to PS and TIFF References: <38A11D0E.A2064062@ipicorp.com> <20000209154405.C265@better.net> <38A1DBE7.9D3718C9@pvii.com> Content-Transfer-Encoding: 7bit Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: "Lincoln, D. E. (Daniel)" Content-Type: text/plain; charset=us-ascii Status: RO Content-Length: 2109 Lines: 60 If I may interject... It can be found at: http://developer.netscape.com/docs/manuals/deploymt/options.htm Jeffrey Krzysztow wrote: > > William, > > Where did you find information about -remote command line option for Netscape? > > William Park wrote: > > > On Wed, Feb 09, 2000 at 07:53:50AM +0000, Mark Sappol wrote: > > > I am new to this list so please forgive me if I am asking something that > > > has already been answered previously. I did check the archives but too > > > no avail. > > > > > > I need to create a postscript file from an HTML document. I have no > > > problem here with the text but I do have a logo (gif file) on this > > > document which does not get converted. How can I go about converting > > > the HTML documents I generate, along with any linked GIF images, to > > > PostScript, as well as at other times, to TIFF? > > > > > > I would appreciate any feedback and help on this request. > > > > > > Thanks in advance, > > > Mark > > > > You can convert .html to .ps using Netscape. You can do this manually > > by clicking mouse, or through '-remote' command line option. For > > example, > > netscape -remote "openURL(http://sexybabes.for.you/)" \ > > -remote "saveAs(xxx.ps, Postscript)" > > > > You can then convert .ps to .tiff like FAX program does. > > > > William > > > > *********************************************************************** > > To remove yourself from this mailing list, send mail to: > > majordomo@wizards.dupont.com > > > > Include the following command in the body of your message: > > unsubscribe magick > > *********************************************************************** -- Regards, Daniel E. Lincoln - Digital Buck Mechanic Ford Motor Company - R&VT Vehicle CAD Process & Methods *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Wed Feb 9 23:15 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id XAA24495 for ; Wed, 9 Feb 2000 23:15:26 +0100 (MET) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id XAA01230 for ; Wed, 9 Feb 2000 23:15:25 +0100 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma001228; Wed, 9 Feb 00 23:15:21 +0100 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id RAA04756; Wed, 9 Feb 2000 17:13:55 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id QAA29764 for magick-outgoing; Wed, 9 Feb 2000 16:55:37 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <38A1E3B0.F148D74A@websidestory.com> Date: Wed, 09 Feb 2000 14:01:20 -0800 From: Steve Dotson X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.5-15 i686) X-Accept-Language: en MIME-Version: 1.0 To: Jeffrey Krzysztow CC: William Park , Mark Sappol , "magick@wizards.dupont.com" Subject: Re: File Conversion From HTML to PS and TIFF References: <38A11D0E.A2064062@ipicorp.com> <20000209154405.C265@better.net> <38A1DBE7.9D3718C9@pvii.com> Content-Transfer-Encoding: 7bit Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Steve Dotson Content-Type: text/plain; charset=us-ascii Status: RO Content-Length: 2129 Lines: 63 http://home.netscape.com/newsref/std/x-remote.html Jeffrey Krzysztow wrote: > > William, > > Where did you find information about -remote command line option for Netscape? > > William Park wrote: > > > On Wed, Feb 09, 2000 at 07:53:50AM +0000, Mark Sappol wrote: > > > I am new to this list so please forgive me if I am asking something that > > > has already been answered previously. I did check the archives but too > > > no avail. > > > > > > I need to create a postscript file from an HTML document. I have no > > > problem here with the text but I do have a logo (gif file) on this > > > document which does not get converted. How can I go about converting > > > the HTML documents I generate, along with any linked GIF images, to > > > PostScript, as well as at other times, to TIFF? > > > > > > I would appreciate any feedback and help on this request. > > > > > > Thanks in advance, > > > Mark > > > > You can convert .html to .ps using Netscape. You can do this manually > > by clicking mouse, or through '-remote' command line option. For > > example, > > netscape -remote "openURL(http://sexybabes.for.you/)" \ > > -remote "saveAs(xxx.ps, Postscript)" > > > > You can then convert .ps to .tiff like FAX program does. > > > > William > > > > *********************************************************************** > > To remove yourself from this mailing list, send mail to: > > majordomo@wizards.dupont.com > > > > Include the following command in the body of your message: > > unsubscribe magick > > *********************************************************************** -- Steve Dotson Software Engineer WebSideStory, Inc. 10182 Telesis Court, Sixth Floor San Diego, California 92121 P: 858.546.0040 ext. 417 F: 858.546.0480 E: steve@websidestory.com *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Wed Feb 23 17:28 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id RAA20894 for ; Wed, 23 Feb 2000 17:28:05 +0100 (MET) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id RAA21883 for ; Wed, 23 Feb 2000 17:28:04 +0100 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma021881; Wed, 23 Feb 00 17:27:46 +0100 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id LAA28560; Wed, 23 Feb 2000 11:25:57 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id KAA09345 for magick-outgoing; Wed, 23 Feb 2000 10:53:09 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <177E035AF8BDD311858B00A0C9D8E324886A3B@EMAILSRVR_KPR> From: Steve Sapovits To: magick@wizards.dupont.com Subject: Transparency question Date: Wed, 23 Feb 2000 10:58:16 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Steve Sapovits Content-Type: text/plain Status: RO Content-Length: 1447 Lines: 42 I'm trying to do the following: 1) Take a JPEG image and size it down to a particular size. 2) Overlay that JPEG on top of an GIF image to form a combined result. This works fine for the most part: I use mogrify to resize, followed by combine to overlay. Now I'm presented with GIF images (the ones the JPEG is put on top of) that have colors or other background attributes we want to 'show through' the overlay where there is no image. Even without any transparency options this seems to ALMOST work. The problem is that there's a small area around each image of 'white' that always shows up. Trying transparency or the 'matte' option of '-draw' seems to have no effect. Any ideas? I'm an engineer -- not an image expert. The images in question are handed to me. I can change them if necessary and if it can be done via the ImageMagick tool. The volume we generate makes manual changes to each image out of the question. ---- Steve Sapovits Global Sports Interactive Work Email: sapovitss@globalsportsinc.com Home Email: steves@delanet.com Work Phone: 610-491-7087 Cell: 610-574-7706 Pager: 877-239-4003 *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Wed Feb 23 20:13 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id UAA24120 for ; Wed, 23 Feb 2000 20:13:38 +0100 (MET) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id UAA22110 for ; Wed, 23 Feb 2000 20:13:38 +0100 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma022108; Wed, 23 Feb 00 20:13:37 +0100 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id OAA00687; Wed, 23 Feb 2000 14:11:56 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id NAA10192 for magick-outgoing; Wed, 23 Feb 2000 13:26:44 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <177E035AF8BDD311858B00A0C9D8E324886AB2@EMAILSRVR_KPR> From: Steve Sapovits To: Steve Sapovits , magick@wizards.dupont.com Subject: RE: Transparency question Date: Wed, 23 Feb 2000 13:31:41 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Steve Sapovits Content-Type: text/plain Status: RO Content-Length: 2483 Lines: 73 Someone on this list and my image folks here seem to confirm that the problem here is with 'fringe' pixels that were not trimmed back as neatly as possible. Any suggestions for automating this? This whole thing needs to be batched. I played with the transparency and fuzz options with no real difference noted. Trying crop 0x0 makes some of the fringe whitespace areas neater, but it doesn't get rid of them. Any suggestions? > -----Original Message----- > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > Sent: Wednesday, February 23, 2000 10:58 AM > To: magick@wizards.dupont.com > Subject: Transparency question > > > I'm trying to do the following: > > 1) Take a JPEG image and size it down to a particular size. > 2) Overlay that JPEG on top of an GIF image to form a combined result. > > This works fine for the most part: I use mogrify to resize, followed by > combine to overlay. > > Now I'm presented with GIF images (the ones the JPEG is put on top of) > that have colors or other background attributes we want to 'show through' > the overlay where there is no image. > > Even without any transparency options this seems to ALMOST work. The > problem is that there's a small area around each image of 'white' that > always > shows up. Trying transparency or the 'matte' option of '-draw' seems to > have > no effect. > > Any ideas? I'm an engineer -- not an image expert. The images in > question > are handed to me. I can change them if necessary and if it can be done > via > the ImageMagick tool. The volume we generate makes manual changes to > each image out of the question. > > ---- > Steve Sapovits > Global Sports Interactive > Work Email: sapovitss@globalsportsinc.com > Home Email: steves@delanet.com > Work Phone: 610-491-7087 > Cell: 610-574-7706 > Pager: 877-239-4003 > > > *********************************************************************** > To remove yourself from this mailing list, send mail to: > majordomo@wizards.dupont.com > > Include the following command in the body of your message: > unsubscribe magick > *********************************************************************** *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Thu Feb 24 17:27 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id RAA19964 for ; Thu, 24 Feb 2000 17:27:35 +0100 (MET) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id RAA23400 for ; Thu, 24 Feb 2000 17:27:34 +0100 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma023398; Thu, 24 Feb 00 17:27:10 +0100 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id LAA14646; Thu, 24 Feb 2000 11:25:37 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id LAA15770 for magick-outgoing; Thu, 24 Feb 2000 11:04:56 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <8100014B48DAD111AA4100805F9F3FC903A0E5B2@host60.corbis.com> From: Bill Radcliffe To: "'Steve Sapovits'" , "'magick@wizards.dupont.com'" Subject: RE: Transparency question Date: Thu, 24 Feb 2000 08:06:44 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Bill Radcliffe Content-Type: text/plain Status: RO Content-Length: 3362 Lines: 93 It would help me if you could send some small samples of exactly the effect you are trying to achieve. I'm sure IM can do whatever you want but the road to get there may not be at all obvious. > -----Original Message----- > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > Sent: Wednesday, February 23, 2000 10:32 AM > To: Steve Sapovits; magick@wizards.dupont.com > Subject: RE: Transparency question > > > Someone on this list and my image folks here seem to confirm that the > problem > here is with 'fringe' pixels that were not trimmed back as neatly as > possible. Any > suggestions for automating this? This whole thing needs to be batched. I > played > with the transparency and fuzz options with no real difference noted. > Trying > crop 0x0 makes some of the fringe whitespace areas neater, but it doesn't > get rid > of them. > > Any suggestions? > > > -----Original Message----- > > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > > Sent: Wednesday, February 23, 2000 10:58 AM > > To: magick@wizards.dupont.com > > Subject: Transparency question > > > > > > I'm trying to do the following: > > > > 1) Take a JPEG image and size it down to a particular size. > > 2) Overlay that JPEG on top of an GIF image to form a combined result. > > > > This works fine for the most part: I use mogrify to resize, followed by > > > combine to overlay. > > > > Now I'm presented with GIF images (the ones the JPEG is put on top of) > > that have colors or other background attributes we want to 'show > through' > > the overlay where there is no image. > > > > Even without any transparency options this seems to ALMOST work. The > > problem is that there's a small area around each image of 'white' that > > always > > shows up. Trying transparency or the 'matte' option of '-draw' seems to > > have > > no effect. > > > > Any ideas? I'm an engineer -- not an image expert. The images in > > question > > are handed to me. I can change them if necessary and if it can be done > > via > > the ImageMagick tool. The volume we generate makes manual changes to > > each image out of the question. > > > > ---- > > Steve Sapovits > > Global Sports Interactive > > Work Email: sapovitss@globalsportsinc.com > > Home Email: steves@delanet.com > > Work Phone: 610-491-7087 > > Cell: 610-574-7706 > > Pager: 877-239-4003 > > > > > > *********************************************************************** > > To remove yourself from this mailing list, send mail to: > > majordomo@wizards.dupont.com > > > > Include the following command in the body of your message: > > unsubscribe magick > > *********************************************************************** > > *********************************************************************** > To remove yourself from this mailing list, send mail to: > majordomo@wizards.dupont.com > > Include the following command in the body of your message: > unsubscribe magick > *********************************************************************** *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Thu Feb 24 18:17 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id SAA21506 for ; Thu, 24 Feb 2000 18:17:36 +0100 (MET) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id SAA23500 for ; Thu, 24 Feb 2000 18:17:35 +0100 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma023498; Thu, 24 Feb 00 18:17:21 +0100 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id MAA27594; Thu, 24 Feb 2000 12:14:53 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id LAA16076 for magick-outgoing; Thu, 24 Feb 2000 11:52:40 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <8100014B48DAD111AA4100805F9F3FC903A0E5B9@host60.corbis.com> From: Bill Radcliffe To: "'Steve Sapovits'" Cc: "'magick@wizards.dupont.com'" Subject: RE: Transparency question Date: Thu, 24 Feb 2000 08:54:32 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Bill Radcliffe Content-Type: text/plain; charset="ISO-8859-1" Status: RO Content-Length: 5643 Lines: 161 Your problem is that you are trying to use transparency, but you really want to use alpha channel blending. I'll show you how if you can send me another copy of MCS_C_11452.gif before it is flattened out into a GIF file. You need to have an input file were the "image" pixels are in the RGB parts of the file, and the "cutout" is in the "alpha" channel. The alpha channel contains a value for each and every pixel that defines the opacity of the pixel. Two file formats that support this are Photoshop and TIFF. > -----Original Message----- > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > Sent: Thursday, February 24, 2000 8:34 AM > To: Bill Radcliffe > Subject: RE: Transparency question > > > Good idea, of course. > > This is run from a bigger program but I distilled it down to a simpler > set of commands to reproduce. I run these two commands: > > mogrify -geometry 120x120! 'MCS_C_11452.gif' > combine 'MCS_C_120x150.gif' -gravity south 'MCS_C_11452.gif' -compose over > 'result.gif' > > I get this output: > > mogrify: no delegates configuration file found (delegates.mgk). > mogrify: no encode delegate for this image format (Y). > combine: no delegates configuration file found (delegates.mgk). > > I've gotten these 'delegates' messages before with no ill effects. > > Here are the files I'm using. The 'result.gif' has the whitespace I > mentioned. Any help > would be greatly appreciated. I'll write a perl program for you in > exchange > or something. 8-) > > <> <> <> > > > > -----Original Message----- > > From: Bill Radcliffe [SMTP:BillR@corbis.com] > > Sent: Thursday, February 24, 2000 11:07 AM > > To: 'Steve Sapovits'; 'magick@wizards.dupont.com' > > Subject: RE: Transparency question > > > > It would help me if you could send some small samples of exactly the > > effect > > you are trying to achieve. I'm sure IM can do whatever you want but the > > road > > to get there may not be at all obvious. > > > > > -----Original Message----- > > > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > > > Sent: Wednesday, February 23, 2000 10:32 AM > > > To: Steve Sapovits; magick@wizards.dupont.com > > > Subject: RE: Transparency question > > > > > > > > > Someone on this list and my image folks here seem to confirm that the > > > problem > > > here is with 'fringe' pixels that were not trimmed back as neatly as > > > possible. Any > > > suggestions for automating this? This whole thing needs to be > batched. > > I > > > played > > > with the transparency and fuzz options with no real difference noted. > > > Trying > > > crop 0x0 makes some of the fringe whitespace areas neater, but it > > doesn't > > > get rid > > > of them. > > > > > > Any suggestions? > > > > > > > -----Original Message----- > > > > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > > > > Sent: Wednesday, February 23, 2000 10:58 AM > > > > To: magick@wizards.dupont.com > > > > Subject: Transparency question > > > > > > > > > > > > I'm trying to do the following: > > > > > > > > 1) Take a JPEG image and size it down to a particular size. > > > > 2) Overlay that JPEG on top of an GIF image to form a combined > > result. > > > > > > > > This works fine for the most part: I use mogrify to resize, > followed > > by > > > > > > > combine to overlay. > > > > > > > > Now I'm presented with GIF images (the ones the JPEG is put on top > of) > > > > that have colors or other background attributes we want to 'show > > > through' > > > > the overlay where there is no image. > > > > > > > > Even without any transparency options this seems to ALMOST work. > The > > > > problem is that there's a small area around each image of 'white' > that > > > > always > > > > shows up. Trying transparency or the 'matte' option of '-draw' > seems > > to > > > > have > > > > no effect. > > > > > > > > Any ideas? I'm an engineer -- not an image expert. The images in > > > > question > > > > are handed to me. I can change them if necessary and if it can be > > done > > > > via > > > > the ImageMagick tool. The volume we generate makes manual changes > to > > > > each image out of the question. > > > > > > > > ---- > > > > Steve Sapovits > > > > Global Sports Interactive > > > > Work Email: sapovitss@globalsportsinc.com > > > > Home Email: steves@delanet.com > > > > Work Phone: 610-491-7087 > > > > Cell: 610-574-7706 > > > > Pager: 877-239-4003 > > > > > > > > > > > > > > *********************************************************************** > > > > To remove yourself from this mailing list, send mail to: > > > > majordomo@wizards.dupont.com > > > > > > > > Include the following command in the body of your message: > > > > unsubscribe magick > > > > > > *********************************************************************** > > > > > > > *********************************************************************** > > > To remove yourself from this mailing list, send mail to: > > > majordomo@wizards.dupont.com > > > > > > Include the following command in the body of your message: > > > unsubscribe magick > > > > *********************************************************************** << > File: MCS_C_11452.gif >> << File: MCS_C_120x150.gif >> << File: > result.gif >> *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Thu Feb 24 20:21 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id UAA23276 for ; Thu, 24 Feb 2000 20:21:08 +0100 (MET) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id UAA23679 for ; Thu, 24 Feb 2000 20:21:08 +0100 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma023676; Thu, 24 Feb 00 20:20:57 +0100 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id OAA10625; Thu, 24 Feb 2000 14:17:28 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id NAA16562 for magick-outgoing; Thu, 24 Feb 2000 13:40:21 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <8100014B48DAD111AA4100805F9F3FC903A0E5BF@host60.corbis.com> From: Bill Radcliffe To: "'Steve Sapovits'" Cc: "'magick@wizards.dupont.com'" Subject: RE: Transparency question Date: Thu, 24 Feb 2000 10:42:23 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Bill Radcliffe Content-Type: text/plain; charset="ISO-8859-1" Status: RO Content-Length: 7382 Lines: 206 OK - here is a "possible" solution. This sequence relies on the fact that the input image was originally composited on a white background. It takes the image and generates a "fake" alpha channel (mask) and uses this during the compositing operation. It looks pretty good, but has the disadvantage that the background will tend to influence the colors in the final image more then you would want. : first convert to an RGB format with no more transparency or mask channel convert -compression none MCS_C_11452.gif MCS_C_11452_rgb.bmp : now make a fake alpha channel using a grayscale version of the image (inverted) convert -compression none -colorspace gray -negate MCS_C_11452.gif MCS_C_11452_a.bmp : combine the original image along with the fake alpha channel onto the background combine -gravity south -compose over MCS_C_120x150.gif MCS_C_11452.gif MCS_C_11452_a.bmp result.gif > -----Original Message----- > From: Bill Radcliffe > Sent: Thursday, February 24, 2000 8:55 AM > To: 'Steve Sapovits' > Cc: 'magick@wizards.dupont.com' > Subject: RE: Transparency question > > Your problem is that you are trying to use transparency, but you really > want > to use alpha channel blending. I'll show you how if you can send me > another > copy of MCS_C_11452.gif before it is flattened out into a GIF file. You > need > to have an input file were the "image" pixels are in the RGB parts of the > file, and the "cutout" is in the "alpha" channel. The alpha channel > contains > a value for each and every pixel that defines the opacity of the pixel. > Two > file formats that support this are Photoshop and TIFF. > > > -----Original Message----- > > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > > Sent: Thursday, February 24, 2000 8:34 AM > > To: Bill Radcliffe > > Subject: RE: Transparency question > > > > > > Good idea, of course. > > > > This is run from a bigger program but I distilled it down to a simpler > > set of commands to reproduce. I run these two commands: > > > > mogrify -geometry 120x120! 'MCS_C_11452.gif' > > combine 'MCS_C_120x150.gif' -gravity south 'MCS_C_11452.gif' -compose > over > > 'result.gif' > > > > I get this output: > > > > mogrify: no delegates configuration file found (delegates.mgk). > > mogrify: no encode delegate for this image format (Y). > > combine: no delegates configuration file found (delegates.mgk). > > > > I've gotten these 'delegates' messages before with no ill effects. > > > > Here are the files I'm using. The 'result.gif' has the whitespace I > > mentioned. Any help > > would be greatly appreciated. I'll write a perl program for you in > > exchange > > or something. 8-) > > > > <> <> <> > > > > > > > -----Original Message----- > > > From: Bill Radcliffe [SMTP:BillR@corbis.com] > > > Sent: Thursday, February 24, 2000 11:07 AM > > > To: 'Steve Sapovits'; 'magick@wizards.dupont.com' > > > Subject: RE: Transparency question > > > > > > It would help me if you could send some small samples of exactly the > > > effect > > > you are trying to achieve. I'm sure IM can do whatever you want but > the > > > road > > > to get there may not be at all obvious. > > > > > > > -----Original Message----- > > > > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > > > > Sent: Wednesday, February 23, 2000 10:32 AM > > > > To: Steve Sapovits; magick@wizards.dupont.com > > > > Subject: RE: Transparency question > > > > > > > > > > > > Someone on this list and my image folks here seem to confirm that > the > > > > problem > > > > here is with 'fringe' pixels that were not trimmed back as neatly as > > > > possible. Any > > > > suggestions for automating this? This whole thing needs to be > > batched. > > > I > > > > played > > > > with the transparency and fuzz options with no real difference > noted. > > > > Trying > > > > crop 0x0 makes some of the fringe whitespace areas neater, but it > > > doesn't > > > > get rid > > > > of them. > > > > > > > > Any suggestions? > > > > > > > > > -----Original Message----- > > > > > From: Steve Sapovits [SMTP:SapovitsS@globalsportsinc.com] > > > > > Sent: Wednesday, February 23, 2000 10:58 AM > > > > > To: magick@wizards.dupont.com > > > > > Subject: Transparency question > > > > > > > > > > > > > > > I'm trying to do the following: > > > > > > > > > > 1) Take a JPEG image and size it down to a particular size. > > > > > 2) Overlay that JPEG on top of an GIF image to form a combined > > > result. > > > > > > > > > > This works fine for the most part: I use mogrify to resize, > > followed > > > by > > > > > > > > > combine to overlay. > > > > > > > > > > Now I'm presented with GIF images (the ones the JPEG is put on top > > of) > > > > > that have colors or other background attributes we want to 'show > > > > through' > > > > > the overlay where there is no image. > > > > > > > > > > Even without any transparency options this seems to ALMOST work. > > The > > > > > problem is that there's a small area around each image of 'white' > > that > > > > > always > > > > > shows up. Trying transparency or the 'matte' option of '-draw' > > seems > > > to > > > > > have > > > > > no effect. > > > > > > > > > > Any ideas? I'm an engineer -- not an image expert. The images in > > > > > question > > > > > are handed to me. I can change them if necessary and if it can be > > > done > > > > > via > > > > > the ImageMagick tool. The volume we generate makes manual changes > > to > > > > > each image out of the question. > > > > > > > > > > ---- > > > > > Steve Sapovits > > > > > Global Sports Interactive > > > > > Work Email: sapovitss@globalsportsinc.com > > > > > Home Email: steves@delanet.com > > > > > Work Phone: 610-491-7087 > > > > > Cell: 610-574-7706 > > > > > Pager: 877-239-4003 > > > > > > > > > > > > > > > > > > > *********************************************************************** > > > > > To remove yourself from this mailing list, send mail to: > > > > > majordomo@wizards.dupont.com > > > > > > > > > > Include the following command in the body of your message: > > > > > unsubscribe magick > > > > > > > > > *********************************************************************** > > > > > > > > > > *********************************************************************** > > > > To remove yourself from this mailing list, send mail to: > > > > majordomo@wizards.dupont.com > > > > > > > > Include the following command in the body of your message: > > > > unsubscribe magick > > > > > > *********************************************************************** > << > > File: MCS_C_11452.gif >> << File: MCS_C_120x150.gif >> << File: > > result.gif >> > > *********************************************************************** > To remove yourself from this mailing list, send mail to: > majordomo@wizards.dupont.com > > Include the following command in the body of your message: > unsubscribe magick > *********************************************************************** *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From markov Sun Aug 8 10:04:17 1999 Subject: Resize with Transparency To: magick@wizards.dupont.com Date: Sun, 8 Aug 1999 10:04:17 +0200 (MET DST) Reply-To: markov@ATComputing.nl (Mark Overmeer) X-Mailer: ELM [version 2.4 PL21] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Status: RO Content-Length: 1376 Lines: 37 Hi, Maybe someone knows a solution, maybe for enhancement: I have an image (say black on white), where white is set to be transparent. I can display the image on any background, without seeing white. Now I resize the image with anti-aliasing. For that, we have to intermediate pixels, which also requires interpolating the black pixels and background pixels. But: I my case, the background has a different (but known) color every time i.e. need to anti-alias the same image to different backgrounds. I would like to write: my $image->Read('original.gif'); $image->Set(background => 'blue'); $image->Scale('50%x50%'); $image->Write('small.gif'); However, ImageMagick (ImageMagick 4.2.7, PerlMagick 4.27 on Linux) takes as value for a transparent pixel not the value of `background', but the color used to define a transparent color: in this case `white'. My image reduced as above shows white pixels on my blue background. Is my expectation wrong? Does anyone know a work-around? -- Thanks, Mark Overmeer %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From magick-owner@unca-don.wizards.dupont.com Thu Mar 30 19:09 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id TAA14579 for ; Thu, 30 Mar 2000 19:09:10 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id TAA31447 for ; Thu, 30 Mar 2000 19:09:10 +0200 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma031440; Thu, 30 Mar 00 19:08:51 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id MAA10121; Thu, 30 Mar 2000 12:04:52 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id LAA03360 for magick-outgoing; Thu, 30 Mar 2000 11:44:20 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <8100014B48DAD111AA4100805F9F3FC903A0E75D@host60.corbis.com> From: Bill Radcliffe To: "'Ivo'" , magick@wizards.dupont.com, tiff@olympiakos.com Subject: RE: jpeg2000 question Date: Thu, 30 Mar 2000 08:46:50 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Bill Radcliffe Content-Type: text/plain Status: RO Content-Length: 2759 Lines: 66 I worked on the definition of the JP2 file format. The situation with JPEG2000 is not at all like JPEG. You should know is that JP2 is a very simple wrapper around the formal JPEG2000 "codestream". It was based on the Quicktime idea of "atoms". This simple idea is that you have a tag and a length followed by the "stuff". You know what the "stuff" is based on the tag type. You can also nest these atoms to build more complex structures. JP2 is a very simple set of these atoms, most of which are optional. You could write a program to implement this in about 15 minutes. The "hard" part of JP2 is the "codestream". This is the encoded JPEG2000 data. Good luck on that. We don't have a freely available reference implementation at this point because nobody has signed up to do it. There was an effort underway by the same group that did the JPEG-LS implementation. This was given to the public domain.. http://spmg.ece.ubc.ca/research/jpeg/jpeg_ls/jpegls.html They actually had an implementation of JPEG2000 on their website but pulled it off: http://www.ece.ubc.ca/~mdadams/jasper/ Apparently, they decided to sell out and try to charge for it instead of providing it to the public domain. We all know how well that is going to work. When are people going to learn that you can't make money selling compression software? It's not a business - its just an enabler. My opinion is that without a "Tom Lane" type signing up to make a free implementation available, JPEG2000 is doomed. You just don't get real interoperability from a paper spec. We know this. The good news is that the Digital Imaging Group (DIG) has a project underway to do this. The bad news is that it has not yet started. And so we wait :-) > -----Original Message----- > From: Ivo [SMTP:ivo.penzar@infolink-software.com] > Sent: Thursday, March 30, 2000 1:37 AM > To: magick@wizards.dupont.com; tiff@olympiakos.com > Subject: jpeg2000 question > > Does anybody know of some repository of jp2 (jpeg2000, to be approved by > ISO/ITU-T by the end of this year) and/or a tool to write (some sort of) > those images. > > Thanks, > Ivo > > > > *********************************************************************** > To remove yourself from this mailing list, send mail to: > majordomo@wizards.dupont.com > > Include the following command in the body of your message: > unsubscribe magick > *********************************************************************** *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From markov@ATComputing.nl Fri Mar 31 17:01:17 2000 Date: Fri, 31 Mar 2000 17:01:17 +0200 From: Mark Overmeer To: Carl Knoos Cc: magick@wizards.dupont.com Subject: Re: Problem resizing images through perl script Message-ID: <20000331170117.B2095@atcmpg.ATComputing.nl> References: <10F4E7B8292FD311B34400A0C978B70532A61B@a254.117.208.207.ded23.interaccess.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: ; from cknoos@atg.com on Thu, Mar 30, 2000 at 06:27:54PM -0500 Status: RO Content-Length: 820 Lines: 23 * Carl Knoos (cknoos@atg.com) [000331 01:39]: > if I run mogrify -geometry 95x95 whatever.jpg > I get exactly what I want, except when I try > to do it from Perl... > # resize it. > $result="$mogrifypath/mogrify -geometry 96x96 > $GalleryPath/tn_$ShortFilename"; I assume you try to execute this code: use back-tics: $result=`$mogrifypath/mogrify -geometry 96x96 $GalleryPath/tn_$ShortFilename`; or better qx(...) Is it just a slip of pen here, or just usual programmers-blindness? -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From magick-owner@unca-don.wizards.dupont.com Fri Mar 31 01:39 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id BAA16135 for ; Fri, 31 Mar 2000 01:39:18 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id BAA31743 for ; Fri, 31 Mar 2000 01:39:18 +0200 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma031741; Fri, 31 Mar 00 01:39:12 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id SAA08310; Thu, 30 Mar 2000 18:37:29 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id SAA05154 for magick-outgoing; Thu, 30 Mar 2000 18:24:04 -0500 (EST) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f From: "Carl Knoos" To: Subject: Problem resizing images through perl script Date: Thu, 30 Mar 2000 18:27:54 -0500 Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <10F4E7B8292FD311B34400A0C978B70532A61B@a254.117.208.207.ded23.interaccess.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: "Carl Knoos" Content-Type: text/plain; charset="iso-8859-1" Status: RO X-Status: A Content-Length: 1270 Lines: 47 I know this probably doesn't belong here, but I don't who else to ask :) Basically, I have imagemagick installed and it works like a charm! if I run mogrify -geometry 95x95 whatever.jpg I get exactly what I want, except when I try to do it from Perl... If I in a perl script say: sub GenerateThumb { $fsize = -s "$GalleryPath/$ShortFilename"; if ($thumbmethod == 1) { # copy image. open(IMGFILE, "$GalleryPath/$ShortFilename"); open(TNFILE, ">$GalleryPath/tn_$ShortFilename"); binmode(IMGFILE); binmode(TNFILE); read(IMGFILE, $buffer, $fsize); print TNFILE $buffer; close(TNFILE); close(IMGFILE); chmod (0777, "$GalleryPath/tn_$ShortFilename"); # resize it. $result="$mogrifypath/mogrify -geometry 96x96 $GalleryPath/tn_$ShortFilename"; } } It all works great until it comes to the resizing, it just seem to skip the last step. the variable $mogrifypath is set correctly to /usr/bin Does anyone what I'm doing wrong? /Carl *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Fri Mar 31 02:25 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id CAA16260 for ; Fri, 31 Mar 2000 02:25:19 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id CAA31781 for ; Fri, 31 Mar 2000 02:25:19 +0200 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma031779; Fri, 31 Mar 00 02:25:12 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id TAA21824; Thu, 30 Mar 2000 19:23:29 -0500 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id TAA05326 for magick-outgoing; Thu, 30 Mar 2000 19:16:20 -0500 (EST) <10F4E7B8292FD311B34400A0C978B70532A61B@a254.117.208.207.ded23. interaccess.com> X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Mime-Version: 1.0 X-Sender: leonardr@mail1.netreach.net Message-Id: In-Reply-To: <10F4E7B8292FD311B34400A0C978B70532A61B@a254.117.208.207.ded23.interaccess.com> References: <10F4E7B8292FD311B34400A0C978B70532A61B@a254.117.208.207.ded23.interaccess.com> Date: Thu, 30 Mar 2000 19:15:48 -0500 To: Joseph Korabelnikov magick@wizards.dupont.com From: Leonard Rosenthol Subject: Re: Convert HTM, HTML files to the .jpg format X-MIME-Autoconverted: from quoted-printable to 8bit by unca-don.wizards.dupont.com id TAA05323 Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Leonard Rosenthol X-MIME-Autoconverted: from 8bit to quoted-printable by mustang.oldcity.dca.net id TAA21824 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by atcmpg.ATComputing.nl id CAA16260 Content-Type: text/plain; charset="iso-8859-1" ; format="flowed" Status: RO Content-Length: 1198 Lines: 33 At 4:12 PM -0600 3/30/00, Joseph Korabelnikov wrote: >I attempted to convert HTML file to the .jpg format from Command Prompt >window and got an error : > > convert: delegate failed (html2ps -o %o %i). > convert: no delegate for this image format (HTML). > >As I understood situation I need to install mgtl2ps library. Am I right. If >so, where to get it? > You can find it at . LDR -- ---------------------------------------------------------------------------- You've got a SmartFriend in Pennsylvania ---------------------------------------------------------------------------- Leonard Rosenthol Internet: leonardr@lazerware.com America Online: MACgician Web Site: FTP Site: PGP Fingerprint: C76E 0497 C459 182D 0C6B AB6B CA10 B4DF 8067 5E65 *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From markov@ATComputing.nl Mon Apr 3 08:25:55 2000 Date: Mon, 3 Apr 2000 08:25:55 +0200 From: Mark Overmeer To: Carl Knoos Subject: Re: Problem resizing images through perl script Message-ID: <20000403082555.B11537@atcmpg.ATComputing.nl> References: <20000331170117.B2095@atcmpg.ATComputing.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: ; from cknoos@atg.com on Sat, Apr 01, 2000 at 03:40:32PM -0500 Status: RO Content-Length: 1046 Lines: 23 * Carl Knoos (cknoos@atg.com) [000401 22:42]: > ld.so.1: /usr/local/bin/mogrify: fatal: libttf.so.2: open failed: No such > file or directory Typical for installing ImageMagick binaries: they are precompiled on a system with a long list of shared-libs. IM is very powerful, so there are many libs. While starting, the libs are contacted. Search for a libttf.so : you may not have it, have the wrong version or just a lacking link. ttf = True Type Fonts, and the lib is available at freetype.org. > I've asked the company that I rent space from to install > PerlMagick on the box, hopefully I won't have all these > problems if they do. Compatibility between all those libs and apps will continue to haunt us. -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From cknoos@atg.com Sat Apr 1 22:42 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id WAA04105 for ; Sat, 1 Apr 2000 22:42:15 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id WAA01429 for ; Sat, 1 Apr 2000 22:42:14 +0200 Received: from art.atg.com(205.181.94.1) by ns.ATComputing.nl via smap (V2.1) id xma001427; Sat, 1 Apr 00 22:42:05 +0200 Received: from donkeykong (donkey-kong.atg.com [205.181.107.218]) by art.atg.com (8.9.1/8.9.1) with SMTP id PAA24854 for ; Sat, 1 Apr 2000 15:42:29 -0500 (EST) From: "Carl Knoos" To: "Mark Overmeer" Subject: RE: Problem resizing images through perl script Date: Sat, 1 Apr 2000 15:40:32 -0500 Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Importance: Normal In-Reply-To: <20000331170117.B2095@atcmpg.ATComputing.nl> Content-Type: text/plain; charset="iso-8859-1" Status: RO X-Status: A Content-Length: 1865 Lines: 63 Blindness :) Now I'm on to the next problem though... when I try to execute the line from the script, my webservers error log contains this: ld.so.1: /usr/local/bin/mogrify: fatal: libttf.so.2: open failed: No such file or directory I'm seriously starting to get ticked now... hehe :) I've asked the company that I rent space from to install PerlMagick on the box, hopefully I won't have all these problems if they do. Thanks for your help! :) /Carl -----Original Message----- From: owner-magick@wizards.dupont.com [mailto:owner-magick@wizards.dupont.com]On Behalf Of Mark Overmeer Sent: Friday, March 31, 2000 10:01 AM To: Carl Knoos Cc: magick@wizards.dupont.com Subject: Re: Problem resizing images through perl script * Carl Knoos (cknoos@atg.com) [000331 01:39]: > if I run mogrify -geometry 95x95 whatever.jpg > I get exactly what I want, except when I try > to do it from Perl... > # resize it. > $result="$mogrifypath/mogrify -geometry 96x96 > $GalleryPath/tn_$ShortFilename"; I assume you try to execute this code: use back-tics: $result=`$mogrifypath/mogrify -geometry 96x96 $GalleryPath/tn_$ShortFilename`; or better qx(...) Is it just a slip of pen here, or just usual programmers-blindness? -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From markov@ATComputing.nl Tue May 9 15:14:18 2000 Date: Tue, 9 May 2000 15:14:18 +0200 From: Mark Overmeer To: Pletschette Andre Subject: Re: Undefined Symbol: SetWarningHandler Message-ID: <20000509151418.B15139@atcmpg.ATComputing.nl> References: <3917FC90.8B8B0CF@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <3917FC90.8B8B0CF@gmx.net>; from andre.pletschette@gmx.net on Tue, May 09, 2000 at 01:54:56PM +0200 Status: RO Content-Length: 1095 Lines: 25 * Pletschette Andre (andre.pletschette@gmx.net) [000509 15:11]: > When I tried to write a perl script with the following line in it: > use Image::Magick; > I get the following error-message: > > perl: error in loading shared librairies: > /usr/lib/perl5/site_perl/5.005/i586-lin > ux/auto/Image/Magick/Magick.so: undefined symbol: SetWarningHandler > > Could anybody tell me what this means, and how I can get it run, I run > Suse Linux 6.3 and I've installed Image Magick with the C++ and the Perl > Modules. The Perl::Magick and Image::Magick/ImageMagick modules are not compatible. Just reinstall all yourself from www.ImageMagick.org. Be warned: you have to remove the old Perl::Magick *.pm files too, otherwise you may still use the old versions... -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From magick-owner@unca-don.wizards.dupont.com Tue May 9 15:11 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id PAA15311 for ; Tue, 9 May 2000 15:11:14 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id PAA24539 for ; Tue, 9 May 2000 15:11:13 +0200 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma024537; Tue, 9 May 00 15:11:01 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id JAA17934; Tue, 9 May 2000 09:09:29 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id IAA13522 for magick-outgoing; Tue, 9 May 2000 08:42:00 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <3917FC90.8B8B0CF@gmx.net> Date: Tue, 09 May 2000 13:54:56 +0200 From: Pletschette Andre X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.13 i586) X-Accept-Language: fr, en, de MIME-Version: 1.0 To: "magick@wizards.dupont.com" Subject: Undefined Symbol: SetWarningHandler Content-Transfer-Encoding: 7bit Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Pletschette Andre Content-Type: text/plain; charset=us-ascii Status: RO X-Status: A Content-Length: 747 Lines: 19 When I tried to write a perl script with the following line in it: use Image::Magick; I get the following error-message: perl: error in loading shared librairies: /usr/lib/perl5/site_perl/5.005/i586-lin ux/auto/Image/Magick/Magick.so: undefined symbol: SetWarningHandler Could anybody tell me what this means, and how I can get it run, I run Suse Linux 6.3 and I've installed Image Magick with the C++ and the Perl Modules. *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Wed May 17 16:07 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id QAA15770 for ; Wed, 17 May 2000 16:07:07 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id QAA04359 for ; Wed, 17 May 2000 16:07:06 +0200 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma004357; Wed, 17 May 00 16:06:40 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id KAA02079; Wed, 17 May 2000 10:05:01 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id JAA23880 for magick-outgoing; Wed, 17 May 2000 09:41:41 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Date: Wed, 17 May 2000 08:46:17 -0500 (CDT) From: Bob Friesenhahn X-Sender: bfriesen@scooby.simplesystems.org To: Martin Bobrovsky cc: ImageMagick Mailing List Subject: Re: watermarks/embossing In-Reply-To: <4.3.1.2.20000517112416.00c72e30@mail.dot.at> Message-ID: MIME-Version: 1.0 Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Bob Friesenhahn Content-Type: TEXT/PLAIN; charset=US-ASCII Status: RO Content-Length: 1859 Lines: 53 If you can afford the Digimarc library (see http://www.digimarc.com/licensing/sdk.html & http://www.digimarc.com/news/pr00-13.html), Bill Radcliffe can send you source for an ImageMagick module to do professional-grade watermarking. ImageMagick's 'combine' utility supports simplistic hidden watermarking via its -stegano option. If you want a visible logo, you could use -compose to compose your logo on top of, or blended with, the base image. Your visible logo can be mostly transparent in order to not disturb the image too much. See this interesting article about digital watermarking: http://www.spie.org/web/oer/november/nov99/cover1.html Bob On Wed, 17 May 2000, Martin Bobrovsky wrote: > Hi! > > Can someone tell how I achieve the effect of embossing a text onto an > image? My intention is to "secure" images on the web by applying a symbol > or text which on the one hand does not affect the impression of the image > too much, but on the other hand, makes the image "unusable" for > professional printing purposes ... > > thanks, > martin > > > *********************************************************************** > To remove yourself from this mailing list, send mail to: > majordomo@wizards.dupont.com > > Include the following command in the body of your message: > unsubscribe magick > *********************************************************************** > ====================================== Bob Friesenhahn bfriesen@simple.dallas.tx.us http://www.simplesystems.org/users/bfriesen *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-bugs@simple.dallas.tx.us Wed Jun 14 16:54 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id QAA25632 for ; Wed, 14 Jun 2000 16:54:28 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id QAA12167 for ; Wed, 14 Jun 2000 16:54:27 +0200 Received: from ns.simplesystems.org(204.252.75.242) by ns.ATComputing.nl via smap (V2.1) id xma012165; Wed, 14 Jun 00 16:54:12 +0200 Received: from localhost (localhost [127.0.0.1]) by ns.simplesystems.org (8.9.3/8.9.3) with ESMTP id JAA14556 for ; Wed, 14 Jun 2000 09:54:08 -0500 (CDT) From: magick-bugs@simple.dallas.tx.us Date: Wed, 14 Jun 2000 09:54:08 -0500 (CDT) Message-Id: <200006141454.JAA14556@ns.simplesystems.org> To: markov@ATComputing.nl Subject: Re: Annotate problems (PR#298) X-Loop: magick-bugs@simple.dallas.tx.us Content-Type: text Status: RO X-Status: A Content-Length: 307 Lines: 9 Thank you for submitting an ImageMagick bug report to magick-bugs@simplesystems.org. Your bug report is available on the web at the URL http://www.simplesystems.org/ImageMagick/bugs?findid=298 Report any problems with the bug tracking system itself to Bob Friesenhahn . From markov@ATComputing.nl Wed Jun 14 17:43:34 2000 Date: Wed, 14 Jun 2000 17:43:34 +0200 From: Mark Overmeer To: Cristy Subject: Re: your mail Message-ID: <20000614174334.G22766@atcmpg.ATComputing.nl> References: <8172.960997992@mystic> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <8172.960997992@mystic>; from cristy@mystic.es.dupont.com on Wed, Jun 14, 2000 at 11:53:11AM -0400 Status: RO X-Status: A Content-Length: 1403 Lines: 34 * Cristy (cristy@mystic.es.dupont.com) [000614 17:23]: > $img->Read("logo:"); > $text="I am a LumberJack"; > $poinsize=40; > my ($width, $height) = $img->Get('width', 'height'); > $img->Annotate > ( fill => 'yellow' > , text => $text > , font => > '-bitstream-charter-medium-r-normal--40-0-0-0-p-0-iso8859-1' > , gravity => 'SouthEast' > , 'x' => 5 > , 'y' => $poinsize+5 > ); > $img->Write(filename => "test.gif"); So: gravity work differently from my well known "anchor", where x,y defines a point and anchor the location of the point wrt the item to be put on the background. It was not clear from the docs. It what you propose a feature or a designed thing? You specify the coordinate of the right-top (NorthEast) wrt to the right-bottom (SouthEast). I expect that x=0,y=0,SouthWest will work wrt to NorthWest. It is not logical for me to treat North/South differently from East/West (designed before the fall of the Iron curtain?) And also: the text still appears in black. -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From cristy@mystic.es.dupont.com Wed Jun 14 17:23 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id RAA27207 for ; Wed, 14 Jun 2000 17:23:28 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id RAA12199 for ; Wed, 14 Jun 2000 17:23:27 +0200 Received: from gatekeeper.es.dupont.com(192.26.233.2) by ns.ATComputing.nl via smap (V2.1) id xma012197; Wed, 14 Jun 00 17:23:08 +0200 Received: from mystic.es.dupont.com (mystic.es.dupont.com [138.196.253.24]) by gatekeeper.es.dupont.com (8.9.3/8.9.3) with ESMTP id LAA26619 for ; Wed, 14 Jun 2000 11:23:06 -0400 (EDT) Received: (from cristy@localhost) by mystic.es.dupont.com (8.10.0.Beta12/8.10.0.Beta12) id e5EFrBI08173 for markov@ATComputing.nl; Wed, 14 Jun 2000 11:53:11 -0400 (EDT) Date: Wed, 14 Jun 2000 11:53:11 -0400 (EDT) From: Cristy Message-ID: <8172.960997992@mystic> Mime-Version: 1.0 To: markov@ATComputing.nl Content-Type: multipart/mixed; boundary="-" Status: RO X-Status: A Content-Length: 1042 Lines: 21 This is a MIME encoded message. Decode it with "munpack" or any other MIME reading software. Mpack/munpack is available via anonymous FTP in ftp.andrew.cmu.edu:pub/mpack/ --- Content-Type: application/octet-stream; name="test.pl" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="test.pl" Content-MD5: el1GVGE1xEpFTeim4lKdYA== ICAgdXNlIEltYWdlOjpNYWdpY2s7CiAgICRpbWc9SW1hZ2U6Ok1hZ2ljay0+bmV3OwogICAk aW1nLT5SZWFkKCJsb2dvOiIpOwogICAkdGV4dD0iSSBhbSBhIEx1bWJlckphY2siOwogICAk cG9pbnNpemU9NDA7CiAgIG15ICgkd2lkdGgsICRoZWlnaHQpID0gJGltZy0+R2V0KCd3aWR0 aCcsICdoZWlnaHQnKTsKICAgJGltZy0+QW5ub3RhdGUKICAgICAgKCBmaWxsICAgID0+ICd5 ZWxsb3cnCiAgICAgICwgdGV4dCAgICAgID0+ICR0ZXh0CiAgICAgICwgZm9udCAgICAgID0+ CictYml0c3RyZWFtLWNoYXJ0ZXItbWVkaXVtLXItbm9ybWFsLS00MC0wLTAtMC1wLTAtaXNv ODg1OS0xJwogICAgICAsIHBvaW50c2l6ZSA9PiAkcG9pbnNpemUKICAgICAgLCBncmF2aXR5 ICAgPT4gJ1NvdXRoRWFzdCcKICAgICAgLCAneCcgICAgICAgPT4gNQogICAgICAsICd5JyAg ICAgICA9PiAkcG9pbnNpemUrNQogICAgICApOwogICAkaW1nLT5Xcml0ZShmaWxlbmFtZSAg PT4gInRlc3QuZ2lmIik7Cgo= ----- From markov@ATComputing.nl Wed Jun 14 17:49:26 2000 Date: Wed, 14 Jun 2000 17:49:26 +0200 From: Mark Overmeer To: Cristy Subject: Re: your mail Message-ID: <20000614174926.H22766@atcmpg.ATComputing.nl> References: <200006141616.e5EGG3x19487@mystic.es.dupont.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <200006141616.e5EGG3x19487@mystic.es.dupont.com>; from cristy@mystic.es.dupont.com on Wed, Jun 14, 2000 at 12:16:03PM -0400 Status: RO Content-Length: 686 Lines: 17 * Cristy (cristy@mystic.es.dupont.com) [000614 17:46]: > > It was not clear from the docs. > > There is alot that is not clear in the docs. We're writing a book due > out next year to fix these sorts of problems. I'll certainly buy the book. But: will you also respond to the two remaining quesions from my previous mail? -- Thanks for the fast response, MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From cristy@mystic.es.dupont.com Wed Jun 14 17:46 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id RAA27475 for ; Wed, 14 Jun 2000 17:46:29 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id RAA12244 for ; Wed, 14 Jun 2000 17:46:28 +0200 Received: from gatekeeper.es.dupont.com(192.26.233.2) by ns.ATComputing.nl via smap (V2.1) id xma012242; Wed, 14 Jun 00 17:45:59 +0200 Received: from mystic.es.dupont.com (mystic.es.dupont.com [138.196.253.24]) by gatekeeper.es.dupont.com (8.9.3/8.9.3) with ESMTP id LAA26733 for ; Wed, 14 Jun 2000 11:45:58 -0400 (EDT) Received: (from cristy@localhost) by mystic.es.dupont.com (8.10.0.Beta12/8.10.0.Beta12) id e5EGG3x19487 for markov@ATComputing.nl; Wed, 14 Jun 2000 12:16:03 -0400 (EDT) Date: Wed, 14 Jun 2000 12:16:03 -0400 (EDT) From: Cristy Message-Id: <200006141616.e5EGG3x19487@mystic.es.dupont.com> To: markov@ATComputing.nl Subject: Re: your mail Content-Type: text Status: RO X-Status: A Content-Length: 152 Lines: 4 > It was not clear from the docs. There is alot that is not clear in the docs. We're writing a book due out next year to fix these sorts of problems. From cristy@mystic.es.dupont.com Wed Jun 14 17:56 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id RAA27517 for ; Wed, 14 Jun 2000 17:55:59 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id RAA12254 for ; Wed, 14 Jun 2000 17:55:58 +0200 Received: from gatekeeper.es.dupont.com(192.26.233.2) by ns.ATComputing.nl via smap (V2.1) id xma012252; Wed, 14 Jun 00 17:55:29 +0200 Received: from mystic.es.dupont.com (mystic.es.dupont.com [138.196.253.24]) by gatekeeper.es.dupont.com (8.9.3/8.9.3) with ESMTP id LAA26777 for ; Wed, 14 Jun 2000 11:55:28 -0400 (EDT) Received: (from cristy@localhost) by mystic.es.dupont.com (8.10.0.Beta12/8.10.0.Beta12) id e5EGPYM19527 for markov@ATComputing.nl; Wed, 14 Jun 2000 12:25:34 -0400 (EDT) Date: Wed, 14 Jun 2000 12:25:34 -0400 (EDT) From: Cristy Message-Id: <200006141625.e5EGPYM19527@mystic.es.dupont.com> To: markov@ATComputing.nl Subject: Re: your mail Content-Type: text Status: RO Content-Length: 189 Lines: 5 > But: will you also respond to the two > remaining quesions from my previous mail? Sure if you remind me what they are. I get upwards of 100+ e-mails a day so it's hard to keep track... From markov@ATComputing.nl Wed Jun 14 18:00:18 2000 Date: Wed, 14 Jun 2000 18:00:18 +0200 From: Mark Overmeer To: Cristy Subject: Re: your mail Message-ID: <20000614180018.I22766@atcmpg.ATComputing.nl> References: <8172.960997992@mystic> <20000614174334.G22766@atcmpg.ATComputing.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <20000614174334.G22766@atcmpg.ATComputing.nl>; from markov@ATComputing.nl on Wed, Jun 14, 2000 at 05:43:34PM +0200 Status: RO Content-Length: 1972 Lines: 47 >> But: will you also respond to the two >> remaining quesions from my previous mail? >Sure if you remind me what they are. I get upwards of 100+ e-mails a day >so it's hard to keep track... You replied just a few seconds earlier on my message below. I replied in a few seconds to it... but I understand you have to scan mail that fast. (I maintain 6 websites, so know getting large amounts of e-mail means) Thanks for the example anyway. * Mark Overmeer (markov@ATComputing.nl) [000614 17:43]: > * Cristy (cristy@mystic.es.dupont.com) [000614 17:23]: > > $img->Read("logo:"); > > $text="I am a LumberJack"; > > $poinsize=40; > > my ($width, $height) = $img->Get('width', 'height'); > > $img->Annotate > > ( fill => 'yellow' > > , text => $text > > , font => > > '-bitstream-charter-medium-r-normal--40-0-0-0-p-0-iso8859-1' > > , gravity => 'SouthEast' > > , 'x' => 5 > > , 'y' => $poinsize+5 > > ); > > $img->Write(filename => "test.gif"); > > So: gravity work differently from my well known "anchor", where > x,y defines a point and anchor the location of the point wrt the > item to be put on the background. It was not clear from the docs. > > It what you propose a feature or a designed thing? You specify the > coordinate of the right-top (NorthEast) wrt to the right-bottom > (SouthEast). I expect that x=0,y=0,SouthWest will work wrt to > NorthWest. It is not logical for me to treat North/South differently > from East/West (designed before the fall of the Iron curtain?) > > And also: the text still appears in black. > -- > MarkOv %-] > > ------------------------------------------------------------------------ > drs Mark A.C.J. Overmeer markov@ATComputing.nl > AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl > http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From markov@ATComputing.nl Wed Jun 14 18:17:41 2000 Date: Wed, 14 Jun 2000 18:17:41 +0200 From: Mark Overmeer To: Cristy Subject: Re: your mail Message-ID: <20000614181741.J22766@atcmpg.ATComputing.nl> References: <200006141634.e5EGYfI19547@mystic.es.dupont.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="5vNYLRcllDrimb99" X-Mailer: Mutt 1.0pre4i In-Reply-To: <200006141634.e5EGYfI19547@mystic.es.dupont.com>; from cristy@mystic.es.dupont.com on Wed, Jun 14, 2000 at 12:34:41PM -0400 Status: RO Content-Length: 4505 Lines: 82 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii * Cristy (cristy@mystic.es.dupont.com) [000614 18:05]: > > It what you propose a feature or a designed thing? You specify the > > coordinate of the right-top (NorthEast) wrt to the right-bottom > > (SouthEast). I expect that x=0,y=0,SouthWest will work wrt to > > NorthWest. It is not logical for me to treat North/South differently > > from East/West (designed before the fall of the Iron curtain?) > > I'll send you a script that illustrates how gravity works. The x,y > offset basically creates a bounding box within the image and the text > is placed relative to the virtual bounding box. As you can see in your own demo script, it is not consequent: W and E are inside the square, while N and S are outside... in my run. Image attached. I changed the line-color you yellow (stroke) which worked, but it still does not work for the text. > Are you using ImageMagick 5.2.0? When I used the script I sent the > text color was indeed yellow. The latest 5.2.0 (less than 48 hours ago directly from imagemagick.org). Sorry, no more time to investigate for me today: have to go... -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl --5vNYLRcllDrimb99 Content-Type: image/gif Content-Disposition: attachment; filename="test.gif" Content-Transfer-Encoding: base64 R0lGODlhkAGQAfECAP///wAAAP//AAAAACH5BAAAAAAALAAAAACQAZABAAL+hI+py+0Po5y0 2ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8YhMKpfMpvMJjUqn1Kr1is1q t9yu9wsOi8fksvmMTqvX7Lb7DY/L5/S6/Y7P6/f8vv8PGCg4SFhoeIiYqLjI2Oj4CBkpOUlZ aXmJmam5ydnp+QkaKjpKWmp6ipqqusra6voKGys7S1tre4ubq7vL2+v7CxwsPExcbHyMnKy8 zNzs/AwdLT1NXW19jZ2tvc3d7f0NHi4+Tl5ufo6err7O3u7+Dh8vP09fb3+Pn6+/z9/v/w8w oMCBBAsaPIgwocIgARo2VOAwokQAEh8eiLhiYoL+ijI0IqgIkmM6jx8DXHRY0iRElRkxrqxB 8mTKl+pcbmRJ0eJJnAZ4qrBZ0gZQmUEhrouZ8+ZNnz5TINU54ylPqBePmkRZdKfSrCweYiVK wyvVsU3ZWfyadOZOnGVRnIVKNcZbtlOZmmUJlylduDB05hWKl+5WsCMDB16JN63iFn4bA9ba sy7Iu2rjYhWrsq3bvZEfQyY7WFtIm2SvNkWZ+Szi0RBGfy2t2HVcCbIPzwS9MSXrbZZNL/A4 lLHexR2H4/5IefVvtMG7nkZbfPlxeLOb55QcXTnM59ORF2YAHTLhF7Ove0Yc2ju22uzbu38P P778+fTrt1+meW35tqf+5WoUkFtUSPUUWW204XcGgGbkBwyDWyhYhoO+SJgFhGRQyAuGV1g4 hoa6eFgFh2KAiAuJU4gYhom2qBgFimCwSAuMT7j4hYyy2NgEjV7gCAuPS+jYhY+uCJkEkFwQ yQqSRxi5hZKqOFkEk1pAiQqVQ0iZhZWmaBkEllhwSQqYP3h5hZiimNkDmVagCQqbO6hZhZue yJkDnFTQyQmeN9g5hZ6a+FkDn1IAigmhMwgahaGWKBoDolAwSgmkLzj6hKSSWNoCpU5gCgmn K2jahKeOiJoCqEyQygiqJ5i6hKqKuFoCq0rAigitI8iahK2G6BoCrkjwSgiwH/h6hLCCGNv+ AbFGIAsIsxsoW4SzfkibAbREUMsHthdYO4S2enhbAbdCgIsHuROIyxCCZqALhLl2uBsBuz/A Swe9D8jrg71y6NsAvj3wCwfAC/jLg8BuGJwAwTsgzAbDByisg8NqSAwAxDlQjAbFFuOA8Rka e6xuGRvf0PGCCYKszMcmp3zyysmoHGHIZIwslMxj0AyTzWLgHJbOYfAclc9gAN2R0F8QLZfR XiDdl9JdME2e01xA7ULJMa+L8sstX6011i4jA/OFUj+YNdhbi82y11ybrTbaXYtc9jFhdzi2 FlQzVneFcRsz94h5Y3F3V39vuHcxfac4uBWBZ5R4iIUTc/iLjVP+sfhPk5/4+DCR13i5FJU7 1XmLmQuz+Y6hQ/G5W6fPOHowpQe5uhOpn2C12zO33mAEHE22FkOTucregWm3xlx1nGKkoHXt 9ib828RjF2C+OllYnu+/Nc82bdCr9y9OHNpaHfZyUwBddxFD9X2uKtZO9wTF8zUvT7M7YJn7 +AmAf/76749/Q/pH9D/+CXCABCygAQnovwMqcIEMbGABE5g/CB6QfX4jn19iczz5VSok9hue 9lJjHopYDwHza4D5TIgfAy1FhCGUzG5AoEKquEiFTpENVwhUINckDjjhKRj6NmgU8fHNAkBR 3sV+uKn1Na581TsfS0oInrI4iIKII+L+Cbv3xOgtS4q6m9xwroUSCDVxeehpjRevt8UBjSt4 ZvTgzXD3i9cdKXY5guOEztY+573xa+NrWx6zdzs+DtGPFdTjzuzYCzk2iY5MgOIIqCg5QlbR kD9DZIbwWEhA7nFtfYSbIA2HyUlq8pCfhFwoI0nJoVlyF4qcEiN/tMoPnZJzbiQlJwfpyVuC UpKoHGUlS6m5WZqulr/UpSl5SctUHi2WuWhlll6pBEeKAJLJDKQxg4nMYSpzacwskTBhR0xV ApN035xjOJc5TteVc5Hn5GY6c5dNcG7zad28hTO/BM0i1XNF63RlO+n5zjj285n/nNo+a3HP MuUTCdIMATX+tWlN23Uyon+c6CYlikuKZtKitsToLnPp0WOCtKIZvShJP6pRUXK0mCHF5kg3 WtKOnlSkKe3lSsV5TXLG05zzNGhA77hTdvaUbD9N5EDxWVCi5lSdQfXnUO120BgdVaFJhWpR L9lUgj5Vb1dl5VTXtNAlRXUWCQVrVbm6VHi+VKUxZelMXVrTat4UnWkVaFaRulXAjfVGX41T WI3QUBim0D6ELaxhD4vYxMJnIYwNEu92J5IchoV3C3ssDdHxmsbk5TmTNYwPPSue8ZhjOky0 y2TTQ7K6oJaF39EiccKjp/pVNoiiZS1mSdudMf7kigJSbW3v0sT3sQUwut1OcE3+a5Xj6oZ7 vfWU8nhbDjW+BoMcMyJxjUdZ4GK3M5dxYnGb+8XfVuOyy0VPajKzGg5WgLy9y6F6OcBeyd7Q tvHlDWxJ08PUfre5831oH7ijHfnmrIwck858zRJFA6tlwDQp8HIObNvocpbAnUntg4944QrT 9hybReFqs1MgHy5Yw6EdbXY3XJXqRta7+K1vY18M4xjLeMY0rrGNb4zjHOt4xzzusY9/DOQg C3nIRC6ykY+M5CQreclMbrKTnwzlKEt5ylSuspWvjOUsa3nLXO6yl78M5jCLecxkLrOZz4zm NKt5zWxus5vfDOc4y3nOdK6zne+M5zzrec987rOf/wwg6EALetCELrShD43oRCt60YxutKMf DelIS3rSlF50AQAAOw== --5vNYLRcllDrimb99-- From cristy@mystic.es.dupont.com Wed Jun 14 18:05 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id SAA28005 for ; Wed, 14 Jun 2000 18:04:59 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id SAA12271 for ; Wed, 14 Jun 2000 18:04:58 +0200 Received: from gatekeeper.es.dupont.com(192.26.233.2) by ns.ATComputing.nl via smap (V2.1) id xma012267; Wed, 14 Jun 00 18:04:36 +0200 Received: from mystic.es.dupont.com (mystic.es.dupont.com [138.196.253.24]) by gatekeeper.es.dupont.com (8.9.3/8.9.3) with ESMTP id MAA26846 for ; Wed, 14 Jun 2000 12:04:35 -0400 (EDT) Received: (from cristy@localhost) by mystic.es.dupont.com (8.10.0.Beta12/8.10.0.Beta12) id e5EGYfI19547 for markov@ATComputing.nl; Wed, 14 Jun 2000 12:34:41 -0400 (EDT) Date: Wed, 14 Jun 2000 12:34:41 -0400 (EDT) From: Cristy Message-Id: <200006141634.e5EGYfI19547@mystic.es.dupont.com> To: markov@ATComputing.nl Subject: Re: your mail Content-Type: text Status: RO X-Status: A Content-Length: 670 Lines: 14 > It what you propose a feature or a designed thing? You specify the > coordinate of the right-top (NorthEast) wrt to the right-bottom > (SouthEast). I expect that x=0,y=0,SouthWest will work wrt to > NorthWest. It is not logical for me to treat North/South differently > from East/West (designed before the fall of the Iron curtain?) I'll send you a script that illustrates how gravity works. The x,y offset basically creates a bounding box within the image and the text is placed relative to the virtual bounding box. > And also: the text still appears in black. Are you using ImageMagick 5.2.0? When I used the script I sent the text color was indeed yellow. From cristy@eplrx7.es.dupont.com Wed Jun 14 18:05 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id SAA28006 for ; Wed, 14 Jun 2000 18:04:59 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id SAA12272 for ; Wed, 14 Jun 2000 18:04:58 +0200 Received: from gatekeeper.es.dupont.com(192.26.233.2) by ns.ATComputing.nl via smap (V2.1) id xma012268; Wed, 14 Jun 00 18:04:47 +0200 Received: from eplrx7.es.dupont.com (eplrx7.es.dupont.com [138.196.252.7]) by gatekeeper.es.dupont.com (8.9.3/8.9.3) with ESMTP id MAA26850 for ; Wed, 14 Jun 2000 12:04:46 -0400 (EDT) Received: from fantasia.es.dupont.com (fantasia.es.dupont.com [138.196.253.22]) by eplrx7.es.dupont.com (8.9.3/8.9.3) with ESMTP id MAA06403 for ; Wed, 14 Jun 2000 12:04:45 -0400 (EDT) Received: by fantasia.es.dupont.com (8.9.3+Sun) id MAA01601; Wed, 14 Jun 2000 12:03:33 -0400 (EDT) From: Cristy Date: Wed, 14 Jun 2000 12:03:33 -0400 (EDT) Message-ID: <1600.960998613@fantasia> Mime-Version: 1.0 To: markov@ATComputing.nl Content-Type: multipart/mixed; boundary="-" Status: RO Content-Length: 2009 Lines: 34 This is a MIME encoded message. Decode it with "munpack" or any other MIME reading software. Mpack/munpack is available via anonymous FTP in ftp.andrew.cmu.edu:pub/mpack/ --- Content-Type: application/octet-stream; name="gravity.pl" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="gravity.pl" Content-MD5: faVMCotdBUpHJCDAv7HACA== IyEvdXNyL2xvY2FsL2Jpbi9wZXJsCgp1c2UgSW1hZ2U6Ok1hZ2ljazsKCiRwaWMgPSBJbWFn ZTo6TWFnaWNrLT5uZXcoc2l6ZT0+IjQwMHg0MDAiKTsKJHBpYy0+UmVhZCgieGM6d2hpdGUi KTsKCiR4ID0gMTAwOwokeSA9IDEwMDsKJHBpYy0+RHJhdyhwcmltaXRpdmU9PidsaW5lJyxw b2ludHM9PiIyMDAsMTAwIDIwMCwzMDAiLHN0cm9rZT0+J2JsYWNrJyk7CiRwaWMtPkRyYXco cHJpbWl0aXZlPT4nbGluZScscG9pbnRzPT4iMTAwLDIwMCAzMDAsMjAwIixzdHJva2U9Pidi bGFjaycpOwokcGljLT5EcmF3KHByaW1pdGl2ZT0+J3JlY3RhbmdsZScscG9pbnRzPT4iMTAw LDEwMCAzMDAsMzAwIixzdHJva2U9PidibGFjaycpOwokcGljLT5Bbm5vdGF0ZShwb2ludHNp emU9PjI0LGZvbnQ9PidUaW1lcycsdGV4dD0+Ii1OVy0iLGdyYXZpdHk9PiJOb3J0aFdlc3Qi LHg9PiR4LHk9PiR5KTsKJHBpYy0+QW5ub3RhdGUocG9pbnRzaXplPT4yNCxmb250PT4nVGlt ZXMnLHRleHQ9PiItTi0iLGdyYXZpdHk9PiJOb3J0aCIseD0+JHgseT0+JHkpOwokcGljLT5B bm5vdGF0ZShwb2ludHNpemU9PjI0LGZvbnQ9PidUaW1lcycsdGV4dD0+Ii1ORS0iLGdyYXZp dHk9PiJOb3J0aEVhc3QiLHg9PiR4LHk9PiR5KTsKJHBpYy0+QW5ub3RhdGUocG9pbnRzaXpl PT4yNCxmb250PT4nVGltZXMnLHRleHQ9PiItRS0iLGdyYXZpdHk9PiJFYXN0Iix4PT4keCx5 PT4keSk7CiRwaWMtPkFubm90YXRlKHBvaW50c2l6ZT0+MjQsZm9udD0+J1RpbWVzJyx0ZXh0 PT4iLUMtIixncmF2aXR5PT4iQ2VudGVyIix4PT4keCx5PT4keSk7CiRwaWMtPkFubm90YXRl KHBvaW50c2l6ZT0+MjQsZm9udD0+J1RpbWVzJyx0ZXh0PT4iLVNFLSIsZ3Jhdml0eT0+IlNv dXRoRWFzdCIseD0+JHgseT0+JHkpOwokcGljLT5Bbm5vdGF0ZShwb2ludHNpemU9PjI0LGZv bnQ9PidUaW1lcycsdGV4dD0+Ii1TLSIsZ3Jhdml0eT0+IlNvdXRoIix4PT4keCx5PT4keSk7 CiRwaWMtPkFubm90YXRlKHBvaW50c2l6ZT0+MjQsZm9udD0+J1RpbWVzJyx0ZXh0PT4iLVNX LSIsZ3Jhdml0eT0+IlNvdXRoV2VzdCIseD0+JHgseT0+JHkpOwokcGljLT5Bbm5vdGF0ZShw b2ludHNpemU9PjI0LGZvbnQ9PidUaW1lcycsdGV4dD0+Ii1XLSIsZ3Jhdml0eT0+Ildlc3Qi LHg9PiR4LHk9PiR5KTsKCiRwaWMtPldyaXRlKGZpbGVuYW1lPT4idGVzdC5naWYiKTsKc3lz dGVtKCJkaXNwbGF5IHRlc3QuZ2lmIik7Cg== ----- From magick-owner@unca-don.wizards.dupont.com Thu Jun 29 18:01 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id SAA10314 for ; Thu, 29 Jun 2000 18:01:15 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id SAA00740 for ; Thu, 29 Jun 2000 18:01:14 +0200 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma000732; Thu, 29 Jun 00 18:01:07 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id MAA07078; Thu, 29 Jun 2000 12:00:36 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id LAA10740 for magick-outgoing; Thu, 29 Jun 2000 11:48:25 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <395B7519.F40670B@northrim.net> Date: Thu, 29 Jun 2000 10:11:05 -0600 From: Karl Sloth X-Mailer: Mozilla 4.72 [en] (X11; I; Linux 2.2.14 i586) X-Accept-Language: en MIME-Version: 1.0 To: magick@wizards.dupont.com Subject: mailing list archives Content-Transfer-Encoding: 7bit Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Karl Sloth Content-Type: text/plain; charset=us-ascii Status: RO Content-Length: 552 Lines: 17 Hi all- The folks at The Aims Group have added the ImageMagick mailing list to their online mailing list archives. They have a searchable history going back to 1996. Very handy. http://marc.theaimsgroup.com/?l=imagemagick&r=1&w=2 -karl *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From markov@ATComputing.nl Tue Jul 4 12:33:47 2000 Date: Tue, 4 Jul 2000 12:33:47 +0200 From: Mark Overmeer To: magick-bugs@simple.dallas.tx.us Subject: Re: Annotate problems (PR#298) Message-ID: <20000704123347.F2009@atcmpg.ATComputing.nl> References: <200006141454.JAA14556@ns.simplesystems.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <200006141454.JAA14556@ns.simplesystems.org>; from magick-bugs@simple.dallas.tx.us on Wed, Jun 14, 2000 at 09:54:08AM -0500 Status: RO Content-Length: 573 Lines: 12 * magick-bugs@simple.dallas.tx.us (magick-bugs@simple.dallas.tx.us) [000614 16:54]: > Your bug report is available on the web at the URL > http://www.simplesystems.org/ImageMagick/bugs?findid=298 Both indicated problems are fixed in 5.2.1 -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From magick-owner@unca-don.wizards.dupont.com Sun Jul 2 02:40 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id CAA01634 for ; Sun, 2 Jul 2000 02:40:25 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id CAA03454 for ; Sun, 2 Jul 2000 02:40:24 +0200 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma003450; Sun, 2 Jul 00 02:40:07 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id UAA32165; Sat, 1 Jul 2000 20:39:55 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id UAA16952 for magick-outgoing; Sat, 1 Jul 2000 20:30:03 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <395E8F1F.B804FCB7@interak.com> Date: Sat, 01 Jul 2000 16:38:55 -0800 From: Marc Grober X-Mailer: Mozilla 4.61 [en] (X11; I; UnixWare 5 i386) MIME-Version: 1.0 To: magick@wizards.dupont.com Subject: delegates.mgk set-up for unixware printing Content-Transfer-Encoding: 7bit Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Marc Grober Content-Type: text/plain; charset=us-ascii Status: RO Content-Length: 1403 Lines: 45 Under unixware to print from displayt to an HP laserjet (usual command to print postscript being lp -dhpraw -Tpostscript), I changed the delegates.mgk file (which I found in /usr/local/share/Magick as installed from the SCO skunkware CD) from ps<=print /usr/bin/lp -c -s %i to ps<=print /usr/bin/lp -dhpraw -c -s -Tpostscript %i and it appears everything is working. The -c make an immediate copy and feeds it to the spooler and without it you get an error message (below) which my guess is is a bit misleading in that I have to assume that what is really happening is that without the -c IM is not passing anything to the spooler........ ****************************************************************************** Subject: Status of lp request hpraw-347 Your request hpraw-347 destined for hpraw encountered an error during filtering. Reason for failure: UX:lp: ERROR: Cannot read the file "/tmp/hacienda.jpg". TO FIX: See if it still exists and is readable, or consult your system administrator. *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Mon Jul 3 16:12 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id QAA28389 for ; Mon, 3 Jul 2000 16:12:41 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id QAA05092 for ; Mon, 3 Jul 2000 16:12:40 +0200 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma005088; Mon, 3 Jul 00 16:12:32 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id KAA12560; Mon, 3 Jul 2000 10:12:03 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id KAA20768 for magick-outgoing; Mon, 3 Jul 2000 10:01:07 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <395BACF9.CFA6970@interak.com> Date: Thu, 29 Jun 2000 12:09:30 -0800 From: Marc Grober X-Mailer: Mozilla 4.61 [en] (X11; I; UnixWare 5 i386) MIME-Version: 1.0 To: magick@wizards.dupont.com Subject: printing solution for UW 7.1 Content-Transfer-Encoding: 7bit Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Marc Grober Content-Type: text/plain; charset=us-ascii Status: RO Content-Length: 1500 Lines: 46 Under unixware to print from displayt to an HP laserjet (usual command to print postscript being lp -dhpraw -Tpostscript), I changed the delegates.mgk file (which I found in /usr/local/share/Magick as installed from the SCO skunkware CD) from ps<=print /usr/bin/lp -c -s %i to ps<=print /usr/bin/lp -dhpraw -c -s -Tpostscript %i and it appears everything is working. The -c make an immediate copy and feeds it to the spooler and without it you get an error message (below) which my guess is is a bit misleading in that I have to assume that what is really happening is that without the -c IM is not passing anything to the spooler........ ****************************************************************************** Subject: Status of lp request hpraw-347 Your request hpraw-347 destined for hpraw encountered an error during filtering. Reason for failure: UX:lp: ERROR: Cannot read the file "/tmp/hacienda.jpg". TO FIX: See if it still exists and is readable, or consult your system administrator. I have tried this with jpegs, gifs etc and in quite a number of locations Placed the -c -s back in *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Fri Jul 7 09:27 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id JAA27505 for ; Fri, 7 Jul 2000 09:27:32 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id JAA11016 for ; Fri, 7 Jul 2000 09:27:31 +0200 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma011014; Fri, 7 Jul 00 09:27:21 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id DAA06530; Fri, 7 Jul 2000 03:26:27 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id DAA06369 for magick-outgoing; Fri, 7 Jul 2000 03:15:15 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Date: Fri, 7 Jul 2000 17:24:12 +1000 From: Martien Verbruggen To: Geoff Armstrong Cc: ImageMagick Mailing List Subject: Re: converts new sharpen factors Message-ID: <20000707172412.C23320@martien.heliotrope.home> References: <00070515380200.26142@berlioz> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.2.2i In-Reply-To: <00070515380200.26142@berlioz>; from geofstro@monaco.mc on Wed, Jul 05, 2000 at 03:35:26PM +0200 Organisation: Heliotrope Productions Pty. Ltd. Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Martien Verbruggen Content-Type: text/plain; charset=us-ascii Status: RO Content-Length: 1483 Lines: 36 -- Geoff Armstrong wrote on Wed 5 Jul 15:35 PM -- > Hi, > > I know the sharpen factors for convert have changed since 5.2.0; but I > can't find the new factors documented anywhere. The factors are no longer really factors, but orders for a convolution kernel, if I've understood it all correctly. Since convolution has become available in ImageMagick, many of the old filters have been rewritten to use a kernel (blur, sharpen, charcoal, emboss, edge). The convert manual page mentions that good values are odd numbers between 3 and 31. Martien PS. If you don't know what convolution is: apply a matrix to each pixel, and it's surrounding neighbors covered by the matrix. The values of each covered pixel get multiplied by the matrix cell's value, and all added together. The new value for the target pixel is this sum. The 'order' that I talked about above is the height and width of the matrix involved (in ImageMagick they're always square). -- Martien Verbruggen | Interactive Media Division | "In a world without fences, Commercial Dynamics Pty. Ltd. | who needs Gates?" NSW, Australia | *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@unca-don.wizards.dupont.com Fri Jul 7 17:55 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id RAA13560 for ; Fri, 7 Jul 2000 17:55:42 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id RAA15121 for ; Fri, 7 Jul 2000 17:55:42 +0200 Received: from mustang.oldcity.dca.net(216.158.38.3) by ns.ATComputing.nl via smap (V2.1) id xma015105; Fri, 7 Jul 00 17:55:27 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by mustang.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id LAA24776; Fri, 7 Jul 2000 11:54:30 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id LAA07897 for magick-outgoing; Fri, 7 Jul 2000 11:44:52 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Date: Fri, 7 Jul 2000 12:23:40 -0400 (EDT) From: Cristy Message-Id: <200007071623.e67GNev10760@mystic.es.dupont.com> To: magick@wizards.dupont.com Subject: New ImageMagick mailing list Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Cristy Content-Type: text Status: RO Content-Length: 1242 Lines: 31 *********************************************************************** This list is being decommissioned. Please join one or more of the new ImageMagick mailing lists as described at http://www.imagemagick.org/www/magick-list.html. *********************************************************************** In response to a number of suggestions and/or complaints about the magick@wizards.dupont.com ImageMagick mailing list, I have created three new lists: magick-user@imagemagick.org magick-deveoper@imagemagick.org magick-announce@imagemagick.org See http://www.imagemagick.org/www/magick-list.html for instructions on joining and/or posting. I will keep the current list at magick@wizards.dupont.com running for the next couple of months to cause the least amount of disruption. At your convenience unsubscribe from magick@wizards.dupont.com and choose one of the lists above, whichever is appropriate. *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From markov@ATComputing.nl Sat Jul 8 10:27:08 2000 Date: Sat, 8 Jul 2000 10:27:08 +0200 From: Mark Overmeer To: majordomo@imagemagick.org Subject: subscribe Message-ID: <20000708102708.B1570@atcmpg.ATComputing.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i Status: RO Content-Length: 27 Lines: 1 subscribe magick-developer From markov@ATComputing.nl Sat Jul 8 13:53:18 2000 Date: Sat, 8 Jul 2000 13:53:18 +0200 From: Mark Overmeer To: Majordomo@imagemagick.org Subject: Re: Confirmation for subscribe magick-developer Message-ID: <20000708135318.A2549@atcmpg.ATComputing.nl> References: <200007080855.EAA15589@imagemagick.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <200007080855.EAA15589@imagemagick.org>; from Majordomo@imagemagick.org on Sat, Jul 08, 2000 at 04:55:40AM -0400 Status: RO Content-Length: 63 Lines: 1 auth 44b84310 subscribe magick-developer markov@ATComputing.nl From Majordomo-Owner@imagemagick.org Sat Jul 8 10:27 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id KAA01750 for ; Sat, 8 Jul 2000 10:27:39 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id KAA25253 for ; Sat, 8 Jul 2000 10:27:38 +0200 Received: from magick.imagemagick.org(38.220.172.2) by ns.ATComputing.nl via smap (V2.1) id xma025238; Sat, 8 Jul 00 10:27:26 +0200 Received: (from majordomo@localhost) by imagemagick.org (8.9.3/8.9.3) id EAA15589; Sat, 8 Jul 2000 04:55:40 -0400 Date: Sat, 8 Jul 2000 04:55:40 -0400 Message-Id: <200007080855.EAA15589@imagemagick.org> X-Authentication-Warning: magick.imagemagick.org: majordomo set sender to Majordomo-Owner@imagemagick.org using -f To: markov@ATComputing.nl From: Majordomo@imagemagick.org Subject: Confirmation for subscribe magick-developer Reply-To: Majordomo@imagemagick.org Content-Type: text Status: RO X-Status: A Content-Length: 822 Lines: 25 -- Someone (possibly you) has requested that your email address be added to or deleted from the mailing list "magick-developer@imagemagick.org". If you really want this action to be taken, please send the following commands (exactly as shown) back to "Majordomo@imagemagick.org": auth 44b84310 subscribe magick-developer markov@ATComputing.nl If you do not want this action to be taken, simply ignore this message and the request will be disregarded. If your mailer will not allow you to send the entire command as a single line, you may split it using backslashes, like so: auth 44b84310 subscribe magick-developer \ markov@ATComputing.nl If you have any questions about the policy of the list owner, please contact "magick-developer-approval@imagemagick.org". Thanks! Majordomo@imagemagick.org From owner-magick@imagemagick.org Sat Jul 8 13:53 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id NAA02564 for ; Sat, 8 Jul 2000 13:53:33 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id NAA00576 for ; Sat, 8 Jul 2000 13:53:28 +0200 Received: from magick.imagemagick.org(38.220.172.2) by ns.ATComputing.nl via smap (V2.1) id xma000568; Sat, 8 Jul 00 13:53:23 +0200 Received: (from majordomo@localhost) by imagemagick.org (8.9.3/8.9.3) id IAA16219; Sat, 8 Jul 2000 08:21:42 -0400 Date: Sat, 8 Jul 2000 08:21:42 -0400 Message-Id: <200007081221.IAA16219@imagemagick.org> X-Authentication-Warning: magick.imagemagick.org: majordomo set sender to owner-magick@imagemagick.org using -f To: markov@ATComputing.nl From: Majordomo@imagemagick.org Subject: Welcome to magick-developer Reply-To: Majordomo@imagemagick.org Content-Type: text Status: RO Content-Length: 11286 Lines: 274 -- Welcome to the magick-developer mailing list! Please save this message for future reference. Thank you. If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe magick-developer or from another account, besides markov@ATComputing.nl: unsubscribe magick-developer markov@ATComputing.nl If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. Here's the general information for the list you've subscribed to, in case you don't already have it: The ImageMagick mailing list (magick@wizards.dupont.com) is a low noise and subject oriented mailing list. The subject is the discussion of ImageMagick software and its use. Although the list is unmoderated, do not post off-topic messages to the list. Off-topic messages will result in the offender being silently removed from the list and prevented from rejoining. Please follow these guidelines when posting or responding to posted messages: 1. postings must be related to ImageMagick, PerlMagick, CineMagick, or WebMagick. Here is an example of what not to post: Does anyone know of a program that converts WWF to JPG on the Mac? Post these to comp.graphics instead. 2. postings should be concise but provide enough detail for readers to discern what the problem is and respond with a solution. Here is an example of what not to post: I downloaded ImageMagick and it doesn't work. What's up? Yes, I have seen these messages. More detail is needed for a proper response. 3. responses should be sent to the author, and not the list, if the response is not of general interest. For example, I'm converting libMagick to a C++ class library. Anyone want to help? Discuss this privately with the author and make a general announcement when you complete your work. 4. Only relevant portions of a message should be quoted. Do not quote the entire message, for example, and give a one line response. 5. Do not post administriva messages such as "How do I unsubscribe from the list?" Instead, see http://www.imagemagick.org/www/magick-list.html for help. 6. Do not post test messages to the list. An archive of all messages posted to the mailing list is available to peruse. See ftp://ftp.wizards.dupont.com/pub/ImageMagick/mailing-list You can also browse or search the archive. See http://marc.theaimsgroup.com/?l=imagemagick&r=1&w=2 * * * ImageMagick is a robust collection of tools and libraries to read, write, and manipulate an image in many image formats (over 68 major formats) including popular formats like TIFF, JPEG, PNG, PDF, Photo CD, and GIF. With ImageMagick you can create images dynamically, making it suitable for Web applications. You can also resize, rotate, sharpen, color reduce, or add special effects to an image and save your completed work in the same or differing image format. Image processing operations are available from the command line, as well as through C, C++, and PERL-based programming interfaces. Here is just a few examples of what ImageMagick can do: Convert an image from one format to another (e.g. TIFF to GIF) Resize, rotate, sharpen, color reduce, or add special effects to an image Create a montage of image tumbnails Create a transparent image suitable for use on the Web Turn a group of images into a GIF animation sequence Create a composite image by combining several separate images Draw shapes or text on an image Decorate an image with a border or frame Describe the format and characteristics of an image You can access ImageMagick functions directly from the command line using the ImageMagick tools convert, mogrify, montage, combine, or identify. Use the display program to interactively manipulate your images or animate an image sequence from a graphical panel. Finally you have access to the various image manipulation methods directly from your favorite application development environment: Perl, C++, C, or Java. These programs and much more are explained by following the links from this page or read the ImageMagick Users Guide. ImageMagick is known to compile and run on virtually any Unix. system and Linux. It also runs under Windows 2000, Windows 95/98, Macintosh, VMS, and OS2. See the install guide for compiling instructions. Pre-compiled binaries are available for some of the more popular operating systems. The offical ImageMagick web page is: http://ww.imagemagick.org/ ImageMagick is available via ftp as ftp://ftp.wizards.dupont.com/pub/ImageMagick Other versions are available as ftp://ftp.wizards.dupont.com/pub/ImageMagick/binaries ftp://ftp.wizards.dupont.com/pub/ImageMagick/mac ftp://ftp.wizards.dupont.com/pub/ImageMagick/nt ftp://ftp.wizards.dupont.com/pub/ImageMagick/vms ftp://ftp.wizards.dupont.com/pub/ImageMagick/linux * * * * * * * * * ImageMagick Tools display Display is a machine architecture independent image and display program. It can display an image on any workstation display running an X server. Display can read and write many of the more popular image formats (e.g. JPEG, TIFF, PNM, Photo CD, etc.). You can perform these functions on the image: o load an image from a file o display the next image o display the former image o display a sequence of images as a slide show o write the image to a file o print the image to a Postscript printer o delete the image file o create a Visual Image Directory o select the image to display by its thumbnail rather than name o undo last image transformation o copy a region of the image o paste a region to the image o restore the image to its original size o refresh the image o half the image size o double the image size o resize the image o crop the image o cut the image o flop image in the horizontal direction o flip image in the vertical direction o rotate the image 90 degrees clockwise o rotate the image 90 degrees counter-clockwise o rotate the image o shear the image o trim the image edges o invert the colors of the image o vary the color brightness o vary the color saturation o vary the image hue o gamma correct the image o sharpen the image contrast o dull the image contrast o perform histogram equalization on the image o perform histogram normalization on the image o negate the image colors o convert the image to grayscale o set the maximum number of unique colors in the image o reduce the speckles within an image o eliminate peak noise from an image o detect edges within the image o emboss an image o oil paint an image o segment the image by color o annotate the image with text o draw on the image o edit an image pixel color o edit the image matte information o composite an image with another o add a border to the image o add an image comment o apply image processing techniques to a region of interest o display information about the image o display information about this program o display image to background of a window o set user preferences o discard all images and exit program o change the level of magnification o display images specified by a World Wide Web (WWW) uniform resource locator (URL) import Import reads an image from any visible window on an X server and outputs it as an image file. You can capture a single window, the entire screen, or any rectangular portion of the screen. You can use display (see display(1)) utility for redisplay, printing, editing, formatting, archiving, image processing, etc. of the captured image. The target window can be specified by id, name, or may be selected by clicking the mouse in the desired window. If you press a button and then drag, a rectangle will form which expands and contracts as the mouse moves. To save the portion of the screen defined by the rectangle, just release the button. The keyboard bell is rung once at the beginning of the screen capture and twice when it completes. animate Animate displays a sequence of images on any workstation display running an X server. Animate first determines the hardware capabilities of the workstation. If the number of unique colors in an image is less than or equal to the number the workstation can support, the image is displayed in an X window. Otherwise the number of colors in the image is first reduced to match the color resolution of the workstation before it is displayed. This means that a continuous-tone 24 bits/pixel image can display on a 8 bit pseudo-color device or monochrome device. In most instances the reduced color image closely resembles the original. Alternatively, a monochrome or pseudo-color image sequence can display on a continuous-tone 24 bits/pixels device. montage Montage creates a composite image by combining several separate images. The images are tiled on the composite image with the name of the image optionally appearing just below the individual tile. convert Convert converts an input file using one image format to an output file with a differing image format. By default, the image format is determined by it's magic number. To specify a particular image format, precede the filename with an image format name and a colon (i.e. ps:image) or specify the image type as the filename suffix (i.e. image.ps). Specify file as - for standard input or output. If file has the extension .Z, the file is decoded with uncompress. mogrify Mogrify transforms an image or a sequence of images. These transforms include image scaling, image rotation, color reduction, and others. The transmogrified image overwrites the original image. identify describes the format and characteristics of one or more image files. It will also report if an image is incomplete or corrupt. The information displayed includes the scene number, the file name, the width and height of the image, whether the image is colormapped or not, the number of colors in the image, the number of bytes in the image, the format of the image (JPEG, PNM, etc.), and finally the number of seconds it took to read and process the image. combine Combine combines images to create new images. From markov@ATComputing.nl Wed Jul 26 13:32:31 2000 Date: Wed, 26 Jul 2000 13:32:31 +0200 From: Mark Overmeer To: Chris Wareham Subject: Re: core dump in simple ImageMagick example Message-ID: <20000726133231.G25170@atcmpg.ATComputing.nl> References: <397C6C6B.989E4BB2@catchword.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <397C6C6B.989E4BB2@catchword.com>; from chris.wareham@catchword.com on Mon, Jul 24, 2000 at 05:18:51PM +0100 Status: RO Content-Length: 2223 Lines: 55 * Chris Wareham (chris.wareham@catchword.com) [000724 18:24]: > *********************************************************************** > This list is being decommissioned. Please join one or more of the new > ImageMagick mailing lists as described at > http://www.imagemagick.org/www/magick-list.html. > *********************************************************************** > > The following snippet of code coew dumps on ReadImage(): > > GetExceptionInfo(&exception); > image_info = CloneImageInfo((ImageInfo *)NULL); > > strcpy(image_info->filename, IMAGEDIR); > strcat(image_info->filename, "/"); > strcat(image_info->filename, filename); > > image = ReadImage(image_info, &exception); > if(image == (Image *)NULL) { > log_error("unable to read image '%s'", filename); > return; > } > > The debugger output is the following: > > Program received signal SIGSEGV, Segmentation fault. > 0x403a0058 in _IO_getc (fp=0x67616d69) at getc.c:39 > 39 getc.c: No such file or directory. > (gdb) bt > #0 0x403a0058 in _IO_getc (fp=0x67616d69) at getc.c:39 > #1 0x4005eb8d in SetImageInfo () from /usr/local/lib/libMagick.so.5 > #2 0x4003c91e in ReadImage () from /usr/local/lib/libMagick.so.5 > #3 0x80491dd in process_image (dbm=0x804bea0, filename=0x806a157 > "00132aac.tif") at tif2png.c:107 > #4 0x8048fd3 in convert_images (args=0xbffff9f4) at tif2png.c:55 > #5 0x8048e6c in main (argc=1, argv=0xbffff9f4) at tif2png.c:21 I have the same problem using PerlMagick 5.2.2 calling ReadImage. However, it is only reproduceable when this statement is included in my huge Perl program with a small IM part, not is a smaller sample as you have. I run Solaris 2.5.1 and all newest image-libs attached. Did you get any useful reply which fixed your problem. Didi you know there is a bug-list: http://www.simplesystems.org/ImageMagick/bugs/ Please let me know. -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From magick-owner@unca-don.wizards.dupont.com Mon Jul 24 18:24 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id SAA27465 for ; Mon, 24 Jul 2000 18:24:10 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id SAA20827 for ; Mon, 24 Jul 2000 18:24:09 +0200 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma020823; Mon, 24 Jul 00 18:23:51 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id MAA20883; Mon, 24 Jul 2000 12:23:50 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id MAA01738 for magick-outgoing; Mon, 24 Jul 2000 12:07:32 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-ID: <397C6C6B.989E4BB2@catchword.com> Date: Mon, 24 Jul 2000 17:18:51 +0100 From: Chris Wareham X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.17pre13 i686) X-Accept-Language: en MIME-Version: 1.0 To: magick@wizards.dupont.com Subject: core dump in simple ImageMagick example Content-Transfer-Encoding: 7bit Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Chris Wareham Content-Type: text/plain; charset=us-ascii Status: RO X-Status: A Content-Length: 1736 Lines: 47 *********************************************************************** This list is being decommissioned. Please join one or more of the new ImageMagick mailing lists as described at http://www.imagemagick.org/www/magick-list.html. *********************************************************************** The following snippet of code coew dumps on ReadImage(): GetExceptionInfo(&exception); image_info = CloneImageInfo((ImageInfo *)NULL); strcpy(image_info->filename, IMAGEDIR); strcat(image_info->filename, "/"); strcat(image_info->filename, filename); image = ReadImage(image_info, &exception); if(image == (Image *)NULL) { log_error("unable to read image '%s'", filename); return; } The debugger output is the following: Program received signal SIGSEGV, Segmentation fault. 0x403a0058 in _IO_getc (fp=0x67616d69) at getc.c:39 39 getc.c: No such file or directory. (gdb) bt #0 0x403a0058 in _IO_getc (fp=0x67616d69) at getc.c:39 #1 0x4005eb8d in SetImageInfo () from /usr/local/lib/libMagick.so.5 #2 0x4003c91e in ReadImage () from /usr/local/lib/libMagick.so.5 #3 0x80491dd in process_image (dbm=0x804bea0, filename=0x806a157 "00132aac.tif") at tif2png.c:107 #4 0x8048fd3 in convert_images (args=0xbffff9f4) at tif2png.c:55 #5 0x8048e6c in main (argc=1, argv=0xbffff9f4) at tif2png.c:21 image_info->filename points to a valid TIFF image, so any ideas as to what gives??? Chris *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From markov@ATComputing.nl Wed Jul 26 13:49:09 2000 Date: Wed, 26 Jul 2000 13:49:09 +0200 From: Mark Overmeer To: Chris Wareham Subject: Re: core dump in simple ImageMagick example Message-ID: <20000726134909.I25170@atcmpg.ATComputing.nl> References: <397C6C6B.989E4BB2@catchword.com> <20000726133231.G25170@atcmpg.ATComputing.nl> <397ECFEF.598EE285@catchword.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <397ECFEF.598EE285@catchword.com>; from chris.wareham@catchword.com on Wed, Jul 26, 2000 at 12:47:59PM +0100 Status: RO Content-Length: 754 Lines: 16 * Chris Wareham (chris.wareham@catchword.com) [000726 13:46]: > > I have the same problem using PerlMagick 5.2.2 calling ReadImage. > This solved my problem with a C based ImageMagick client, but > I don't know whether it is relevant for PerlMagick programs. So: to install IM, I need to have the libs installed. To install the libs, I need IM to be installed for Magic-config.... Ok. Still strange spot to dump core... -- MarkOv %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From chris.wareham@catchword.com Wed Jul 26 13:46 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id NAA29434 for ; Wed, 26 Jul 2000 13:46:33 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id NAA24001 for ; Wed, 26 Jul 2000 13:46:32 +0200 Received: from figaro.catchword.co.uk(194.129.29.1) by ns.ATComputing.nl via smap (V2.1) id xma023999; Wed, 26 Jul 00 13:46:13 +0200 Received: from catchword.com (valkyrie.catchword.co.uk [194.129.29.105]) by figaro.catchword.co.uk (8.9.2/8.9.2) with ESMTP id LAA10217 for ; Wed, 26 Jul 2000 11:49:37 GMT Sender: cwareham@figaro.catchword.co.uk Message-ID: <397ECFEF.598EE285@catchword.com> Date: Wed, 26 Jul 2000 12:47:59 +0100 From: Chris Wareham X-Mailer: Mozilla 4.74 [en] (X11; U; Linux 2.2.17pre13 i686) X-Accept-Language: en MIME-Version: 1.0 To: Mark Overmeer Subject: Re: core dump in simple ImageMagick example References: <397C6C6B.989E4BB2@catchword.com> <20000726133231.G25170@atcmpg.ATComputing.nl> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Status: RO X-Status: A Content-Length: 882 Lines: 26 Mark Overmeer wrote: > > I have the same problem using PerlMagick 5.2.2 calling ReadImage. > However, it is only reproduceable when this statement is included in > my huge Perl program with a small IM part, not is a smaller sample > as you have. > > I run Solaris 2.5.1 and all newest image-libs attached. > > Did you get any useful reply which fixed your problem. > Didi you know there is a bug-list: > http://www.simplesystems.org/ImageMagick/bugs/ > > Please let me know. > I wasn't passing all the required compiler flags when building my program. I had looked at the output of Magick-config, and simply copied the library dependencies into a Makefile. To successfully build, ImageMagick clients also need the correct CFLAGS arguments, etc. This solved my problem with a C based ImageMagick client, but I don't know whether it is relevant for PerlMagick programs. Chris From markov@ATComputing.nl Mon Aug 7 11:38:44 2000 Date: Mon, 7 Aug 2000 11:38:44 +0200 From: Mark Overmeer To: Bryan Burchette Subject: Re: Core Dump on ReadImage Message-ID: <20000807113844.A22119@atcmpg.ATComputing.nl> References: <4.3.1.0.20000801154753.00ae3ed0@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: <4.3.1.0.20000801154753.00ae3ed0@mindspring.com>; from blburch@mindspring.com on Tue, Aug 01, 2000 at 03:54:42PM -0400 Status: RO Content-Length: 1041 Lines: 24 (I was away for holidays last week, so not able to response earlier) * Bryan Burchette (blburch@mindspring.com) [000801 22:37]: > I am using ImageMagick 5.2.2 and for testing puposes I am using the little > test program on the website under the API section. No matter what I do, the > program cores on ReadImage(). > Current function is main > 33 image=ReadImage(image_info,&exception); I located the problem in the getc() of ReadImage using PerlMagick. I did not succeed in creating a reduced sized example for my program which reproduces the problem, so I'm glad I'm not the only one with this problem. Is there are more clarity on the cause of the crash? Any response from the developers? -- Mark Overmeer %-] ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer markov@ATComputing.nl AT Computing, UNIX Training and Consultancy http://www.ATComputing.nl http://www.dhp.nl/~markov/ http://satfoto.dhp.nl From magick-owner@unca-don.wizards.dupont.com Tue Aug 1 22:37 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id WAA14913 for ; Tue, 1 Aug 2000 22:37:13 +0200 (MET DST) Received: (from nobody@localhost) by ns.ATComputing.nl (8.8.8/8.8.8) id WAA04892 for ; Tue, 1 Aug 2000 22:37:12 +0200 Received: from viper.oldcity.dca.net(216.158.38.4) by ns.ATComputing.nl via smap (V2.1) id xma004890; Tue, 1 Aug 00 22:37:04 +0200 Received: from unca-don.wizards.dupont.com ([204.183.81.133]) by viper.oldcity.dca.net (8.9.3/8.9.3/DCANET) with ESMTP id QAA28454; Tue, 1 Aug 2000 16:36:07 -0400 Received: (from majordomo@localhost) by unca-don.wizards.dupont.com (8.9.3/8.9.3) id PAA24962 for magick-outgoing; Tue, 1 Aug 2000 15:46:55 -0400 (EDT) X-Authentication-Warning: unca-don.wizards.dupont.com: majordomo set sender to owner-magick@wizards.dupont.com using -f Message-Id: <4.3.1.0.20000801154753.00ae3ed0@mindspring.com> X-Sender: blburch@mindspring.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Date: Tue, 01 Aug 2000 15:54:42 -0400 To: magick@wizards.dupont.com From: Bryan Burchette Subject: Core Dump on ReadImage Mime-Version: 1.0 Sender: owner-magick@wizards.dupont.com Precedence: bulk Reply-To: Bryan Burchette Content-Type: text/plain; charset="us-ascii"; format=flowed Status: RO X-Status: A Content-Length: 2042 Lines: 55 *********************************************************************** This list is being decommissioned. Please join one or more of the new ImageMagick mailing lists as described at http://www.imagemagick.org/www/magick-list.html. *********************************************************************** Hey List, This has me stumped! Maybe I am just missing something really obvious. I am using ImageMagick 5.2.2 and for testing puposes I am using the little test program on the website under the API section. No matter what I do, the program cores on ReadImage(). This is the program I am using to test: http://www.wizards.dupont.com/cristy/www/api.html I have pointed the MagickIncarnate() function to the appropriate directory on my box. Does anybody have any ideas?? What could I be doing wrong. Here is my ouput from DBX (dbx) step stopped in main at line 29 in file "test.c" 29 GetExceptionInfo(&exception); (dbx) where =>[1] main(argc = 1, argv = 0xeffff3c4 "\xef\xff\xf5^H"), line 29 in "test.c" (dbx) step stopped in main at line 30 in file "test.c" 30 image_info=CloneImageInfo((ImageInfo *) NULL); (dbx) step stopped in main at line 31 in file "test.c" 31 (void) strcpy(image_info->filename,"test.jpg"); (dbx) step stopped in main at line 32 in file "test.c" 32 printf("iamge_info->filename is %s\n",image_info->filename); (dbx) step iamge_info->filename is test.jpg stopped in main at line 33 in file "test.c" 33 image=ReadImage(image_info,&exception); (dbx) step signal SEGV (no mapping at the fault address) in getc at 0xef267b24 0xef267b24: getc+0x0024: ld [%i0], %o0 Current function is main 33 image=ReadImage(image_info,&exception); *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@wizards.dupont.com Include the following command in the body of your message: unsubscribe magick *********************************************************************** From magick-owner@imagemagick.org Wed Oct 4 19:56 MET 2000 Received: from ns.ATComputing.nl (ns.ATComputing.nl [195.108.229.25]) by atcmpg.ATComputing.nl (8.9.0/8.9.0) with ESMTP id TAA26427 for ; Wed, 4 Oct 2000 19:56:00 +0200 (MET DST) Received: from imagemagick.org (magick.imagemagick.org [38.220.172.2]) by ns.ATComputing.nl (Postfix) with ESMTP id 84B2DED32 for ; Wed, 4 Oct 2000 19:55:58 +0200 (CEST) Received: (from majordomo@localhost) by imagemagick.org (8.11.0.Beta3/8.9.3) id e94IMj420302 for magick-developer-outgoing; Wed, 4 Oct 2000 14:22:45 -0400 X-Authentication-Warning: magick.imagemagick.org: majordomo set sender to owner-magick@imagemagick.org using -f From: cristy@mystic.es.dupont.com Date: Wed, 4 Oct 2000 14:22:35 -0400 (EDT) Message-Id: <200010041822.e94IMZr19712@mystic.es.dupont.com> To: magick-developer@imagemagick.org Subject: Font metrics Sender: owner-magick@imagemagick.org Precedence: bulk Reply-To: cristy@mystic.es.dupont.com Content-Type: text Status: RO Content-Length: 1620 Lines: 32 The problem with general font metrics in ImageMagick is that there are four schemes for obtaining fonts FreeType 1, FreeType 2, Postscript/Ghostscript fonts, and X11 fonts. Freetype returns plenty of information associated with font metrics. I know of no way to get the font metrics from Ghostscript and X11 fonts returns metrics but they do not exactly match the information returned by Freetype. Layered on top of that is the fonts can be manipulated with an affine matrix with varying results for the different font schemes. Currently I write fonts to an image that bounds the font and turn all pixels not covered by the font lettering to transparent then composite this on top of the image being annotated. The only metrics available now are the maximum font height and string width. In Perl, for example, use $font->Read('label:This is a test'); ($width,$height)=$font->Get('width','height'); I can certainly include other metric information as well but how to do this consistently for all font schemes? Perhaps I could retain the font metrics for Freetype fonts only? Or can you think of a few specific font metrics that would be useful to you that we can get for FreeType, X11, and Postscript fonts? What is a minimal set of font metrics you need to make annotating more useable? *********************************************************************** To remove yourself from this mailing list, send mail to: majordomo@imagemagick.org Include the following command in the body of your message: unsubscribe magick-developer *********************************************************************** Mail-Box-2.118/tests/Tools.pm0000644000175000001440000002370312473604425016467 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. use strict; package Tools; use vars '$VERSION'; $VERSION = '2.118'; use lib qw(lib ../lib); use base 'Exporter'; use File::Copy 'copy'; use List::Util 'first'; use IO::File; # to overrule open() our @EXPORT = qw/clean_dir copy_dir unpack_mbox2mh unpack_mbox2maildir compare_lists listdir compare_message_prints reproducable_text compare_thread_dumps start_pop3_server start_pop3_client $folderdir $src $unixsrc $winsrc $fn $unixfn $winfn $cpy $cpyfn $raw_html_data $crlf_platform $windows /; use Test::More; use File::Spec; use Sys::Hostname; use Cwd; our ($logfile, $folderdir); our ($src, $unixsrc, $winsrc); our ($fn, $unixfn, $winfn); our ($cpy, $cpyfn); our ($crlf_platform, $windows); BEGIN { $windows = $^O =~ m/mswin32|cygwin/i; $crlf_platform = $windows; $folderdir = -d 'folders' ? 'folders' : File::Spec->catdir('tests','folders'); $logfile = File::Spec->catfile(getcwd(), 'run-log'); $unixfn = 'mbox.src'; $winfn = 'mbox.win'; $cpyfn = 'mbox.cpy'; $unixsrc = File::Spec->catfile($folderdir, $unixfn); $winsrc = File::Spec->catfile($folderdir, $winfn); $cpy = File::Spec->catfile($folderdir, $cpyfn); ($src, $fn) = $crlf_platform ? ($winsrc, $winfn) : ($unixsrc, $unixfn); # ensure to test the Perl Parser not the C-Parser (separate distribution) require Mail::Box::Parser::Perl; Mail::Box::Parser->defaultParserType( 'Mail::Box::Parser::Perl' ); # IO::File::open() is wrapped, because starting with 1.11 (Perl 5.8.7) # it cannot open files with relative pathnames when tainting checks are # enabled. I want to test relative folder names!! # # workaround: turn the relative path to an absolute # one here, then untaint it # Idea based on a contribution by Niko Tyni my $old_open = \&IO::File::open; no warnings 'redefine'; *IO::File::open = sub { my $fh = shift; if(ref $_[0] eq 'SCALAR') { print ${$_[0]} } return $old_open->($fh, @_) if ref $_[0]; my $file = File::Spec->rel2abs(shift); $file =~ /^(.*)$/; # untaint $old_open->($fh, $1, @_); } } # # CLEAN_DIR # Clean a directory structure, typically created by unpack_mbox() # sub clean_dir($); sub clean_dir($) { my $dir = shift; opendir DIR, $dir or return; my @items = map { m/(.*)/ && "$dir/$1" } # untainted grep !/^\.\.?$/, readdir DIR; foreach (@items) { if(-d) { clean_dir $_ } else { unlink $_ } } closedir DIR; rmdir $dir; } # # COPY_DIR FROM, TO # Copy directory to other place (not recursively), cleaning the # destination first. # sub copy_dir($$) { my ($orig, $dest) = @_; clean_dir($dest); mkdir $dest or die "Cannot create copy destination $dest: $!\n"; opendir ORIG, $orig or die "Cannot open directory $orig: $!\n"; foreach my $name (map { !m/^\.\.?$/ && m/(.*)/ ? $1 : () } readdir ORIG) { my $from = File::Spec->catfile($orig, $name); next if -d $from; my $to = File::Spec->catfile($dest, $name); copy($from, $to) or die "Couldn't copy $from,$to: $!\n"; } close ORIG; } # UNPACK_MBOX2MH # Unpack an mbox-file into an MH-directory. # This skips message-nr 13 for testing purposes. # Blanks before "From" are removed. sub unpack_mbox2mh($$) { my ($file, $dir) = @_; clean_dir($dir); mkdir $dir, 0700; my $count = 1; my $blank; open FILE, $file or die; open OUT, '>', File::Spec->devnull; while() { if( /^From / ) { close OUT; undef $blank; open OUT, ">$dir/".$count++ or die; $count++ if $count==13; # skip 13 for test next; # from line not included in file. } print OUT $blank if defined $blank; if( m/^\015?\012$/ ) { $blank = $_; next; } undef $blank; print OUT; } close OUT; close FILE; } # UNPACK_MBOX2MAILDIR # Unpack an mbox-file into an Maildir-directory. our @maildir_names = ( '8000000.localhost.23:2,' , '90000000.localhost.213:2,' , '110000000.localhost.12:2,' , '110000001.l.42:2,' , '110000002.l.42:2,' , '110000002.l.43:2,' , '110000004.l.43:2,' , '110000005.l.43:2,' , '110000006.l.43:2,' , '110000007.l.43:2,D' , '110000008.l.43:2,DF' , '110000009.l.43:2,DFR' , '110000010.l.43:2,DFRS' , '110000011.l.43:2,DFRST' , '110000012.l.43:2,F' , '110000013.l.43:2,FR' , '110000014.l.43:2,FRS' , '110000015.l.43:2,FRST' , '110000016.l.43:2,DR' , '110000017.l.43:2,DRS' , '110000018.l.43:2,DRST' , '110000019.l.43:2,FS' , '110000020.l.43:2,FST' , '110000021.l.43:2,R' , '110000022.l.43:2,RS' , '110000023.l.43:2,RST' , '110000024.l.43:2,S' , '110000025.l.43:2,ST' , '110000026.l.43:2,T' , '110000027.l.43:2,' , '110000028.l.43:2,' , '110000029.l.43:2,' , '110000030.l.43:2,' , '110000031.l.43:2,' , '110000032.l.43:2,' , '110000033.l.43:2,' , '110000034.l.43:2,' , '110000035.l.43:2,' , '110000036.l.43:2,' , '110000037.l.43:2,' , '110000038.l.43' , '110000039.l.43' , '110000040.l.43' , '110000041.l.43' , '110000042.l.43' ); sub unpack_mbox2maildir($$) { my ($file, $dir) = @_; clean_dir($dir); die unless @maildir_names==45; mkdir $dir or die; mkdir File::Spec->catfile($dir, 'cur') or die; mkdir File::Spec->catfile($dir, 'new') or die; mkdir File::Spec->catfile($dir, 'tmp') or die; my $msgnr = 0; open FILE, $file or die; open OUT, '>', File::Spec->devnull; my $last_empty = 0; my $blank; while() { if( m/^From / ) { close OUT; undef $blank; my $now = time; my $hostname = hostname; my $msgfile = File::Spec->catfile($dir , ($msgnr > 40 ? 'new' : 'cur') , $maildir_names[$msgnr++] ); open OUT, ">", $msgfile or die "Create $msgfile: $!\n"; next; # from line not included in file. } print OUT $blank if defined $blank; if( m/^\015?\012$/ ) { $blank = $_; next; } undef $blank; print OUT; } close OUT; close FILE; } # # Compare two lists. # sub compare_lists($$) { my ($first, $second) = @_; #warn "[@$first]==[@$second]\n"; return 0 unless @$first == @$second; for(my $i=0; $i<@$first; $i++) { return 0 unless $first->[$i] eq $second->[$i]; } 1; } # # Compare the text of two messages, rather strict. # On CRLF platforms, the Content-Length may be different. # sub compare_message_prints($$$) { my ($first, $second, $label) = @_; if($crlf_platform) { $first =~ s/Content-Length: (\d+)/Content-Length: /g; $second =~ s/Content-Length: (\d+)/Content-Length: /g; } is($first, $second, $label); } # # Strip message text down the things which are the same on all # platforms and all situations. # sub reproducable_text($) { my $text = shift; my @lines = split /^/m, $text; foreach (@lines) { s/((?:references|message-id|date|content-length)\: ).*/$1/i; s/boundary-\d+/boundary-/g; } join '', @lines; } # # Compare two outputs of thread details. # On CRLF platforms, the reported sizes are ignored. # sub compare_thread_dumps($$$) { my ($first, $second, $label) = @_; if($crlf_platform) { $first =~ s/^..../ /gm; $second =~ s/^..../ /gm; } is($first, $second, $label); } # # List directory # This removes '.' and '..' # sub listdir($) { my $dir = shift; opendir LISTDIR, $dir or return (); my @entities = grep !/^\.\.?$/, readdir LISTDIR; closedir LISTDIR; @entities; } # # Start POP3 server for 43pop3 tests # sub start_pop3_server($;$) { my $popbox = shift; my $setting = shift || ''; my $serverscript = File::Spec->catfile('43pop3', 'server'); # Some complications to find-out $perl, which must be absolute and # untainted for perl5.6.1, but not for the other Perl's. my $perl = $^X; unless(File::Spec->file_name_is_absolute($perl)) { my @path = split /\:|\;/, $ENV{PATH}; $perl = first { -x $_ } map { File::Spec->catfile($_, $^X) } @path; } $perl =~ m/(.*)/; $perl = $1; %ENV = (); open(my $server, "$perl $serverscript $popbox $setting|") or die "Could not start POP3 server\n"; my $line = <$server>; my $port = $line =~ m/(\d+)/ ? $1 : die "Did not get port specification, but '$line'"; ($server, $port); } # # START_POP3_CLIENT PORT, OPTIONS # sub start_pop3_client($@) { my ($port, @options) = @_; require Mail::Transport::POP3; Mail::Transport::POP3->new ( hostname => '127.0.0.1' , port => $port , username => 'user' , password => 'password' , @options ); } # # A piece of HTML text which is used in some tests. # our $raw_html_data = <<'TEXT'; My home page

    Life according to Brian

    This is normal text, but not in a paragraph.

    New paragraph in a bad way. And this is just a continuation. When texts get long, they must be auto-wrapped; and even that is working already.

    Silly subsection at once

    and another chapter

    again a section

    Normal paragraph, which contains an , some italics with linebreak and code

    And now for the preformatted stuff
       it should stay as it was
          even   with   strange blanks
      and indentations
    
    And back to normal text...
    • list item 1
      1. list item 1.1
      2. list item 1.2
    • list item 2
    TEXT 1; Mail-Box-2.118/tests/44imap/0000755000175000001440000000000012473604501016115 5ustar00markovusers00000000000000Mail-Box-2.118/tests/44imap/Definition.pm0000644000175000001440000000063012473604425020547 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. package MailBox::Test::44imap::Definition; use vars '$VERSION'; $VERSION = '2.118'; sub name {"Mail::Box::IMAP; imap folders"} sub critical {0} sub skip { !defined $ENV{USER} || $ENV{USER} ne 'markov' } 1; Mail-Box-2.118/tests/44imap/30flags.t0000644000175000001440000000650112473603434017547 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test flags conversion of IMAP4 folders. use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use Mail::Transport::IMAP4; my $mti = 'Mail::Transport::IMAP4'; BEGIN { eval { require Mail::IMAPClient }; if($@ =~ m/Can't locate/) { plan skip_all => 'requires Mail::IMAPClient'; exit(0); } eval { require Digest::HMAC_MD5 }; if($@ =~ m/Can't locate/) { plan skip_all => 'requires Digest::HMAC_MD5'; exit(0); } plan tests => 65; } ### ### Checking labels2flags ### sub expect_flags($$$) { my ($got, $expect, $text) = @_; my $errors = 0; my %got; $got{$_}++ for split " ", $got; if(grep {$_ > 1} values %got) { $errors++; ok(0, "found double, $text"); } else { ok(1, $text); } foreach my $e (split " ", $expect) { if(delete $got{$e}) { ok(1, "found $e") } else { $errors++; ok(0, "missing $e") } } if(keys %got) { ok(0, "got too much: ".join(" ", keys %got)); $errors++; } else { ok(1, "exact match"); } if($errors) { warn "$errors errors, expected '$expect' got '$got'\n"; } } my $flags = $mti->labelsToFlags(); expect_flags($flags, '', "Empty set"); $flags = $mti->labelsToFlags(seen => 1, flagged => 1, old => 1); expect_flags($flags, '\Seen \Flagged', "No old"); $flags = $mti->labelsToFlags( {seen => 1, flagged => 1, old => 1} ); expect_flags($flags, '\Seen \Flagged', "No old as hash"); $flags = $mti->labelsToFlags(seen => 1, flagged => 1, old => 0); expect_flags($flags, '\Seen \Flagged \Recent', "No old"); $flags = $mti->labelsToFlags( {seen => 1, flagged => 1, old => 0} ); expect_flags($flags, '\Seen \Flagged \Recent', "No old as hash"); $flags = $mti->labelsToFlags(seen => 1, replied => 1, flagged => 1, deleted => 1, draft => 1, old => 0, spam => 1); expect_flags($flags, '\Seen \Answered \Flagged \Deleted \Draft \Recent \Spam', "show all flags"); $flags = $mti->labelsToFlags(seen => 0, replied => 0, flagged => 0, deleted => 0, draft => 0, old => 1, spam => 0); expect_flags($flags, '', "show no flags"); ### ### Checking flagsToLabels ### sub expect_labels($$$) { my ($got, $expect, $text) = @_; my $gotkeys = join " ", %$got; my $expkeys = join " ", %$expect; # warn "expected '$expkeys' got '$gotkeys'\n"; # depends on predefined labels cmp_ok(scalar keys %$got, '==', 7, "$text; nr fields"); foreach my $k (keys %$got) { my $g = $got->{$k} || 0; my $e = $expect->{$k} || 0; cmp_ok($g, '==', $e, "got $k"); } foreach my $k (keys %$expect) { my $g = $got->{$k} || 0; my $e = $expect->{$k} || 0; cmp_ok($g, '==', $e, "expect $k"); } } my $labels = $mti->flagsToLabels('REPLACE'); expect_labels $labels, {old => 1}, "flagsToLabels: Empty set"; $labels = $mti->flagsToLabels(REPLACE => qw[\Seen \Flagged] ); expect_labels $labels , {old => 1, seen => 1, flagged => 1} , "flagsToLabels: Empty set"; $labels = $mti->flagsToLabels(REPLACE => qw[\Seen \Answered \Flagged \Deleted \Draft \Recent \Spam] ); expect_labels $labels , { seen => 1, replied => 1, flagged => 1, deleted => 1 , draft => 1, spam => 1 } , "show all labels"; exit 0; Mail-Box-2.118/tests/44imap/20write.t0000644000175000001440000000535412473603434017611 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test reading of IMAP4 folders. # The environment has some requirements: # On Debian: # adduser -d /tmp/imaptest imaptest # /etc/cram-md5.pwd: # imaptesttestje # touch /var/mail/imaptest # chown $USER /var/mail/imaptest # user running the tests # .... and a running imapd # # On SuSE 8.2 # useradd -d /tmp/imaptest imaptest # /etc/cram-md5.pwd: # imaptesttestje # touch /var/spool/mail/imaptest # chown $USER /var/spool/mail/imaptest # user running the tests # .... and a running imapd, which requires the start of xinetd and # enabling the imap service via YaST2 use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use File::Compare; use File::Copy; use File::Spec::Functions; use Mail::Box::IMAP4; BEGIN { if(!$ENV{USER} || $ENV{USER} ne 'markov') { plan skip_all => 'Only tested on markov\'s platform'; } plan tests => 18; } my $user = 'imaptest'; my $password = 'testje'; my $server = 'localhost'; my $port = 143; my @connect = ( username => $user, password => $password , server_name => $server, server_port => $port ); my $home = "/tmp/$user"; my $inbox = "/var/mail/$user"; # Prepare home directory -d $home or mkdir $home or die "Cannot create $home: $!\n"; # Prepare INBOX copy $unixsrc, $inbox or die "Cannot create $inbox: $!\n"; # # The folder is read. # my $folder = Mail::Box::IMAP4->new ( @connect , folder => 'INBOX' , lock_type => 'NONE' , access => 'rw' ); ok(defined $folder, 'check success open folder'); exit 1 unless defined $folder; ok($folder->writeable); cmp_ok($folder->messages , "==", 45, 'found all messages'); my $msg = Mail::Message->build(From => 'me', data => "Hi\n"); ok(defined $msg, 'build new message to append'); isa_ok($msg, 'Mail::Message'); my $m = $folder->addMessage($msg); isa_ok($m, 'Mail::Box::IMAP4::Message', 'coercion successful'); isa_ok($msg, 'Mail::Box::IMAP4::Message'); ok(!defined $m->unique, 'ids only for "native" messages'); cmp_ok($folder->messages , "==", 46, 'found the new message'); # # Play around with the message, and see nothing breaks # ok($m->label('reply' => 1)); ok($m->label('reply')); ok($m->label('reply' => 0)); ok(!$m->label('reply')); is($m->get('From'), 'me'); is($m->body->string, "Hi\n"); # Now try to save it, and reopen ok($folder->close, 'closing folder'); $folder = Mail::Box::IMAP4->new ( @connect , folder => 'INBOX' , lock_type => 'NONE' , access => 'r' ); ok(defined $folder, 'check success re-open folder'); cmp_ok($folder->messages , "==", 46, 'found one more messages'); Mail-Box-2.118/tests/44imap/10read.t0000644000175000001440000001110312473603434017356 0ustar00markovusers00000000000000#!/usr/bin/env perl # # Test reading of IMAP4 folders. # The environment has some requirements: # On Debian: # adduser -d /tmp/imaptest imaptest # /etc/cram-md5.pwd: # imaptesttestje # touch /var/mail/imaptest # chown imaptest.users /var/mail/imaptest # chmod 0664 /var/mail/imaptest # user running the tests # .... and a running imapd # # On SuSE 8.2 # useradd -d /tmp/imaptest imaptest # /etc/cram-md5.pwd: # imaptesttestje # touch /var/spool/mail/imaptest # chown imaptest.users /var/mail/imaptest # chmod 0664 /var/mail/imaptest # user running the tests # .... and a running imapd, which requires the start of xinetd and # enabling the imap service via YaST2 use strict; use warnings; use lib qw(. .. tests); use Tools; use Test::More; use File::Compare; use File::Copy; use File::Spec::Functions; use Mail::Box::IMAP4; BEGIN { if(!$ENV{USER} || $ENV{USER} ne 'markov') { plan skip_all => 'Only tested on markov\'s platform'; } plan tests => 40; } my $user = 'imaptest'; my $password = 'testje'; my $server = 'localhost'; my $port = 143; my @connect = ( username => $user, password => $password , server_name => $server, server_port => $port ); my $home = "/tmp/$user"; my $inbox = "/var/mail/$user"; # Prepare home directory -d $home or mkdir $home or die "Cannot create $home: $!\n"; # Prepare INBOX copy $unixsrc, $inbox or die "Cannot create $inbox: $!\n"; ok(Mail::Box::IMAP4->foundIn(folder => 'imap://'), 'check foundIn'); # # The folder is read. # my $folder = Mail::Box::IMAP4->new ( @connect , folder => 'INBOX' , lock_type => 'NONE' , cache_labels => 'YES' ); ok(defined $folder, 'check success open folder'); exit 1 unless defined $folder; isa_ok($folder, 'Mail::Box::IMAP4'); cmp_ok($folder->messages , "==", 45, 'found all messages'); is($folder->organization, 'REMOTE', 'folder organization NET'); # # Take one message. # my $message = $folder->message(2); ok(defined $message, 'take one message'); isa_ok($message, 'Mail::Box::Message'); isa_ok($message, 'Mail::Box::IMAP4::Message'); ok($message->head->isDelayed); cmp_ok($message->recvstamp, '==', 950134500, 'try recvstamp'); cmp_ok($message->size, '==', 3931, 'try fetch size'); ok($message->head->isDelayed, 'still delayed'); # # Take a few messages. # my @some = $folder->messages(3,7); cmp_ok(@some, "==", 5, 'take range of messages'); isa_ok($some[0], 'Mail::Box::Message'); isa_ok($some[0], 'Mail::Box::IMAP4::Message'); # # None of the messages is parsed, yet # my $parsed = 0; $parsed ||= $_->isParsed foreach $folder->messages; cmp_ok($parsed, '==', 0, 'no messages parsed'); # # Load a message # my $m34 = $folder->message(34); ok($m34->isDelayed, 'msg 34 delayed'); ok($m34->head->isDelayed, 'head delayed'); ok($m34->body->isDelayed, 'body delayed'); isa_ok($m34->head, 'Mail::Message::Head::Delayed'); isa_ok($m34->body, 'Mail::Message::Body::Delayed'); my $s = $m34->body->string; $s =~ s/\r\n/\n/g; is($s, "subscribe magick-developer\n", 'simple body'); # # Try to delete a message # ok(!$folder->message(2)->deleted, 'msg 2 not yet deleted'); $folder->message(2)->delete; ok($folder->message(2)->deleted, 'msg 2 flagged for deletion'); cmp_ok($folder->messages , "==", 45, 'deletion not performed yet'); cmp_ok($folder->messages('ACTIVE') , "==", 44, 'less messages ACTIVE'); cmp_ok($folder->messages('DELETED') , "==", 1, 'more messages DELETED'); my $replied = 0; $_->label('replied') && $replied++ for $folder->messages; cmp_ok($replied, '==', 12, 'read replied flags'); $folder->message(0)->label(replied => 1); $replied = 0; $_->label('replied') && $replied++ for $folder->messages; cmp_ok($replied, '==', 13, 'set replied flag'); # # Take a message # my $m = $folder->message(8); ok(defined $m, 'take message 8'); ok($m->isDelayed); ok($m->head->isDelayed); ok($m->body->isDelayed); my $subject = $m->subject; is($subject, 'Resize with Transparency', 'realized 8'); isa_ok($m->head, 'Mail::Message::Head::Complete'); ok($m->body->isDelayed); my $body = $m->body; ok($body->isDelayed, 'got some body'); $s = $body->string; ok(defined $s, 'got a string'); $s =~ s/\r//g; is(substr($s, 0, 19), "\nHi,\n\nMaybe someone"); isa_ok($body, 'Mail::Message::Body'); $folder->close(write => 'NEVER'); exit 0; Mail-Box-2.118/META.yml0000644000175000001440000000151612473604501015131 0ustar00markovusers00000000000000--- abstract: 'E-mail handling' author: - 'Mark Overmeer' build_requires: ExtUtils::MakeMaker: 0 configure_requires: ExtUtils::MakeMaker: 0 dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 6.64, CPAN::Meta::Converter version 2.120630' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Mail-Box no_index: directory: - t - inc requires: Date::Format: 0 Date::Parse: 0 Devel::GlobalDestruction: 0.09 Digest::HMAC_MD5: 0 Encode: 2.26 Errno: 0 File::Remove: 0.20 File::Spec: 0.7 IO::Scalar: 0 MIME::Base64: 0 MIME::Types: 1.004 Mail::Address: 0 Object::Realize::Later: 0.19 Scalar::Util: 1.13 Sys::Hostname: 0 TAP::Harness: 3.00 Test::More: 0.47 Test::Pod: 1.00 Time::Zone: 0 URI: 1.23 User::Identity: 0.94 version: 2.118 Mail-Box-2.118/examples/0000755000175000001440000000000012473604501015473 5ustar00markovusers00000000000000Mail-Box-2.118/examples/takelarge.pl0000644000175000001440000000322412473603434017774 0ustar00markovusers00000000000000#!/usr/bin/perl # Demonstrates how to select some messages from one folder, and move # them to a different folder. In this case, the first argument is # the existing folder, the second will contain the messages larger # than the specified size: # # takelarge.pl infolder outfolder minsize # ******************************************************************* # * WARNING: the content of infolder will be reduced!!! Don't do this # * on your real folders.... it's only a demo # ******************************************************************* # This code can be used and modified without restriction. # Mark Overmeer, , 9 nov 2001 use warnings; use strict; use lib '..', '.'; use Mail::Box::Manager 2.00; # # Get the command line arguments. # die "Usage: $0 folder-from folder-to size\n" unless @ARGV==3; my ($infile, $outfile, $size) = @ARGV; # # Open the folder # my $mgr = Mail::Box::Manager->new; my $inbox = $mgr->open ( $infile , access => 'rw' # to update deleted , extract => 'ALWAYS' # read all bodies immediately: faster ); die "Cannot open $infile to read: $!\n" unless defined $inbox; my $outbox = $mgr->open ( $outfile , access => 'a' # append, , create => 1 # create if not existent ); die "Cannot open $outfile to write: $!\n" unless defined $outbox; foreach my $message ($inbox->messages) { next if $message->size < $size; $mgr->moveMessage($outbox, $message); print 'Moved "',$message->get('Subject') || '' , '": ', $message->size, " bytes.\n"; } # # Finish # #$inbox->close; #$outbox->close; $mgr->closeAllFolders; Mail-Box-2.118/examples/strip-spam-markup.pl0000644000175000001440000001537512473603434021443 0ustar00markovusers00000000000000#!/usr/bin/perl # # Usage: # # strip-spam-markup.pl mbox # # This script reads a mailbox and strips header fields that may have # been added by various SPAM and mail filtering programs. If the SPAM # filter program attached the original message as an RFC822 message part, # the original message will be used, and any other message parts introduced # by the SPAM filter program will be ignored. # # Author: Gary Funck , 2010-08-22 # This code can be used and modified without restriction. # use strict; use warnings; use File::Remove 'remove'; use Mail::Box::Manager; use Mail::Message::Head::SpamGroup; use aliased 'Mail::Box::Manager' => 'MBM'; use aliased 'Mail::Message::Head::SpamGroup' => 'MMHS'; my $SA; # If SpamAssassin is installed, we will use # its remove_spamassassin_markup function. if (eval 'require Mail::SpamAssassin;') { $SA = new Mail::SpamAssassin; } # The following sub's perform rewrites, and are # called from $m->rebuild, below. # See: Mail::Message::Construct::Rebuild sub use_orig_msg_part ($$) { my ($self, $part) = @_; for my $p ($part->head->isMultipart ? $part->body->parts : ($part)) { next unless $p->body->isNested; my $content_type = $p->contentType; my $content_description = $p->get('Content-Description'); if (defined($content_type) && defined($content_description) && $content_type eq 'message/rfc822' && $content_description =~ /^original message/i) { # Use the nested original message body. $part->body($p->body->nested->body); last; } } return $part; } sub remove_dspam_sig_part ($$) { my ($self, $part) = @_; my $container = $part->container; my $content_type = $part->contentType; if (defined($container) && $container->isMultipart && defined($content_type) && $content_type eq 'text/plain') { my $x_dspam_sig = $part->head->get('X-DSPAM-Signature'); # delete this part if it has a DSPAM signature header. return undef if defined $x_dspam_sig; } return $part; } sub remove_dspam_sig_text ($$) { my ($self, $part) = @_; if ($part->body->isText && !($part->isMultipart || $part->body->isNested)) { # See: Mail::Message::Body::Construct $part->body($part->body->foreachLine( sub {my $line = $_; $line =~ s/!DSPAM:\s*(?:\d+,)?[[:xdigit:]]+!//g; return $line;})); } return $part; } # # DSPAM Headers: # X-DSPAM-Confidence: 0.5138 # X-DSPAM-Factors: 15, # X-DSPAM-Improbability: 1 in 107 chance of being ham # X-DSPAM-Probability: 1.0000 # X-DSPAM-Processed: Fri Jan 20 14:51:41 2006 # X-DSPAM-Reclassified # X-DSPAM-Result: Spam # X-DSPAM-Signature: 43d13f4d154401696382214 # X-DSPAM-User # DSPAM Signature in body: # !DSPAM:\s(\d+,)?[[:xdigit:]]+! # MMHS->fighter('DSPAM', fields => qr/^X-DSPAM-/i, isspam => sub { my ($sg, $head) = @_; if (my $result = head->get('X-DSPAM-Result')) { return $result =~ /^(?:SPAM|BL[AO]CKLISTED|VIRUS)$/i; } return 0; }, version => sub { my ($sg, $head) = @_; if (my $scan_header = $head->get('X-DSPAM-Result')) { # DSPAM doesn't supply a header with its version number. my ($software, $version) = qw/DSPAM 0.0/; return ($software, $version); } return (); } ); # MIMEDefang headers (at our installation): # (There are no standard MIMEDefang headers per se.) # X-Spam-Score: 7.872 (*******) # DATE_IN_PAST_96_XX,FORGED_MUA_OUTLOOK,MSOE_MID_WRONG_CASE,SPF_SOFTFAIL # X-Scanned-By: MIMEDefang 2.70 on 198.2.168.1 MMHS->fighter('MIMEDefang', fields => qr/^(?:X-Scanned-By|X-Spam-Score)/i, isspam => sub { my ($sg, $head) = @_; if (my $score_header = $head->get('X-Spam-Score')) { if (my ($spam_score) = ($score_header =~ /^(\d+(?:\.\d+)?)/)) { return $spam_score >= 5.0; } } return 0; }, version => sub { my ($sg, $head) = @_; if (my $scan_header = $head->get('X-Scanned-By')) { if (my ($software, $version) = ($scan_header =~ /^(\S+)\s+(\d+(?:\.\d+)?)/i)) { return ($software, $version); } } return (); } ); # # Get the command line arguments. # die "Usage: $0 mailbox\n" . " (where 'mailbox' may be either a maildir or mbox file)\n" unless @ARGV==1; my $filename = shift @ARGV; # # Open the folders # my $outfilename = "${filename}.strip"; my $recursive = \1; remove($recursive, $outfilename) if (-e $outfilename); my $mgr = MBM->new; # Open the original folder; don't parse message body unless needed. my $folder = $mgr->open($filename , access => 'r', extract => 'LAZY') or die "Cannot open $filename: $!\n"; my $outbox = $mgr->open($outfilename, access => 'a', create => 1) or die "Cannot open $outfilename to write: $!\n"; my $nr_msgs = $folder->nrMessages; print "Mail folder '$folder' contains $nr_msgs", " message" . ($nr_msgs > 1 ? 's' : ''), ":\n"; for my $msg ($folder->messages) { printf "%6d. %s\n", $msg->seqnr+1, $msg->subject; my $m = $msg->clone; # If the SpamAssassin module is available, # and there are SA artifacts in the message, # then let SA clean up the message first, because # the rules for cleaning up SA markup can be rather complex. if (defined($SA) && MMHS->from($m, types => ['SpamAssassin'])) { # See: Mail::Message::Construct::Text my $msg_text = $m->string; my $SA_msg = $SA->parse($msg_text); $msg_text = $SA->remove_spamassassin_markup($SA_msg); # See: Mail::Message::Construct::Read $m = Mail::Message->read($msg_text); } # See: Mail::Message::Construct::Rebuild $m->rebuild(keep_message_id => 1, extra_rules => [\&use_orig_msg_part, \&remove_dspam_sig_part, \&remove_dspam_sig_text]); my $head = $m->head; # Remove SPAM mark up that is specific to each "SPAM fighter" tool. # See: Mail::Message::Head::SpamGroup $head->removeSpamGroups; # To be on the safe side, remove all the 'X-' fields. $head->removeFields(qr/^X-/i); my $subj = $head->get('Subject'); # Remove various Subject line mark ups that are # sometimes used to indicate a possible SPAM message. if (defined($subj) && ($subj =~ s/\[SPAM(?::\s*\d+\.\d+)?\]\s*//gi | $subj =~ s/\bSPAM:\s+//gi | $subj =~ s/\[?\*+\s*SPAM\s*\*+\]?//gi | $subj =~ s/\{SPAM\??\}\s*//gi)) { $head->delete('Subject'); $head->add("Subject: $subj"); } if ($outbox->messageId($m->messageId)) { # Assign a new internal message ID. # If we don't do this, the message will be detected # as a duplicate, and will not be written to the # output mailbox. print "\tWARNING: Duplicate message ID\n"; $m->takeMessageId(undef); } $m->printStructure(select, "\t"); $outbox->addMessage($m); } $folder->close(write => 'NEVER'); $outbox->close(write => 'ALWAYS'); Mail-Box-2.118/examples/unpack.pl0000644000175000001440000000404012473603434017313 0ustar00markovusers00000000000000#!/usr/bin/perl # # Read a message from stdin, for instance from a '.forward' file # | unpack.pl # The files get unpacked. # This code can be used and modified without restriction. # Mark Overmeer, , 29 jan 2010 use warnings; use strict; use Errno 'EEXIST'; use POSIX 'strftime'; use Mail::Message (); use MIME::Types (); ### configure this: my $workdir = '/tmp/incoming'; # create the common work directory -d $workdir or mkdir $workdir or die "cannot create unpack directory $workdir: $!\n"; # Create a unique unpack directory for this message # More than one message can arrive in a second, even in parallel my $unpackdir; my $now = strftime "%Y%m%d-%T", localtime; UNIQUE: for(my $unique = 1; ; $unique++ ) { $unpackdir = "$workdir/$now-$unique"; mkdir $unpackdir and last; $!==EEXIST or die "cannot create unpack directory $unpackdir: $!"; } # Read the message from STDIN my $from_line = <>; # usually added by the local MTA my $msg = Mail::Message->read(\*STDIN); # Shows message structure # $msg->printStructure; my $mime_types = MIME::Types->new; my $partnr = '00'; foreach my $part ($msg->parts('RECURSE')) { my $body = $part->decoded; my $type = $mime_types->type($body->mimeType); # some message parts will contain a filename my $dispfn = $body->dispositionFilename || ''; my $partname = $partnr++ . (length $dispfn ? ".$dispfn" : ''); # try to find a nice filename extension if not yet known unless($partname =~ /\.\w{3,5}$/) { my $ext = $type ? ($type->extensions)[0] : undef; $partname .= ".$ext" if $ext; } my $filename = "$unpackdir/$partname"; #print "$filename\n"; if($type->isBinary) { open OUT, '>:raw', $filename or die "cannot create binary part file $filename: $!"; } else { open OUT, '>:encoding(utf-8)', $filename or die "cannot create text part file $filename: $!"; } $body->print(\*OUT); close OUT or warn "write errors to $filename: $!"; } Mail-Box-2.118/examples/open.pl0000644000175000001440000000202212473603434016771 0ustar00markovusers00000000000000#!/usr/bin/perl # Demonstration on how to use the manager to open folders, and then # to print the headers of each message. # # This code can be used and modified without restriction. # Mark Overmeer, , 9 nov 2001 use warnings; use strict; use lib '..', '.'; use Mail::Box::Manager 2.00; # # Get the command line arguments. # die "Usage: $0 folderfile\n" unless @ARGV==1; my $filename = shift @ARGV; # # Open the folder # my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open ( $filename , extract => 'LAZY' # never take the body unless needed ); # which saves memory and time. die "Cannot open $filename: $!\n" unless defined $folder; # # List all messages in this folder. # my @messages = $folder->messages; print "Mail folder $filename contains ", scalar @messages, " messages:\n"; my $counter = 1; foreach my $message (@messages) { printf "%3d. ", $counter++; print $message->get('Subject') || '', "\n"; } # # Finish # $folder->close; Mail-Box-2.118/examples/reply.pl0000644000175000001440000000551212473603434017172 0ustar00markovusers00000000000000#!/usr/bin/perl # Demonstration on how to create a reply based on some message in # some folder. # # Usage: # ./reply.pl folder messagenr [signaturefile] # # This code can be used and modified without restriction. # Mark Overmeer, , 9 nov 2001 use warnings; use strict; use lib '..', '.'; use Mail::Box::Manager 2.00; use Mail::Message::Body::Lines; use Mail::Message::Construct; # # Get the command line arguments. # die "Usage: $0 folderfile messagenr [signaturefile]\n" unless @ARGV==3 || @ARGV==2; my ($filename, $msgnr, $sigfile) = @ARGV; # You may create different kinds of objects to store body data, but # usually the ::Lines object is ok. If you handle a body as 'reply' # does, you want fast access to the separate lines. Preferably use # ::File when the data is binary, and ::String when it is to be # converted as a whole. Each type will work, but the performance will # differ. my $bodytype = 'Mail::Message::Body::Lines'; # # Open the folder # my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open ( $filename , extract => 'LAZY' # never take the body unless needed ); # which saves memory and time. die "Cannot open $filename: $!\n" unless defined $folder; # # Get the message to reply to # die "There are only ",scalar $folder->messages, " messages in $filename.\n" if $msgnr > $folder->messages; my $orig = $folder->message($msgnr); # # Create the reply prelude. # The default only produces the replyPrelude line, but we extend it # a little. # my $prelude = <<'PRELUDE'; Dear friend, This automatically produced message is just a reply on yours. Please do not be disturbed. Best wishes, Me, myself, and I. PRELUDE $prelude .= $orig->replyPrelude($orig->get('From')); # The usual quote line. # # The postlude is appended after the inlined source text. It is # less visible than the prelude, because the quoted source text # may be very long. However, when include is ATTACH on NO, the # body is turned into one line, so this will be neat. # my $postlude = <<'POST'; Herewith, I reply to your message, and I intend to ignore it completely unless you plan to complain to my boss about that. See you (hope not) POST # # Create a new signature # my $signature; if(defined $sigfile) { $signature = $bodytype->new ( mime_type => 'text/x-vCard' , file => $sigfile ); } else { $signature = $bodytype->new(mime_type => 'text/x-vCard', data => <<'SIG'); This is my signature. It is attached, in case we create a multipart reply, and inlined otherwise. SIG } # # Create reply # The original signature is stripped, the message is quoted, and a # new signature is added. # my $reply = $orig->reply ( prelude => $prelude , postlude => $postlude , signature => $signature ); # And now $reply->print; # or $reply->send; $folder->close; Mail-Box-2.118/examples/send.pl0000644000175000001440000000206212473603434016765 0ustar00markovusers00000000000000#!/usr/bin/perl # Demonstration on sending simple messages. # # This code can be used and modified without restriction. # Mark Overmeer, , 20 nov 2001 # 16 jan 2003, added some options use warnings; use strict; use lib '..', '.'; use Mail::Box; # # Get the command line arguments. # die "Usage: $0 email-address\n" unless @ARGV==1; my $email = shift @ARGV; # # Create a simple message # my $message = Mail::Message->build ( From => 'me@localhost.com' , To => $email , Subject => 'A sunny day' # , Cc => 'NINJA , Mark Overmeer ' , data => <<'TEXT' This is an automatically generated message. I hope you have a nice day. TEXT ); # # Transmit the message, leaving the decission how over to the # Mail::Transmit package. # warn "Sending returned error $!\n" unless $message->send; $message->send ( via => 'sendmail' # you can do even without this line # , trace => 'NOTICE' # , executable => 'C:\lib\sendmail.exe' # , debug_smtp => 1 # , timeout => 300 # , retry => 5 ); Mail-Box-2.118/examples/multipart.pl0000644000175000001440000000261112473603434020055 0ustar00markovusers00000000000000#!/usr/bin/perl # Print the types of messages in the folder. Multi-part messages will # be shown with all their parts. # # This code can be used and modified without restriction. # Mark Overmeer, , 9 nov 2001 use warnings; use strict; use lib '..', '.'; use Mail::Box::Manager 2.00; sub show_type($;$); # # Get the command line arguments. # die "Usage: $0 folderfile\n" unless @ARGV==1; my $filename = shift @ARGV; # # Open the folder # my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open ( $filename , extract => 'LAZY' # never take the body unless needed ); # which saves memory and time. die "Cannot open $filename: $!\n" unless defined $folder; # # List all messages in this folder. # my @messages = $folder->messages; print "Mail folder $filename contains ", scalar @messages, " messages:\n"; my $counter = 1; foreach my $message (@messages) { printf "%3d. ", $counter++; print $message->get('Subject') || '', "\n"; show_type $message; } sub show_type($;$) { my $msg = shift; my $indent = (shift || '') . ' '; # increase indentation print $indent, " type=", $msg->get('Content-Type'), ', ' , $msg->size, " bytes\n"; if($msg->isMultipart) { foreach my $part ($msg->parts) { show_type $part, $indent; } } } # # Finish # $folder->close; Mail-Box-2.118/examples/smaller.pl0000644000175000001440000000440612473603434017477 0ustar00markovusers00000000000000#!/usr/bin/perl # Demonstration on reducing the size of a folder. # # This code can be used and modified without restriction. # Mark Overmeer, , 12 jul 2003 use warnings; use strict; use lib ('../lib', 'lib'); use Mail::Box::Manager; use Mail::Message; use List::Util 'sum'; my $for_real = 0; # set to 'true' to make changes sub size($) { Mail::Message->shortSize($_[0]) } # nice output of value # # Get the command line arguments. # die "Usage: $0 folder\n" unless @ARGV==1; my $name = shift @ARGV; my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open ( $name , access => ($for_real ? 'rw' : 'r') ); die "Cannot open folder $name" unless $folder; print "** Dry run: no changes made to $name\n" unless $for_real; my $msgs = $folder->messages; my $size = $folder->size; print "Folder contains $msgs messages at start, in total about ", size($size), " bytes\n"; foreach my $msg ($folder->messages) { $msg->head->removeResentGroups; } my $newsize = $folder->size; print "After removal of resent groups, the folder is about ", size($newsize), " bytes\n"; my $resentsize = $size - $newsize; foreach my $msg ($folder->messages) { $msg->head->removeListGroup; } my $newsize2 = $folder->size; print "After removal of list groups, the folder is only ", size($newsize2), " bytes\n"; my $listsize = $newsize - $newsize2; foreach my $msg ($folder->messages) { $msg->head->removeSpamGroups; } my $finalsize = $folder->size; print "After removal of spam groups, the folder is only ", size($finalsize), " bytes\n"; my $spamsize = $newsize2 - $finalsize; # Final statistics sub percent($$) { my ($part, $size) = @_; sprintf "%4.1f%% (%s)", ($part*100)/$size, size($part); } my $sizeheads = sum map {$_->head->size} map {$_->parts} $folder->messages; print ' resent headers were ', percent($resentsize,$size), "\n", ' list headers were ', percent($listsize,$size), "\n", ' spam headers were ', percent($spamsize,$size), "\n", ' remaining headers are ', percent($sizeheads, $size), "\n", ' size of bodies is ', percent($finalsize-$sizeheads, $size), "\n"; # End if($for_real) { $folder->close } else { $folder->close(write => 'NEVER') } exit 0; Mail-Box-2.118/examples/grep.pl0000644000175000001440000000165012473603434016773 0ustar00markovusers00000000000000#!/usr/bin/perl # Demonstration of a simple search. # # This code can be used and modified without restriction. # Mark Overmeer, , 17 feb 2002 # Updated 16 jan 2003 to work more like unix-grep syntax use warnings; use strict; use lib '..', '.'; use Mail::Box::Manager 2.008; use Mail::Box::Search::Grep; # # Get the command line arguments. # die "Usage: $0 pattern mailboxes\n" unless @ARGV >= 2; my ($pattern, @mailboxes) = @ARGV; my $mgr = Mail::Box::Manager->new; foreach my $mailbox (@mailboxes) { my $folder = $mgr->open($mailbox); unless(defined $folder) { warn "*** Cannot open folder $mailbox.\n"; next; } print "*** Scanning through $mailbox\n" if @mailboxes > 1; my $grep = Mail::Box::Search::Grep->new ( in => 'MESSAGE' , match => qr/$pattern/ , details => 'PRINT' ); $grep->search($folder); $folder->close; } Mail-Box-2.118/examples/build.pl0000644000175000001440000000343112473603434017134 0ustar00markovusers00000000000000#!/usr/bin/perl # Demonstration on how to use create complex messages from building # bricks. # # This code can be used and modified without restriction. # Mark Overmeer, , 16 nov 2001 use warnings; use strict; use lib '..', '.'; use Mail::Box::Manager 2.00; # Not needed for the build method, which is demonstrated here, but # for the structures used to create the demonstration. use Mail::Message::Body; # # Get the command line arguments. # die "Usage: $0 outfile\n" unless @ARGV == 1; my $outfile = shift @ARGV; # # There are many ways you can add data to new messages. Below is # a example which uses files which may not be available on you machine. # Modify the names for your system. # my $anybody = Mail::Message::Body->new(data => <<'A_FEW_LINES'); Just a few lines to show that you can add prepared bodies to the message which is built. A_FEW_LINES my $vcard = Mail::Message::Body->new ( mime_type => 'text/x-vcard', data => <<'SIG'); This is a signature. It has a different type. SIG # # The next part is what I want to demonstrate # my $message = Mail::Message->build ( From => 'me@example.com' , To => 'you@demosite.net' , 'In-Reply-To' => '' , data => <<'FIRST_PART' This is the first part of the multi-part message which will be created. If only one source of data is specified, a single part message is produced. FIRST_PART , file => '/etc/passwd' , file => '/usr/src/linux/Documentation/logo.gif' , attach => $anybody , attach => $vcard ); # # The message is ready to be printed, transmitted, and/or added to # a folder. # die "Cannot create $outfile: $!\n" unless open OUT, '>', $outfile; $message->print(\*OUT); # $message->send; # $folder->addMessage($message); Mail-Box-2.118/examples/strip-attachments.pl0000644000175000001440000000651712473603434021517 0ustar00markovusers00000000000000#!/usr/bin/perl # # $Id: strip-attachments.pl,v 1.4 2002/11/30 12:14:01 wrk Exp $ # # Strip attachments using Mail::Box module. # # Usage: # # perl strip-attachments.pl mbox # # This script reads a mailbox ($ARG1) and writes attachments larger than # 16K to a folder (./attachments/). Next it deletes the attachment from # the E-mail and writes it to a file named $ARG1.stripped. # # By Pjotr Prins , $Date: 2002/11/30 12:14:01 $ # # This code can be used and modified without restriction. # Code based on example by Mark Overmeer, , 9 nov 2001 # In this example, the stripped data is written to a different folder. # You may not need that (but please be careful: test your script well!) # Simply remove everything related to $outbox and $outfilename, and open # the source folder with access => 'rw' # You may want to have a look at Mail::Message::Convert::Rebuild, which # the provides the $msg->rebuild() method. # BE WARNED: when different messages specify the same filename for a part, # they will overwrite another... you may want a message sequency number in # the path of the output file. use warnings; use strict; use lib '..', '.'; use Mail::Box::Manager; # everything else will auto-compile when used use File::Basename 'basename'; use File::Spec; my $attachments = 'attachments'; # # Get the command line arguments. # die "Usage: $0 folderfile\n" unless @ARGV==1; my $filename = shift @ARGV; # # Create Attachments directory if non existent # -d $attachments or mkdir $attachments or die "Cannot create directory $attachments\n"; # # Open the folders # my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open ( $filename , extract => 'LAZY' # never take the body unless needed ); # which saves memory and time. die "Cannot open $filename: $!\n" unless defined $folder; my $outfilename = "$filename.stripped"; # die "File $outfilename exists!" if -e $outfilename; my $outbox = $mgr->open ( $outfilename , access => 'a' # append, , create => 1 # create if not existent ); die "Cannot open $outfilename to write: $!\n" unless defined $outbox; print "Mail folder $folder contains ", $folder->nrMessages, " messages:\n"; foreach my $message ($folder->messages) { printf "%3d. %s\n", $message->seqnr, $message->subject; $message->printStructure; my $m = $message->clone; unless($m->isMultipart) { $outbox->addMessage($m); next; } foreach my $part ($m->parts) { # Strip attachments larger than 16K. Another example would be: # next if $part->body->mimeType ne 'text/plain'; next unless $part->body->size > 16384; print "\n**** Stripping Attachment "; # ,$part->head,"\n"; # Warning: double names possible! Put each message in seperate dir my $attachment = $part->body->dispositionFilename($attachments); print $attachment,"\n"; unless(-f $attachment) # Write attachment to file { open(FH, '>', $attachment) or die "ERROR: cannot write attachment to $attachment: $!\n"; $part->decoded->print(\*FH); close(FH) or die "ERROR: writing to $attachment: $!\n"; } $part->delete; } $outbox->addMessage($m); } $mgr->closeAllFolders; Mail-Box-2.118/README.todo0000644000175000001440000000332712473603434015512 0ustar00markovusers00000000000000 TODO: This program was originally written in December 2000. Then a total redesign was made, which was released in December 2001. The file TODO.v2 lists holes in the current implementation. In this file, more long-term plans are listed. Plans for the (near?) future: * Thread lint Currently, threads are only detected based on some fields in the message header which are dedicated for this (the In-Reply-To and the References field), however, there are many more ways to try to correct things if these are not present. If a message does not contain the two mentioned fields, then look for a message which is at most a few days younger, whose sender is in the recipient-list of the current message, and where parts of the message are quoted (preceded by some symbols). * Persistent external files Extracting large message-parts into persistent external files. Mime::Entity puts attachments in external files during parsing. When the message is put in a folder again, the content is glued back into the folder. It should be nice to keep them external, such that the folder-file is much smaller, and parsing done quickly. * Many more folder-types I have a long wishlist of older-types. However, my knowledge on how they work is limited. Furthermore, I do not have test-data on them. - Emaul (? for compatibly with Mail::Folder) - News NNTP - Outlook writting... (reading is already available in ::Dbx) - Exchange - Netscape - Zip Compressed folders - Encrypt - DBI Database Any more? One of the main reasons that these are not implemented, is that my knowledge on how they work is insufficient. * Maildir quota * Cooperation with OpenPGP * MD5 checksums and more Mail-Box-2.118/Makefile.PL0000644000175000001440000001745612473603434015650 0ustar00markovusers00000000000000use ExtUtils::MakeMaker; require 5.006_001; use IO::Handle; my $VERSION = '2.118'; # 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 %prereq = ( Date::Format => 0 , Date::Parse => 0.0 , Digest::HMAC_MD5 => 0.0 , Encode => 2.26 , Errno => 0.0 , File::Remove => '0.20' , File::Spec => 0.7 , IO::Scalar => 0.0 , Mail::Address => 0.0 , MIME::Base64 => 0.0 , MIME::Types => 1.004 , Object::Realize::Later => 0.19 , 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'; * 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. REQUIRED my @errors; foreach my $module (sort keys %prereq) { my $reqversion = $prereq{$module}; eval "require $module"; if($@ && $@ =~ m/^Can't locate /) { print " $module is not yet installed\n" } elsif($@) { print " $module produced an error:\n$@"; push @errors, $module; } elsif($module->VERSION < $reqversion) { print " $module version ",$module->VERSION , " is outdated; requires $reqversion\n"; } else { print " $module version ",$module->VERSION , " is ok (required is $reqversion)\n"; } } if($errors) { die <<'FIX'; *** ERROR! You have to install @errors manually, *** before you can retry to install MailBox. 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 , AUTHOR => 'Mark Overmeer' , ABSTRACT => 'E-mail handling' , PREREQ_PM => \%prereq , LICENSE => 'perl' ); ### used by oodist during production of distribution sub MY::postamble { <<'__POSTAMBLE' } # for DIST RAWDIR = ../public_html/mailbox/raw DISTDIR = ../public_html/mailbox/source LICENSE = artistic EXTENDS = ../UserIdentity:../MimeTypes:../ORL:../MailTools2:../MailBoxC # for POD FIRST_YEAR = 2001 EMAIL = perl@overmeer.net WEBSITE = http://perl.overmeer.net/mailbox/ # for HTML HTML_OUTPUT = ../public_html/mailbox/html HTML_DOCROOT = /mailbox/html HTML_PACKAGE = ../public_html/mailbox/htmlpkg __POSTAMBLE print <<'DONE'; **** Done DONE Mail-Box-2.118/README0000644000175000001440000000611512473603434014544 0ustar00markovusers00000000000000== README Mail::Box v2 Last update: 2008-09-26 The Mail::Box folder is a modern mail-folder manager --at least at the moment of this writing ;) It is written to be a replacement of MailTools and Mail::Folder, an alternative to the Email::* set of modules. The most important modules are Mail::Box::Manager, Mail::Box, and Mail::Message. Their documentation explain the features in more detail than this document. The Mail::Box-Overview page describe each set of modules in more detail. Start reading at http://perl.overmeer.net/mailbox/html/Mail_Box-Index/ Other descriptive documents in this module: README.FAQ Frequently asked questions README.todo Thoughts about possible extensions Mail::Box version 1.xxx (developed in 2000 and 2001) runs on perl 5.005 and up, Mail::Box version 2.xxx is much faster and more flexible, but only runs on perl 5.6.1 and up. ===== Contributors A full list of contributors can be found in the Changelog, but a few people have to mentioned in special: * Mark Overmeer - 99% of the code - initial version of documentation * David Coppit - massive corrections and additions in all documentation - many valid suggestions to the design and parts of the implementation -- and some invalid ones ;) -- you really must know what you are talking about to convince stubborn Mark. * Tassilo von Parseval - scripts/takemail - contributions to the design * Liz Mattijsen for the POP3 implementation ===== Status This module has been used by dozens of people, on many different platforms. Some problems do surface sometimes: . on Windows, some methods (like moving messages between some kinds of folders) do not work. Windows can not rename a file which is locked, for instance... so where this is used you may get hurt. No Windows specialist has provided a patch to solve this correctly. . the IMAP implementation got stalled when Mail::IMAPClient was not maintained. I lack the time to complete it. ===== Features The Mail::Box modules try to keep messages stored in the mailbox file(s) for as long as possible. The message is read from file and parsed only if the user really needs the contents of the message. This is called 'delay loading'. Demand- or delayed-loading of messages is implemented using the standard AUTOLOAD mechanism, which means that it is not visible to the user of the folder! This mechanism also reduces the memory footprint of the program enormously. For some folder types, not only the content (body) of the message is delayed, but even the header. In those cases, the opening of a folder is just counting the messages: really fast. The implementation also avoids parsing and then unparsing mail messages. If you read from a folder, then use it and write to it to a different folder, unmodified messages are not reformatted from memory. Instead they are copied from the old folder into a new one byte-by-byte. When you open a folder with 1000 messages, and modify two messages, only those two get parsed and recomposed. All 998 other messages are simple byte-by-byte copied into the replacement file. Mail-Box-2.118/ChangeLog0000644000175000001440000034721712473604424015451 0ustar00markovusers00000000000000 ===== ChangeLog of Mail::Box version 2.* Limitations to be fixed: - when lines are over 997 chars, then the transfer-encoding should automatically change from 'none' into 'quoted-printable' or 'base64' version 2.118: Thu Feb 26 12:52:42 CET 2015 Fixes: - imap: reconstruction of foldername from url should be kept in folderdir. rt.cpan.org#82983 [Rotkraut] - ::Body::Scalar::file() did not construct ::FastScalar correctly [Andrew Beverley] - fix attribute continuations rt.cpan.org#90342 [Claus Jeppesen] Improvements: - accept blanks in some Content-* fields rt.cpan.org#99183 [Randy Diffenderfer] version 2.117: Sun Aug 24 15:19:01 CEST 2014 Fixes: - missed a line from the patch of rt.cpan.org#98225 [Andrew Beverley] version 2.116: Sat Aug 23 11:27:16 CEST 2014 Improvements: - add Mail::Transport::SMTP->new(esmtp_options) and trySend(esmtp_options) rt.cpan.org#97630 [Andrew Beverley] - add Mail::Transport::SMTP->new(from) rt.cpan.org#97636 [Andrew Beverley] - ::Field::Date parse support for numeric months (format used by some broken clients/Yahoo auto-responder) rt.cpan.org#98225 [Andrew Beverley] version 2.115: Wed May 28 15:27:48 CEST 2014 Improvements: - All regression tests pass on Windows! [Markus Spann] version 2.114: Thu May 8 10:49:17 CEST 2014 Fixes: - check for Test::Pod on Windows [cpantesters] - do not break PATH in test.pl on Windows [Markus Spann] - fix ::Locker::POSIX "read-only" error in Perl >5.18.2 [Jim In Aus] version 2.113: Wed Apr 16 14:07:37 CEST 2014 Fixes: - revert change which replaced IO::File by open($fh), because it does not support tell in Perl 5.10 [Scott Smedley] version 2.112: Fri Mar 14 13:18:57 CET 2014 Changes: - do not attempt POSIX lock on Windows [Christian Walde] Fixes: - ::Field::Date do not attempt to restore TZ with undef. [Andrew Beverley] - many regression test fixes for Windows [Christian Walde] Improvements: - Mail::Transport::SMTP uses Net::SMTP which sometimes needs Net::STMPS being installed. [Scott Smedley] version 2.111: Fri Jan 24 11:21:30 CET 2014 Fixes: - do not explicitly clean-up head and body during DESTROY of a message, because those may be reused in other messages. Fix for rebuild bug, reported by [Andrew Beverley] - open files in ::Body::File with :raw, not to corrupt line- endings on Windows. rt.cpan.org#92374 [Joseph Strom] Improvements: - add dispositionFilename to replacement text of deleted parts [Mark Nienberg] - change documentation syntax version 2.110: Sun Jan 5 18:50:59 CET 2014 Fixes: - ::Field::Date must compute in UTC [Andrew Beverley] - ::Field::Date negated -0600 timestamp [Andrew Beverley] - ::Field::Attribute should allow blanks around the '=' rt.cpan.org#90035 [Max Bowsher] - ::dispositionFilename() should use a study()d header rt.cpan.org#90342 [Claus Jeppesen] - begin :html in ::Box-Index Improvements: - add Mail::Message::Construct::Rebuild::removeExtraAlternativeText() Implemented by [Andrew Beverley] version 2.109: Mon Aug 19 12:55:30 CEST 2013 Fixes: - ::Field::Date format may lack leading 0 in the hour. rt.cpan.org#86716 [Andrew Beverley] - ::Field::Date format, rare time formats use dots in time, not colon. It is illegal, but safe to support. rt.cpan.org#86864 [Andrew Beverley] - ::MBox, pass non-default subfolder extension to siblings. rt.cpan.org#87912 [James Wright] Improvements: - spell fixes rt.cpan.org#86450 [Salvatore Bonaccorso] version 2.108: Tue Jun 25 09:21:59 CEST 2013 Fixes: - Mail::Box::Locker::FcntlLock cannot set l_pid, read only Improvements: - use Devel::GlobalDestruction rt.cpan.org#80611 [Ribasushi] - imap4: support TLS rt.cpan.org#82990 [Rolf Krahl] version 2.107: Wed Nov 28 12:25:59 CET 2012 Fixes: - unset $ENV{PERLIO} in test.pl and open more files explicitly as ":raw" [Thomas Krichel] - script/mailbox2html contained a few errors like '$ENV{}' (vars inside single quotes) [John Delacour] - ::POP3s should use ::POP3::Message (without 's') [Gabriel Reyes] - folder->new(message_type) documentation was mistaken about the default. Improvements: - add $date to Mail::Transport::IMAP4::appendMessage() rt.cpan.org#79680 [Daniel Westermann-Clark] - remove Mail::Transport::Dbx from the optional extensions: too old. [John Delacour] version 2.106: Wed Aug 15 23:49:44 CEST 2012 Fixes: - $field->study did not handle trailing new-lines correctly. - perl 5.16 complains about overload +0, which should have been 0+ rt.cpan.org@77997 [Toby Inkster] - resolved warning in test tests/30encode/90body.t Improvements: - new method $part->partNumber() version 2.105: Mon May 7 09:09:23 CEST 2012 Fixes: - warn when transfer-encoding is done without explicit charset. This flags hard to find bugs in message construction. Original bug discovered by [Andrew Beverely] Improvements: - added tests/30encode/50charset.t - add overloading to ::Field::Attribute objects, used in study() - $body->decoded is now optimized when a conversion is needed between charsets which are aliases of each other, or spelled differently. version 2.104: Mon Apr 23 16:51:29 CEST 2012 Fixes: - ::Body::decoded() seems to work only for plain/text. Not ok. version 2.103: Fri Apr 20 10:01:35 CEST 2012 Fixes: - time() calculation in ::Field::Date had time-zone effect reversed. - email address phrase parsing should decode (=???=) in ::Field::Full (study) Detected by [Andrew Beverley] - replace 'length' by 'defined' to check whether a maildir message has flags. Reported by [Steven Preston] - $msg->decoded did not behave as $msg->body->decoded. Repaired. - rebuild did not handle removal of all parts of a multipart correctly. Reported by [Andrew Beverley] - decoding some encoded headers with study() - fix "skip tests" logic during installation. Improvements: - add contentId() to body objects. [Gordon Haveland] - skip empty alternatives of multiparts. Detected by [Andrew Beverley] - no 'undefined' warning in ::Field::Date when a date does not have a day-of-week or timezone. version 2.102: Wed Jan 4 09:31:51 CET 2012 Fixes: - regex which matched attributes dumped core on hugh attributes. rt.cpan.org#69414 [Yanyan Yang] - document generation fixes. Improvements: - correct synopsis of ::Thread::Manager - ::Thread::Node::threadToString uses study() on subject version 2.101: Thu Aug 25 10:16:03 CEST 2011 Fixes: - multipart's-part content-type could remove some attributes rt.cpan.org#69516 [Yanyan Yang] - filenames in content-disposition fields are sometimes charset encoded (not supported by the RFCs) Decode them. [Thomas Karcher] - example how to use $msg->moveTo() was wrong. [Flash] Improvements: - use the Net::Domain::hostfqdn() for the creation of unique message-ids if libnet is installed. rt.cpan.org#69803 [Christoph 'Mehdorn' Weber] version 2.099: Thu Jul 7 16:02:38 CEST 2011 Fixes: - body() of structured studied fields failed. Improvements: - add overloading of comparison to Mail::Message::Field::Address objects. Triggered by [Andrew Beverley] - implement study on date fields. version 2.098: Thu Mar 17 09:01:36 CET 2011 Fixes: - accept mbox message separators from the 60's, because mozilla uses 1-1-1965 as default separator when importing mail. rt.cpan.org#65572 [Willi Mann] - accept mbox message separators from the upcoming 20's - Mail::Transport::POP3 has use_ssl setting too late [Mark Delany] - Mail::Transport::IMAP4 folder create produced "use of undefined". rt.cpan.org#66001 [Willi Mann] - Error message when stringifying a studied empty field. rt.cpan.org#66381 [Florian] - do not split headers for encoded components which contain blanks (which is illegal) reported by [Florian] Improvements: - maildir: do not remove :2, from the filename if there are no flags. [Mikolaj Kucharski] version 2.097: Wed Jan 26 16:11:41 CET 2011 Fixes: - override Mail::Transport::Sendmail destinations included original destinations. rt.cpan.org#64266 [Andrew Beverley] Improvements: - added examples/strip-spam-markup.pl by [Gary Funck] - do not hardcode perl version in test.pl, hopefully resolving many cpantesters complaints. - randomize boundary string to avoid (undemonstrated) security risks with boundary guessing. - manual pages produced with new version of OODoc, producing more condensed output. version 2.096: Tue Nov 9 10:04:25 CET 2010 Fixes: - allow dot in username for pop/imap (probably used by someone) [Jim Cromie] Improvements: - spelling fixes rt.cpan.org#59061 [Salvatore Bonaccorso] - implement Mail::Box::POP3s [Jim Cromie] - do not run test-scripts with -T, because modern TAP::Harness uses PERL5LIB which is disabled by the flag. version 2.095: Fri Jul 2 11:17:35 CEST 2010 Fixes: - permit additional colons in maildir filenames. rt.cpan.org #58534 [Stefan Kangas] - maildir messages in the 'new' queue will not get ":2,", as in mutt. rt.cpan.org#58550 [Stefan Kangas] - fix handling of messages with empty bodys. Had mild consequences to multipart preamble and prelude processing. rt.cpan.org#58544 [Stefan Kangas] Improvements: - spelling fixes rt.cpan.org#56678 [Salvatore Bonaccorso] version 2.094: Tue Apr 6 11:17:15 CEST 2010 Fixes: - parse address phrase with line fold in ::Full:Addresses rt.cpan.org#55309 [Diomidis Spinellis] - handle empty preambles and postludes in multiparts even very strict, because the may be signed. rt.cpan.org#54529 [John Gardiner Myers] Improvements: - fix documentation on use of Mail::Message::Head::build() and a few more minor documentation errors. [Kiss Gabor] - $msg->reply fallback to From address, not only Reply-To - add example/unpack.pl - added install configuration choice "none". Also control via environment variables. - spelling fixes. rt.cpan.org#53127 [Salvatore Bonaccorso] version 2.093: Thu Dec 24 17:02:06 CET 2009 Fixes: version 2.093: Thu Dec 24 17:02:06 CET 2009 Fixes: version 2.093: Thu Dec 24 17:02:06 CET 2009 Fixes: - rewrite of Mail::Message::Full:decode(), because original trick for blank removal kept on biting me. Now implemented without trick. rt.cpan.org#52600 [Dmitry Bigunyak] - make text/plain default when a body is created, as promised by the documentation. rt.cpan.org#52278 [Dmitry Bigunyak] - add toplevel() to ::Body::Multipart and ::Body::Nested to support reply() called on message parts. - fix tests-script to make MIME::Entity cleanup the msg-* files in the tests/ directory. Improvements: - rewrite of SYNOPSIS for Mail::Message::Field::Addresses rt.cpan.org#43703 [Dmitry Bigunyak] - added Mail::Box::Locker::FcntlLock, contributed by Jim In Aus rt.cpan.org#48568 [Jim in Aus] - support additional headers to a reply message. - added explanation of character-set "PERL" for a ::Body (suggested by [Dmitry Bigunyak]) version 2.092: Fri Nov 20 16:13:46 CET 2009 Fixes: - do not set all signal handlers to "exit(0)" rt.cpan.org#50433 [Slaven Rezic] - do not enforce the use of /usr/bin/perl in the test-scripts, but use the perl which is selected via the path. version 2.091: Sun Sep 6 23:54:17 CEST 2009 Fixes: - Another fix to thread detection start where first message is not found. rt.cpan.org#40347 [Florian] - translate '_' to blank when charset not known. rt.cpan.org#41661 [Florian] - no "undef" for field Content-Length with empty message bodies. [Daniel Richard G.] - Mail::Message::Body::eol() with parameter sometimes did not return a body but a character. rt.cpan.org#49334 [Brian McCauley] - Mail::Message::Body::eol() should add \n to last texts line if it is missing. rt.cpan.org#49362 [Brian McCauley] Improvements: - better "From " message separator line generated when converting messages for Mbox storage. Written by [Daniel Richard G.] version 2.090: Tue Jun 2 11:56:28 CEST 2009 Fixes: - second attempt to use Encode to do base64/qp encoding in Mail::Message::Field::Full, This time with test script. [Alexander Averyanov] - Mail::Box::Locker::POSIX lock did always succeed. rt.cpan.org#46003 [Rainer Schpf] via Debian#528364 - Maildir accept lower-case flags rt.cpan.org#42182 [Hardaker] - Message parser needlessly required read access to folders. rt.cpan.org #46388 [Mike Ekberg] version 2.089: Mon Apr 20 21:00:34 CEST 2009 Fixes: - do not restart parser after folder write, which could end-up in empy folders if mode=='w' [Reinier Post] - fix takemail script for Mbox. rt.cpan.org#44439 [Reinier Post] - alternative option names for 'file' in various lockers, needed to be able to use them in the multi-locker. Needed by [Mark Hedges] - use Encode to do base64/qp encoding in Mail::Message::Field::Full, which handles multibyte characters correctly. Patch by [Alexander Averyanov] version 2.088: Thu Mar 19 08:54:31 CET 2009 Fixes: - ::Parser::Perl should call binmode() as method on the file- handle to work. [Ashwini Singh] - pre-created locker object cannot be passed to Mail::Box::open() because its creation requires a Mail::Box object. [Mark Hedges] - recover from illegal phrases in email addresses, for studied fields in Mail::Message::Field::Addresses [Robert Bruccole] - require Date::Format, introduced in 2.082 [cpantesters] Improvements: - specify encoding type of character-set (q or b) with Mail::Message::Field::Address objects. Requested by [Alexander Averyanov] - default mail box locker object should use the same logging settings as the mail box itself. Spotted by [Mark Hedges] - the existence of Mail/Makefile.PL was an accident. version 2.087: Tue Feb 3 12:41:10 CET 2009 Fixes: - more character-decoding errors in field study. rt.cpan.org#41661 [Florian] - username in folder URL must get decoded as well, to allow '@' signs and colons in the usernames. rt.cpan.org#41976 [Matt S Trout] - accept unknown flags for Maildir. rt.cpan.org#42182 [Wes Hardaker] Improvements: - add DIGEST-MD5 and LOGIN to the AUTO search list of IMAP4. Triggered by rt.cpan.org#42136 [Alexander Thoukydides] - add warnings on two spots that message labels may get lost when moving them to an other folder type. - use external file for body after 100kB, not 10kB. Should improve on performance. version 2.086: Thu Dec 11 11:55:32 CET 2008 Changes: - require Encode 2.26 (there are so many distributions which older versions of Encode which contain serious flaws) Improvements: - sort optional module names in Makefile.PL version 2.085: Thu Dec 11 11:25:52 CET 2008 Fixes: - message disappeared when ::Manager::moveMessages() had to move messages to the folder it already was in. rt.cpan.org#40198 [Florian] - leave encodings in unknown charsets untouched, in stead of croacking in studied header fields (M::M::Field::Full). rt.cpan.org#40353 [Florian] - thread detection with missing messages croaks in multiple ways:. rt.cpan.org#40347 [Florian] - if character-set is unknown, then still returned un-decoded body for decoding(). [IIM1468] - encoding into binary transfer-encoding failed. [IIM1473] Improvements: - updated README, as suggested by [Anton Berezin] - understand unicode-1-1-utf-[78] charset - documention improvements on study() [Florian] version 2.084: Fri Sep 26 16:44:51 CEST 2008 Changes: - no questions asked about Mail::Box::Parser::C; it is not really maintained as it should... but probably still works in most cases. Fixes: - change in TAP::Harness shows missing TAP::Parser::Aggregator in test.pl rt.cpan.org#39264 [Jerrad Pierce] - removed (@) prototype on Mail::Internet::new replacement, because it produces a warning on 5.10 version 2.083: Tue Sep 2 09:41:19 CEST 2008 Changes: - FIX CHARACTER-SET HANDLING. When a new body is created, it will get charset 'PERL', which means: Perl internal representation. Also the decoded() body is of that. As part of a message, the body with be translated into real utf-8. This change will make Mail::Box slower, but correct! Check your applications! Use $msg->decoded when you process the content. - removed $msg->decoded option 'keep', because decoded object depends on temporary decoding parameters. Fixes: - use File::Temp, not POSIX::tmpnam, to work around Windows bug. rt.cpan.org#35747 [Ron Murray] - Mail::Message::contentType could produce "use of undefined" error message [Patrick Heesom] - Fix listing IMAP folders. rt.cpan.org#36458 [Jonathan Kamens] - do not set charset on non-text parts. - no complaints for IMAP4 object without explicit folder name. rt.cpan.org#37801 [Slaven Rezic] - remove SpamAssassion question from installation: SAv2 is the only supported, but most people will not install that. Improvements: - doc-patch, where "my Type @array" is not permitted anymore [Mike Andrews] - do not coerce parts via messages into parts. version 2.082: Mon Apr 28 09:30:33 CEST 2008 Fixes: - fix work-around for Mail::Message::Field::toDate() on Windows. Reported by rt.cpan.org#35155 [Kemal Ates] - use Data::Format::strftime to replace POSIX's version, for weird Windows timezone. rt.cpan.org#35155 [Ron Murray] version 2.081: Mon Feb 25 22:21:30 CET 2008 Fixes: - another fix for the case of two "Content-Type" lines, hit by a recent, now frequently appearing, spam message. version 2.080: Tue Jan 15 09:03:21 CET 2008 Fixes: - write() bodies raw, not converting LF to CRLF on Windows [Daniel Schttgen] - Mail::Message::Field::Full "study()" header fields, hang on parsing an attribute with '[]', rt.cpan.org#31912 [Jason HE] - various IMAP4 improvements by [David Golden] - Windows does not like to move files when they are still opened by a process, as MBOX mode 'replace' does. Simple work-around after suggestion by [Jonathan Kamens] - Double "Content-Type" in message headers caused confusion. [Anne van Bemmelen] version 2.079: Wed Nov 28 10:46:06 CET 2007 Changes: - requires Mail::IMAPClient 3.00 - requires MailTools 2.01 Fixes: - Mail::Message::Field::Full "study()" header fields, hang on parsing an attribute with missing trailing quote. rt.cpan.org#31017 [Jason HE] Improvements: - Without a '1' message in an MH folder, Mbox thought it was his, during auto-detection. Now, the check is more thorough. [Gregor Herrmann] and [Celejar], Debian ticket #442912 version 2.078: Fri Nov 9 15:13:06 CET 2007 Fixes: - mis-spelled NTLM a few times as NTML [Zsolt Kecskemeti] - TAP::Harness 3.00 changed interface a little. Patch by [Andy Armstrong] version 2.076: Wed Oct 24 16:55:10 CEST 2007 Fixes: - stop when message coersion is called but not possible. - fix test, to work with MIME::Entity changes. Improvements: - new Mail::Message::contentType() - avoid use of '-r $filename; -f _' in Mail::Box::Mbox, where "filetest 'access'" is active: it has a bug, not setting '_' version 2.075: Tue Sep 25 11:31:40 CEST 2007 Changes: - Replace Test::Harness by TAP::Harness to run tests, which is cleaner and faster. Fixes: - recursively opening folders with manager involved, retriggers autodetect each time, sometimes coming up with an unexpected folder type. [Celejar] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=442912 - Mail::Box::Locker::POSIX should not include POSIX.pm, but requires Errno.pm [cpan-testers, perl 5.10] version 2.074: Fri Sep 21 10:21:12 CEST 2007 Fixes: - two errors in Mail::Message::Field::Full when the fields are empty. Reported by [bas@debian.org] - manuals produced with new OODoc. - Mail::Message::Construct::Rebuild::recursiveRebuildPart() contained superfluous for(1) loop. - a rebuilt message will still be a message, not returned as undef. - Message with two Content-Type conflicting definitions could confuse the parser [Tim Chan] version 2.073: Thu Jul 19 09:43:57 CEST 2007 Fixes: - field attributes which contained a '\' where considered empty. Reported by [Ricardo Signes] - remove escape from field attributes, instead of adding it. - Mail::Box::Manager should put protocol information in the generated unique folder-name in case of IMAP4. Was already done for POP3. Reported by [Jonathan Kamens ] Improvements: - remove old notes about "being beta code" from Mail::Box-Overview [Ricardo Signes] - Conversions between Mail::Message objects and Email::Simple/ Email::Abstract implemented by [Ricardo Signes] tests/80msgconv/30emsimp.t tests/80msgconv/40emabs.t version 2.072: Thu Jun 14 11:53:31 CEST 2007 Fixes: - since release 2.070, the pure pod manual pages like Mail::Box-Cookbook where empty because of a flaw in oodist. Improvements: - add tests/02dist/10pod.t to test PODs - added MailTools man-pages to HTML - MailTools is now under control of OODoc, which means that the VERSION is not in the "raw" coding files. Which on its turn means that MIME::Entity is complaining about missing version numbers in those files. Only applicable to the development situation on the authors disk. Work-around in Makefile.PL version 2.071: Fri May 25 16:00:06 CEST 2007 Fixes: - CSS should be named 'oodoc.css' [Michael Bolien] - Makefile.PL did not user UNIVERSAL::VERSION to compare version numbers of installed packages. [Andreas Koenig] - Mail::Message::Body overloaded == and != should use refaddr. version 2.070: Sun Mar 25 17:11:29 CEST 2007 Improvements: - test rebuild() not to add text alternative for html if it already exists. - converted pod/html generation to use OODoc 0.99 Reordered the published packages on the website. - added missing "markers" file to html-package [Michael Bolien] - removed mkdist, mkdoc, README.oodoc version 2.069: Wed Dec 13 14:43:55 CET 2006 Fixes: - Message rebuild with nested message failed. Fixed by [Mat Johns] - $head->clone with specific fields was broken, once solved showed bug in $head->grepNames without names. Both fixed thanks to [jih]. - 2 fixes in IMAP4 authentication, by [Max Campos]. Improvements: - Example strip-attachtment did not use dispositionFilename() available since 2.049 [Richard Eichhor] - Installation procedure does not need to check for Term::ReadKey version 2.068: Tue Sep 26 13:21:54 CEST 2006 Fixes: - Mail::Box::Parser overruled global trace-level default Problem discovered by [Uwe Menges] - own transporter provided for Mail::Box::IMAP4 was not stored. Problem discovered by [Bill Martin] Improvements: - Docs produced with newest version of OODoc. version 2.067: Mon Sep 18 10:36:23 CEST 2006 Fixes: - Mail::Message::TransfEnc::QuotedPrint must pass the whole message body at once, not line by line, because "=\r\n" is otherwise not detected. - Produce manuals with new OODoc version, which fixes the layout of option-tables by exploiting a fix in the just released podlators 2.0.5. - Update copyright date in POD. version 2.066: Sat Jul 29 13:28:09 CEST 2006 Fixes: - Empty header field crashed Mail::Message::Field::Fast. - block usage of foreachLine on multiparts and nested with useful explanation. Problem reported by [Claus Jeppesen] - Test::Harness published private function which we need to group tests into new public name. [Marek Rouchal] - SpamAssassin versions >= 3.0 are not supported by the wrapper. Discovered by [David Saulnier] - Mail::Box::Thread::Manager thumbled over empty message-ids. Now, message-ids are only accepted if they resemble valid ids... [Yuval Kogman] - Mail::Message::Field::attribute should use non-backtracking match to avoid crashes of Perl at extremely long fields. [John Gardiner Myers] - Mail::Message::Field::attribute fix \\ escaping mistakes [John Gardiner Myers] IMAP4 Fixes and improvements by [Scott Bronson]. Patches reworked by MarkOv - Mail::Transport::IMAP4 unpack of remote capabilities wrong Reported by [Scott Bronson] - IMAP4 top folder name '=' should be '/'. - IMAP4 create folder - Reworked IMAP4 folder selection - Do not list folder as one of its subfolders - IMAP4 message head not read correctly - avoid query unselectable folders for the number of messages. Improvements: - Improved OODoc improves quality of POD output w.r.t. option lists version 2.065: Mon Mar 27 15:03:21 CEST 2006 Fixes: - CPANTs found missing 'use strict' in Mail/Message/Field/URIs.pm [domm] - produce warnings when the folder gets locked twice. - A few error messages didn't start with a capital. - translated some carp/confess uses in ::Construct:: to use $self->log() i.s.o. carp/croak. - Added Mail::Box::Locker::Mutt. and t/55lockers/50mutt.t - Depends on HTML::FormatText, not HTML::Format. - Problem with mbox test, since the empty line definition changed. Reported by the maintainers of 2 linux distributions and FreeBSD. - Fixed tests/Tools.pm unpacking mbox into maildir and mh, both to leave-out the trailing blank line. version 2.064: Tue Feb 28 12:39:57 CET 2006 Fixes: - redesigned everything what has to do with Content-Length and Lines. - now only added for Mbox folders - only for the whole message, not for each part in multipart - corrected behavior of boundaries in multiparts to be compliant with the RFCs. Parts without trailing newline are now correctly supported. Thanks to [John Gardiner Myers] for the initial patch. - $msg->moveTo called wrong copyTo. Fixed by [Ken Guyton] - use pragma "filetest 'access'", to support ACL environments. Reported via Debian by Rainer Schpf. - MH index files didn't work. Multiple fixes, including some around append() to MH folders. Reported by [Simon von Janowsky] - Fixed infinit loop encoding lines in Mail::Message::Field::Full [Tuomas Salo] - Mail::Message::Field::Full::encode lines could become 2 chars too long: RFC says 76 max. version 2.063: Tue Nov 1 09:13:14 CET 2005 Fixes: - Some problems with new releases of Test::Builder - installation option 'a' (all) did not work since 2.058 - installation option 'skiptests' did not work Improvements: - Mail::Message->rebuild option extraRules renamed to extra_rules for consistency. - $body->description field. - installation option control via environment variables MAILBOX_INSTALL_OPTIONALS and MAILBOX_RUN_TESTS version 2.062: Thu Aug 25 14:07:13 CEST 2005 Fixes: - New Test::Builder (not delivered with perl yet) changed implementation which made tests fail. Improvements: - Mail::Message::Head->build() skips undefs. version 2.061: Wed Jun 22 19:39:09 CEST 2005 Fixes: - Finally, after many hours hunting, I was able to figure-out that a bug in Perl's "require" caused the "foundIn() not implemented in Mail::Box::IMAP4" problem (for instance when running the tests). Reported by [many people, nice work-around by Niko Tyni] - Mail::Message::Construct::Read added missing Message-ID without angle brackets. Patch by [gjmyers] - Mail::Transport::Sendmail options to trySend() were ignored. [Andriy Gapon] - Mail::Message::timestamp() didn't trigger load of lazy message. [found by Eric Dorland] - Many IMAP4 fixes and bug-reports by [Raul Dias] - Mail::Message::Field::Full translated '0' content into 'undef' [found by Eugene L Schulman] - test.pl didn't return on a critical failure. Patched by [Tiko Tyni] Now installation attempt should stop on a sincere problem. - test fixes, where newer Test::Harness passes around 'lib' differently. Patched by [Tiko Tyni] - On request of [rt.cpan.org@plan9.de], Mail::Box::File::appendMessage explicitly states that it by default doesn't lock the folder. The writing is unsafe! - [Tiko Tyni] provided different solutions to fix the taint warnings with the tests, which appears with perl 5.8.7. IO::File changed its behavior, which is now circumvented in the tests.. version 2.060: Tue Mar 15 22:02:34 CET 2005 Fixes: - Mail::Transport::IMAP4 crash on getFlags(). Reported by [Tom Allison] - Mail::Transport::IMAP4 authenticate now uses server's reported capabilities. On the path paved by [Tom Allison] - Fixes installation issue with IMAP4 (I hope) Reported by various people. - Mail::Message::Field::toDate() now works around %z interpretation as textual time-zones when there are blanks in the name. [aa26@mail.ru] - Pod updage for Mail::Box::Dbx [Ralf Valerien] - open('|-') does a fork, so a failure should result in an exit, not a return. Found a few times in Mail::Transport::*, and discovered by [Slaven Rezic] - $msg->send didn't pass the options correctly to the sending object. Reported by [Franck Richard]. - Mail::Transport::POP3 did only try APOP in AUTO mode. Found by [Markus Spann]. - $msg->send didn't pass the options correctly to the sending object. Reported by [Franck Richard]. - Mail::Transport::POP3 did only try APOP in AUTO mode. Found by [Markus Spann]. - scripts/mailbox2html used setLabel(), which got replaced by label() a long time ago. Reported by [Alain Veylit] - Mail::Message::Field::Attribute used Mail::Reporter without having it as base class. Rewritten to have it that way. Reported by [Russell Mosemann] - Removed the two uses of $& in reg-exps, which slows-down all regexp matches in older Perl versions. Patch supplied by [jgmyers] Improvements: - Documented Mail::Box::Manager::open(authenticate) as suggested by [Tom Allison] - $msg->bounce() without arguments now croaks. [Slaven Rezic] version 2.059: Tue Nov 30 19:50:42 CET 2004 Interface changes: - Mail::Transport::IMAP4::flagsToLabels expects new first argument 'REPLACE', 'SET', or 'CLEAR'. Fixes: - Installer didn't ask for optional Time::Hires - [Anthony D. Urso] fixed an endless loop in study() for fields ending on blanks. - [Russell Mosemann] found a different problem, in about the same line as the previous fix. - Fixed memory leak in administration of messages in folder. Improvements: - $msg->printStructure is less strict on the format of the indentation: any white-space in it is sufficient. - $msg->printStructure(undef) will return the structure as string. - new method Mail::Server::IMAP4::Fetch::printStructure() for debugging purposes. version 2.058: Wed Sep 22 14:44:32 CEST 2004 Interface changes: - [Andy Maas] rewrote Mail::Box::FastScalar, to boost performance. various bodyAsList() methods now prduce ref-arrays. Shouldn't affect user programs. Requires Mail::Box::Parser::C v3.006 Fixes: - [Jason Woodward ] had to wait much too long to get his twin-POP open problem solved. Now, only one POP connection will be opened. This may speed-up other programs as well. - [Mike Mimic] foudn that the new INIT block in Mail::Reporter did not work well with his web-application. Changed it into BEGIN. - [Mail Minic] Mail::Transport::Exim did not handle strings as from address correctly. - [Anonymous via RT] Use ExtUtils::MakeMaker::prompt() instead of own ask() in Makefile.PL, so MailBox can be installed with CPANPLUS. - [aa29] $head->isMultipart did not return boolean in list context. - [DH] removed INIT block from Mail::Reporter, which complains in Apache. - [aa29] Mail::Box::MH->new failed because of initiation order - pop3 folders do not need (have) a name, but Mail::Box::Manager::open required one. Accidentally, sometimes that worked, because $ENV{MAIL} was used as default, however, that could cause various problems. - {Tom Allison] found-out that imap was not autoloaded my the Mail::Box::Manager. Improvements: - warning message "Folder does not exist, ..." avoided when folder is opened for deletion. - added Mail::Box::Identity::open() - added Mail::Box::nrMessages() for simplification - [Alessandro Zummo] showed me that docs about "why $head->delete($field) doesn't aways work" were needed. It's a nasty reference counting problem. version 2.057: Thu Aug 26 14:31:34 CEST 2004 Interface change: - Moved the new Mail::Box::IMAP4::Fetch to Mail::Server::IMAP4::Fetch, which is a more logical name: part of a full server implementation. - Moved the unusable module Mail::Box::Search::IMAP4 over to Mail::Server::IMAP4::Search... but still not implemented ;-) - You have to add (share => 0) to $msg->moveTo if the source message can get undeleted in your program (for instance in a user application). - Mail::Reporter->report(...) will return strings without \n. Sporadic locations where log() was called with trailing \n are removed. - Opening a folder which is already open is considered an error (was warning) by the manager. Fixes: - [Jan Martin Mathiassen] add IO::File to Mail::Box::Dir::Message - [Torsten Luettgert] found that field labels like '-' where not beautified correctly with wellformedName. - Changed '.' from most preferred folder directory for the manager into the least preferred. - $field->setWrapLength only worked for "fast" fields. Tests in tests/11field/40wrap.t - [Mike Mimic] showed that constructing unstructured "full" fields was broken. - Mail::Box::POP3::delete() will not take any action. Deleting all contained messages was not consequent. Improvements: - [David A Golden] demonstrated the need for $head->wrap() - $folder->coerce($message) will only call MSGTYPE->coerce($message) when not a MSGTYPE yet. - Mail::Box::Message::coerce() could be removed: no-op. - Reimplemented folder->delete(), which is not reading the messages before deletion, but bluntly removes the folder in the most Efficient way. You probably want the new option 'recursive'. - Mail::Box::new(access) now has mode 'd', which speeds up removal of folders. Used by $folder->delete(). - Mail::Box::IMAP4 now supports deletion of a folder (untested) - $folder->copyTo/moveTo and $msg->copyTo can have option 'share' which tries to use hardlinks i.s.o. clone() to put a message in a different folder. Only available for some M folders. - Mail::Message::clone() now accepts shallow_head and shallow_body arguments which avoid deep-cloning. - Added references to the Netzwert folder type, which got implemented, but not released as GPL (yet?) - Increased the status of the IMAP folder client from alpha to beta. - New methods Mail::Box::Manager::folderdir() Mail::Box::Manager::defaultFolderType() - New methods Mail::Box::topFolderWithMessages() - Moved tests/44imap/40fetch.t to tests/60imap/10fetch.t - Mail::Box::nameOfSubFolder() now can be used as class method. - New, specialized folder manager Mail::Box::Manage::User manager with user knowledge tests in tests/52manager/20user.t explanation added to Mail::Box::Manager, about the two kinds of managers. - New classes to administer folders, even when not opened Mail::Box::Identity info about (possibly unopened) folder Mail::Box::Collection info about groups of folders tests in tests/52manager/30collect.t - New classes to implement parts of an IMAP4 server Mail::Server place-holder Mail::Server::IMAP4 place-holder Mail::Server::IMAP4::List tests in tests/60imap/20list.t - Split tests/10report/10errors.t into tests/10reporter/10errors.t and tests/10reporter/20reports.t - Mail::Reporter::defaultTrace can now set a callback to catch each log/trace message. Tests in tests/10reporter/30callback.t - [chris] Mail::Message::Field::wellformedName() will upper-case *-ID as part in the fieldname. - [M M] tried to user MBMbox->create and expected it to open the folder at the same time. Documentation problem: moved the method from "constructors" to "internal". Did the same for "foundIn". - Produce an error if people try to build Mail::Box::* messages directly. - Many improvements on User::Identity module. MailBox requires version UI 0.90 now. version 2.056: Sat Jul 31 13:28:29 CEST 2004 Interface change: - [Wiggins d Anconia] explained that combining MailBox with forks may cause non-unique message-ids to be created. To solve this, the $head->messageIdPrefix() had to be rewritten. MessageIDs will look differently now. [No problems expected for existing programs] Fixes: - [Jeff Squyres] silenced warnings by guessTimestamp() and recvstamp() when no Date nor Received fields are present. - [August] Mail::Box->new(lock_wait) option not correctly passed to Locker object. - [Mime Mimic] noticed that a message reply used "sender", not "From" addresses when no "Reply-To" field is present. This is not according RFC2822. Sender should never be used. - [Jason Woodward] found a $_ localization error in POP3, which could result in "Can't call method "xxx" without a package or object reference" errors. - [Carlos Perez] SpamAssasin's message wrapper method get_header() should return all field bodies with a certain name in list context. - [Jason Woodward] $msg->shortString was broken. - [Todd Richmond] discovered that un-quoted attribute values consumed the semi-colon separator in Mail::Message::Field. - Content-Transfer-Encoding and Content-Disposition fields were ignored when specified with Mail::Message->build(). Now they will be applied to the create body AFTER the body is constructed based on default rules. - [Todd Richmond] discovered that Base64 decoding should not be done on per line basis, because some lines may not have mod4 number of characters (especially in virusses). The RFC is not clear about it, so... Mail::Message::TransferEnc::Base64 is changed (again) Improvements: - [Rich Caller] suggested to change blanks in ill-formated message-ids into blanks. Apparently, some applications are doing that. - Mail::Message::Field::Unstructured now supportss character-set encodings, by request of [Mike Mimic] - [Mike Mimic] made an unexpected abuse of $head->build(). It is now supported that ready field objects can be passed. A warning is produced when you accidentally pass field_name => $field_object (which should be: field_name => field_content or simply $field_object. - [Mike Mimic] Some link errors in the front HTML documentation page. - Added $head->printSelected(FILE, patterns) as simple way to produce field subsets. - Added support for label 'passed', which means that the message was used for forward/bounce/resend. - Added Maildir message flag P='passed' (uncommon) - Changed flag handling implementation in Mail::Transport::IMAP4. Tests are in tests/44imap/30flags.t - $body->dispositionFilename can be used without directory name. - Attachments auto-discompose as 'inline' for texts and `attachement' for binaries. - Added Mail::Box::IMAP4::Fetch with tests in tests/44imap/40fetch.t which provides body/bodystructure/envelope syntax conversions. - New $field->attributes (to list fields of all attributes) for Mail::Message::Field. - Added description of differences between MIME::Entity::build() and Mail::Message::build(). - Mail::Message::Field::Structured can now be used for general structured fields with attributes, like Content-Type and Content-Description. version 2.055: Sun May 16 15:41:59 CEST 2004 Fixes: - [Simon Sozens] reported that IMAPClient was always installed, although claiming that it was optional. Now it is really optional. - [Josh Miller] showed Mail::Message::Construct::Reply::replyPrelude failed the default situation of no explictly stated destination. - [Yuval Kogman] suggested to use $CRLF from Socket.pm in Mail:: Transport::POP3, because it correctly set the content for many platforms. - [Timur I. Bakeyev] spam-flag tested for "yes", but should be "^yes\b", by reason of a possible "bayes" name in the same line. - [Timur I. Bakeyev] ::FieldGroup->attach was broken since 2.051. - [Timur I. Bakeyev] ::FieldGroup doc improvements. - [Daniel P. Berrange] found a circular reference which kept folders to stay open too long in some circumstances. - [Roderick A. Anderson] saw complaints about fileLocation() being called on message parts. Something is fixed, which may be the cause. - [Miah Gregory] destruct()ing messages in Maildir should not delete the message. No message will be automatically flagged for deleting when destructed. - [Paul Makepeace] $msg->send(via) always used sendmail, without looking at the value passed with via. - [Roderick A. Anderson] hit a bug in ::Body::Nested::fileLocation - [Kees Dekker] Mail::Box::update logged number of new messages, although it did not receive that info from updateMessages. Log message removed. - [Kees Dekker] discovered a race-condition when writing a replacement folder in Mail::Box::File. - The probably hundredth attempt to get $msg->send to work smoothly. - [Gilles] discovered that the charset setting of a body did not survive encode(). Content-type fields with text/* mime-types will not get charset=us-ascii added automatically. - [Blair Zajac] typo in Makefile.PL text, and removal of stutters in the documentation. Improvements: - [Trond Michelsen] needed a way to specify the body type for messages which where read with Mail::Message->read. - You now can add your own spam-fighter fields to the detector of Mail::Message::Head::SpamGroup. See method 'fighter'. - [Roderick A. Anderson] showed that the result value of $msg->timestamp needed some more explanation. - [Kees Dekker] Doc improvements in Mail::Box::Locker - Easier to start multi-lockers with selection when opening a folder: $f = $mgr->open($name, lock_type => ['DOTLOCK','FLOCK']) - [David A Golden] suggested to remove $msg->date, in favor of $msg->head->date, which is consistent. When the need arises, maybe a new method $msg->date will appear returning some nice date object (like a DateTime). But probably that is never needed, since there is a $msg->timestamp. version 2.054: Fri Feb 6 21:52:54 CET 2004 Fixes: - Reverted the change made in 2.049, which automatically added a new-line to a body... a Mail::Message::Body object may contain binary data! - [Phil Hagen] found a typo in Mail::Transport::Qmail, causing the display of undisclosed fields (Bcc) when using qmail. - [Brett Dikeman] showed that $mgr->open sometimes complained with a warning when no folderdir was specified. - [Erik A Johnson] patched Mail::Box->coerce(message) to work better with foreign messages. - [Erik A Johnson] found that Mail::Internet objects where converted by the MIME::Entity converter and vice-versa. This does usually not cause too many problems because MIME::Entity extends Mail::Internet. - [David Phillips] got an undef warning in POP3 after delete(). Fixed - [Mike J. Vincelette] reported error in $folder->messages(0, 20) The bounds were not checked correctly and slicing with 1..20 behaves unexpectedly in subroutine scalar context. Improvements: - $msg->size returns a value which may be a few percent off the real value (depends on the action which follows). The warning in the documentation about this has been strengthened after some discussion with [Mike Mimic] - Mail::Transport::Exim takes exim4 binary with preference over usual exim MTA, on request by [Mike Mimic] - [Mitar] Mail::Transport::Sendmail starts sendmail with -ti, not -it, which helps exim... either the default sendmail as the specialized Mail::Transport::Exim module will work now with exim. version 2.053: Thu Dec 4 00:13:50 CET 2003 Fixes: - Installation problem with Mail::IMAPClient. version 2.052: Wed Dec 3 21:04:45 CET 2003 Fixes: - Mail::Transport::Send did not pass the options to the various trySend() methods. Now $msg->send(to => ...) will be respected. - [Tim Sellar] fixed the message type default where the Content-Type field is empty. - Corrected some typos in Mail::Box-index, and added reference to HTML::FromMail - 'use' line reshuffling in all test scripts, because Test::Harness changed behavior. - [Matthew Darwin] found double 'Content-Type' fields after build() From now on, you can overrule the content-type of the constructed message, for instance to 'multipart/alternative' without problems. - A list of sorted threads could not handle threads starting at the same time: only one was listed. - Reply on a message which lists multiple reply-to addresses confused replyPrelude(). Spotted by [Nick Ing-Simmons] - Mail::Transport::SMTP could not handle illegal sender address. Discovered by [Matthew Darwin] - Mail::Message->build with data => '' failed: contains no lines at all, which was not correctly handled. Reported by [Matthew Darwin]. - $msg->coerce() does not clear the deleted flag anymore. Improvements: - Basic IMAP4 implementation. Included for testing purpose only. - 'delete' is changed into a full-class label, not a special case. This simplified the code on many places. The delete(), isDeleted(), and deleted() methods on a message are now simply short-cuts for $msg->label(deleted) - Removed most use of File::Spec from Mail::Box::MH and Mail::Box::Maildir, because it consumed considerable time: [Anthony D. Urso] reported 20%) doing things not required to perform correctly on Unix or Windows. - Ignore sending messages with SMTP when no addresses are specified to send the message to. - Warnings about lacking optional modules is nicer in Makefile.PL - Added large warning to Makefile.PL when people have the perl version (not the XS version) of Scalar::Util installed on their system. That breaks everything! The correct version can not automatically be reinstalled because the version numbers are the same. - Recent changes (bugs) in Test::Harness required an update of the test process. - test.pl reports the version of some installed modules, to help responding to error reports. - [Anthony D. Urso] supplied a patch to use the Received headers to provide a message time-stamp. Mail::Message::Head::Complete now contains a ::timestamp() to get the user supplied date (which is untrustable in case of spam) and ::recvstamp() which uses other means. The Mail::Message::timestamp() will, from now on, prefer the date provided by ::recvstamp and use ::timestamp as fallback. There are other sources to get a good stamp from, for instance the MBOX "From " line, but that is not implemented (yet) - [asta] used $msg->parts, but the doc of the method was ignoring the facts that the message/rfc822 and multipart "wrappers" of the parts are not returned. - $folder->current made lazy, so only calculated when used. When no message is labeled 'current', then the first not seen is returned. - New method $folder->findFirstLabeled. - New option Mail::Box::Manager->new(autodetect) limits the set of default folder-types in the folder type autodetection attempt. Requested by [Nick Ing-Simmons] - The HTML manual now also indexes NOTICE log messages. Not all NOTICE messages are described yet. version 2.051: Mon Nov 3 16:16:09 CET 2003 Fixes: - [Tim Sellar] example/build.pl omission: ::Body->new(type => should be ::Body->new(mime_type => - [Lutz Gehlen] bumped into a mistake in the (not finished) ::Field::Full code: the class of unstructured fields was composed improperly. - study()ing multi-line fields produced an improper field names. Improvements: - [Matthew Walker] added the distiction between CommuniGatePro and CommunGate software to the Mail::Message::Head::ListGroup mailinglist detector. - [Tim Sellar] suggested to ignore undef values in build(), which will simplify the code of the user. - Added detector for MailScanner spam groups. - new Mail::Message::Head::SpamGroup::spamDetected() and Mail::Message::Head::Complete::spamDetected() - Mail::Message::Replace::MailInternet::read() distinguishes between Mail::Message->read() and $mailinternet_object->read version 2.050: Tue Sep 30 18:27:11 CEST 2003 Fixes: - An (unintended) change of behaviour in Text::MagicTemplate (which is used to produce the POD and HTML) made all produced manuals exactly the same. Improvements: - [Matthew Walker] contributed various improvements to the ListGroup detection and documentation. Detection for Listserv software was added, and rfc2918 should have been rfc2919. - [Matthew Walker] made test/Tools::copy_dir() skip directories. - Implementation of Mail::Message::Replace::MailInternet and ::MailHeader, as drop-in replacements for Mail::Internet and Mail::Header. Very alpha! not tested yet! version 2.049: Mon Sep 29 13:32:47 CEST 2003 Fixes: - [Liz Mattijsen] Makefile.PL requires IO::Handle in some environments. - [Terrence Brennon] found a doc and a code mistake in example/strip-attachement.pl - [Ron Savage] showed that the Text::Autoformat module produces different output on different machines, caused by breaking words. Breaking now disabled the for the tests, so test should result in the same everywhere. - Some Mail::Transport::* senders did not pass-on the Bcc field to their application. Reported by [Phil Hagen]. - [Stefan Wolfsheimer] and [Mark Scarton] report a missing $ in ::ResentGroup, which broke the "delivered-to" field in resent groups. - [Jason Woodward] reported that there were still some problems with $msg->forward(). Hope to have fixed them, this time. - $msg->send now really has a default which will be loaded automatically as well. - When you try to open the same folder twice, using the manager (as you should), the second time will fail. This is needed, because there are too many complications, like locking. Improvements: - Mail::Box::Parser::Perl used $sep =~ m/^From / to recognize the MBOX separator. Now it uses $sep eq 'From ', which is faster. - Mail::Message::Body::new(data) now corrects scalars values which do not end on a "\n". Convinced by [Mike Mimic] - Object::Realize::Later v0.14 required - Mail::Box::File::updateMessages() implemented, for instance for $mbox->update calls. Test in tests/40mbox/80update.t - Maildir subfolder names can start with a dot, as reported by [Paul Simons]. - Ability to add options to the command-line of sendmail when started as MTU. Saw this need in a script of [Adam Augustine] - Test-script of MIME::Entity conversion purges the M::E objects after being used, otherwise trashing files are left in the tests directory. - Added Mail::Message::Body(::Encode)::dispositionFilename and Mail::Message::Body::write() which will help to export data found in a message(-part) to the file-system. version 2.048: Tue Aug 26 19:50:06 CEST 2003 Fixes: - [Jason Woodward] reported that reply on multiparts (with only one part) failed. For this release, forward() has been rewritten. reply() may be the victim for the next release. - [Joe Junkin] reported a problem to send messages where the body is not in a temporary file via SMTP. - Added required Mail::Message::Wrapper::SpamAssassin method get_pristine_header() - [Simon Cozens] demonstrated that converting MIME::Entity objects into Mail::Message's lost content related headers. This required a small redesign on when data is copied from header to body and vice versa. - Mail::Message::Body::Multipart;;stripSignature stripped all but signatures :( - requires Test::Harness which defines _run_test_scripts, so increased the required VERSION. [Liz Mattijsen] - [Steven Benson] found-out that manager objects where kept alive too long. - [Rob Holland] reports that a '=' is valid in a Maildir filename, and supplied a patch. - [Joe Junkin] found another spot where <$body> was used on a non-GLOB. In Mail::Transport::SMTP, this time. Improvements: - Added Mail::Message::Head::FieldGroup as base class for Mail::Message::Head::(List|Spam|Resent)Group. - Reimplemented Mail::Message::Head::ResentGroup to be based on a MMH::FieldGroup. - Added Mail::Message::Head::SpamGroup to detect/produce/remove sets of header fields which relate to spam detection software. Tests in tests/31fgroups/30spam.t - Moved detection of mailinglist type in Mail::Message::Head::Listgroup from method type() to from(). - Added Mail::Report::addReport, to merge reports from one object into an other, require by [Matthew Lockner] - [Matthew Lockner] wished to able to get parser errors back on Mail::Message->read. These errors are now copied from the parser object into the message. - Added Habeas-SWE (Sender Warranted E-mail) as abbreviation in field names which is always in caps, on request by [Ronnie Paskin] - Moved 20resent.t and 40list.t from tests/12head to tests/31fgroups. - New methods Mail::Message::Head::Complete::removeContentInfo(), Mail::Message::Body::contentInfoFrom(head) and ...To(head) - As result of an extended discussion with [Simon Cozens], it seems that object-by-object conversion between MIME::Entity and Mail::Message objects will keep on producing problems. Therefore a stringify-reparse strategy is used from now on. Mail::Message::Convert::MimeEntity is very straight-forward now, but a less efficient. - [Jason Woodward] convinced me to implement Mail::Message::forward(include => 'ENCAPSULATE'), which adds the source message as message/rfc822. The whole forward implementation has been re-implemented and re-documented. - [Kees Dekker] was (understandably) confused by the explanation of $folder->isModified() This has been improved. version 2.047: Thu Aug 7 23:59:53 CEST 2003 Fixes: - For MBOX and POP3, delayed header will be read before labels() or label() return the values, because only reading will cause the [X-]Status fields to be parsed into labels. - Tests are now suitable for perl5.8.1 - [Kees Dekker] with Solaris and perl5.8.1 showed me that Mail::Box::Locker::POSIX was so broken that its tests worked on other versions :( Improvements: - Moved all questions about optional modules from test.pl to Makefile.PL. Hope for a cleaner installation. - On request by [Jason Woodward], POP3 received messages will get their Status and X-Status fields processed. POP3 has no other means to pass-on status information, although not all servers support these fields. - The library should now be taint-safe: all test-scripts now run in taint mode! - The POP3 test-scripts now share common code in Tools.pm - New release for Mail::Box::Parser::C (as separate package) which ignores message lines starting with 'From ' as separators in broken MBOX folders (like mutt produces). - Added Mail::box::Parser::C to the list of optional modules. - Refolding and Mail::Message::Field::AddrGroup will produce the address strings in alphabetic order, to get a reproduceable result (required for 5.8.1) - Disabled detection of folder "changed during access", until all folder types support 'update()'. version 2.046: Thu Jul 31 12:25:47 CEST 2003 Fixes: - [Kees Dekker] found that HPUX mangles %z int textual timezone, so Mail::Message::Field::toDate() has changed again. Quite complex now. - [Kees Dekker] fixed a missed test for undef in Mail::Message::Head::ListGroup::display(). - [Kees Dekker] reported a problem in tests/42maildir/20write which was caused by a missing $folder->close; - [Blair Zajac] & [Kees Dekker] signalled that User::Identity and URI are prerequisits now. - [Kingpin] Wrong quotes in warnings and a typo, in Mail/Message/Body/Encoding.pm - $msg->send was showing lines not to be disclosed by default, which is wrong. - [Jan Stapel] reported prints of "GLOB()"s where text was expected. This was a new bug in Mail::Message::Body::File Improvements: - [David Coppit] has a short list of improvements in handling blank lines at the end of messages and message parts, which will decrease the differences between a message read and then printed. version 2.045: Tue Jul 29 20:23:30 CEST 2003 Fixes: - A lot of files were missing from the distribution because OODoc had a bug. Improvements: - Object::Realize::Later documentation is now part of MailBox's html output too. Join the club! version 2.044: Tue Jul 29 13:52:32 CEST 2003 Interface changes!! - Mail::Message::rebuild() tags where inconsequently named. Now remove_html_alternative_to_text => removeHtmlAlternativeToText text_alternative_for_html => textAlternativeForHtml - [Anthony D. Urso] hinted that opening a Maildir folder should not automatically move messages from 'new' to 'cur'. Added a label 'accepted' to control this. See Maildir::new(accept_new) which must be set to get the same behavior as before. - Mail::Box::Maildir::updateMessages was incorrect: inconsistent behavior with other updateMessages(). Removed for now. Fixes: - Some print()s did not distriguish between GLOBs and IO::Files - [Martin Thurn] detected a problem with the call of Mail::Box::FastScalar in Mail::Box::POP3 - [Yuval Kojman] fixed Field::toDate() on systems without glibc. Improvements: - Mail::Message::new(labels) did not work, but was not described either. - Moved all modules to lib/, which removes the need for a nested Makefile.PL, improperly handled by new gnu-make/ExtUtils::MakeMaker combinations. - added UserIdentity to the HTML documentation tree. - added list detector Mail::Message::Head::ListGroup based on information collected in Mail::ListDetector. Tests in 12head/40list.t - added Mail::Messsage::Head::Complete::listGroup() Mail::Messsage::Head::Complete::addListGroup() Mail::Messsage::Head::Complete::removeListGroup() Mail::Messsage::Head::Partial::removeListGroup() - added example 'smaller.pl' to demonstrate how to get rit of selected headers (and how much you gain by it) - added description how to reduce the size of headers by removing groups of fields. - added method $folder->size which estimated a folder size, but may be slow. - debugged and tested Mail::Message::Field::Addresses, Mail::Message::Field::Address, and Mail::Message::Field::AddrGroup, with tests in tests/14fieldu/51addr.t - Added Mail::Message::Field::URIs with tests in tests/14fieldu/52uris. - MailBox now depends on the URI distribution - Move Mail::Box::Message::shortString and ::shortSize to Mail::Message. - Simplified Mail::Message::sender(). - Rewrote Mail::Message::Head::createReceived to work on headers which are not inside a message. - "make test" will produce some more text, and permits skipping all tests for fast installation. version 2.043: Thu Jul 10 10:18:51 CEST 2003 Fixes: - [Greg Matheson] small doc-fix for Mail::Message::Body::Construct foreachLine(). - [Wiggins d'Anconia] time generated by strftime left %z on non-gnu systems. On those systems, a work-around is made using Date::Format. - appendMessage in Mail::Box::File coerces message into the correct sub-class. - Mail::Message::Head::Delayed is not empty. - Mail::Message->read will strip the status fields from the header by default, for security considerations. - Mail::Message->bounce will not interpret status fields. Improvements: - labelsToStatus and statusToLabels are now only implemented for file based folder types, like mbox. - Implemented Mail::Box::Message::Destructed with a Mail::Box::Message::destruct(), Mail::Message::destruct(), and Mail::Message::Part::destruct(), tests/50mesage/60destruct.t to forcefully free-up most memory used by a message. - Added Mail::Box-Index, the documentation index. - Extended documentation about . various ways to access header field data . message labels (flags) . various class relations - Now requires Object::Realize::Later version 0.12 - [Todd Richmond] contributed Mail::Box::FastScalar, which is a replacement of IO::Scalar... but faster. It should be a separate module, but for now it has a place. FastScalar is faster and does not leak, as its brother. - Removed last uses of IO::ScalarArray, because it seeks awfully slow. - Added Mail::Message::study() Mail::Message::Head::study() but it is not usuable yet. version 2.042: Tue May 20 14:32:05 CEST 2003 Fixes: - Added message-id to the wrong side of the Reference field in reply() and forward(). Fix by [Mike Mimic] - [Tassilo v Parseval] reported an error when HTML::FormatText was not installed. - [Alex Liberman] found that searching nested messages failed, because they were treated as multiparts. - [Todd Richmond] demonstrated that multiparts contained circular references, which increased memory consumption. Not hard too fix. Improvements: - Implemented Mail::Box::Dbx to read Outlook Express files. Tests in tests/45dbx/* - Implemented Mail::Message::Head::Partial, which will contain a subset of headers without knowing where to find the rest of it. ::Subset knows where to get the rest. Tests in tests/12head/30partial.t - $head->removeFields(), $head->removeFieldsExcept() and $head->removeResentGroups to free up memory. This "upgrades" a complete header into a partial header. version 2.041: Thu May 8 14:05:32 CEST 2003 Fixes: - [Supriya Jagadeesh] showed that reply(include => NO) did not work. Apparently, no-one used it before. - [Shagren] showed a patch to avoid an locale based date field to be produced, where rfc2822 requires an English format. As change, the locale based parts of strftime are avoided. - sendmail and started with extra -i flag, to avoid stop at lines in message which only contain a dot. Spotted by [Tim Sellar] - [Bill Moseley] detected that examples/reply.pl called an non-existing quotePrelude(), which should have been replyPrelude(). - [Dimitris Glynos] Mail::Message::Field::Full:_decoder() should decode, not encode :( - [Dimitris Glynos] Mail::Message::Construct::reply() did not use the subject of the sender to create a new answer. Improvements: - Translated all docs to use OODoc. Many small fixes in the docs were the result. - Removed $folder->clone, because it implemented the same as $folder->openRelatedFolder, which has a much better name to describe the action performed. - Rewrote documentation for Mail::Box::scanFromMessages(). It now also accepts a timespan as value. - Documented all available overloading (which is quite important). - Mail::Message::Construct has been taken apart in multiple Mail::Message::Construct::* packages because it grew too large and it simplifies including examples. - Added Mail::Message::Construct::Rebuild, which can modify existing messages. Very slick! - Mail::Message::Part's get an empty header by default. version 2.040: Mon Apr 14 15:48:54 CEST 2003 Fixes: - Mail::Transport::Exim could not find destinations(). Move that method from MT::SMTP to MT::Send. Thanks to [Greg Matheson]. - [Dimitris Glynos] fixed one more place where a failed login for POP3 caused Mail::Box to hick-up. - [Dimitris Glynos] made Mail::Box care about succesfull reading of messages. - [Shagren] reported that the CRLF changes on POP3 did break POP3 under Windows. The problem is that the IO::* modules (like IO::Socket) do not implement BINMODE: you can not set them in 'raw' mode. Implemented a work-around. - [Steve Lewis] explained why information about a body was not preserved over a clone(). He provided a patch. - [Todd Richmond] found-out that Content-Type lines sometimes doubled. The reason behind this was that header and body shared the same field structures, which blocked the auto- destruction of header lines which were obsoleted: the old Content-Type line in the header was kept alive by the body. - [Michael D Richards] reported another corruption in construction of binary attachments. Fixed that as well. Improvements: - [Alexander Bauer] reported a very slow Mail::Message->read for large messages. This was due to IO::ScalarArray (being extremely slow in seeks), which now is replaced by IO::Scalar. - Do not use eval{binmode $fh}, but carefully check whether the $fh can handle binmode before calling it in the parser. - Remove newlines from header field data which is passed as objects. When they stringify with newlines included, this disturbes folding. - Added comments on how (not) to change the body of a bounced message. Do never do it, but if you have to then... - Mail::Message::Construct::reply handles nested messages and binary files better to construct an answer. version 2.039: Sun Mar 30 17:34:43 CEST 2003 Fixes: - [Phil Holden] supplied a patch to Mail::Transport::POP3 to send CRLF line terminations, and improvements on handling the welcome message. - [Mike Cudmore] found a bug which caused a call to parts() on lazy nested messages. - [delepine@u-picardie.fr] patched conversion of Mail::Message to Mail::Header in Mail::Message::Convert::MailInternet. - [Sebastian Willert] showed that multipart/anythings were always changed into multipart/mixed things after an operation on them, like attach. - [Dimitris Glynos] found that a log-in failure for POP3 tried to establish the connection twice. - [Michael D Richards] reported corruption in construction of binary attachments, which was caused by buildFromBody always converting CRLF -> LF (on Unix). Removed this. - [Christoph Dahl] reported that header field attributes with blanks around the '=' where not detected. Some flexibility added. - [Eugene Eric Kim] reported the problem where incorrect in-reply-to or References fields could cause thread cycles which where not usuable. Cycles will be ignored. Improvements: - [Marty Pauley] supplied a patch to use MIME::QuotedPrint for Mail::Message::TransferEnc::QuotedPrint. Originally, the module implemented en/decoding by itself in Perl, however since MIME::QP is a code module, the advantages disappeared. - Mail::Message::Body::Multipart's preamble and epilogue now accepts strings, so you so not have to create a body for them explicitly. version 2.038: Wed Feb 26 16:20:03 CET 2003 Fixes: - It was not possible to remove POP3 messages with $msg->delete noticed [Jason Woodward] - An empty header field could still be a cause of problems. They were removed from the header, with a warning. Now changed the warning into a notice message, and the fields are kept. A fix and test by [Marty Pauley] - POP3 messages where not readible when the server does not support UIDLs. Silly bug, solved by [Andreas Fitzner]. version 2.037: Sun Feb 23 14:53:50 CET 2003 Fixes: - MBOX write policy INPLACE contained serious bugs. Upgrade adviced if you use it (not the default) reported by [Michael Reece], but by [Greg Matheson] before. - Mail::Box::Manager::decodeFolderURL() return ref hash instead of hash values. Patched by [Benjamin Pineau] - MB::Mbox::Message::print() did not encapsulate 'From ' lines. Behavior has changed: print() will only simply print head and body, and write() will encapsulate a message as required for the folder. Problem detected by [Nik Clayton] - For retreival of addresses, the whole field contents of an address field is used, not only till the first semi-colon. - [Melvyn Sopacua] reported an accidental call to 'confess', which was a left-over of the debugging process. It triggered for an MH index, when a field was requested which was not defined. Improvements: - Many warning and error message have changed a little to be more consistent or (in most cases) much clearer about the meaning. - added isModified() methods as alternative to modified(), which is more consistent with other method names. - added isDeleted() methods as alternative to deleted(), which is more consistent with other method names. - [Benjamin Pineau] found the cause of an enormous slow-down while parsing large messages: tell() and seek() in IO::ScalarArray objects. With a small patch, everything goes smooth and fast: use getpos() and setpos().... - Translated Mail::Message:TransferEnc::Base64 to use MIME::Base64, now MIME::Base64 is a core module for 5.8.0. The old algorithm was not able to handle too long encoded lines, as [Chris Kungfoohampster] discovered. - Testfile 40mbox/30delete.t should renamed to 40mbox/30delay.t Testfile 40mbox/70inline.t should renamed to 40mbox/70inplace.t version 2.036: Thu Feb 13 18:18:29 CET 2003 Fixes: - More attempts to protect $_ against eval's which apparently change it in ./test.pl. Hope the installation is smooth now. - CPAN::install can come back to a different file-system location when installation is completed. Try to restore that in test.pl. - [Tom Allison] discovered that a folder opened for 'a' does not work with addMessage(): the messages where not read. - [Simon Cozens] found two problems in $msg->parts($coderef) and $msg->parts('ACTIVE'|'DELETED') on non-folder messages. - [James Sanford] found that conversion to MIME::Entity did not work for nested multiparts. Mail::Message::Construct::lines() was not context sensitive (now returns ref-array in scalar context), and detection of multipart was wrong in case of nested multiparts. - [Karen Craven], [Tom Allison] and [Michael D Richards] where right with their explanation why message-ids were created incorrectly. Improvements: - Mail::Transport now also supports 'postfix' as alias for 'sendmail', thanks to a question by [Tom Allison]. - Tests for unicode fields are moved to their own directory, tests/14fieldu, which is not considered critical on failure. - Copyright set to 2001-2003 - [Todd Richmond] requested to keep the folding of fields when they are added to a header. Field::setWrapLength() has been changed not to re-fold already folded fields. - As explained by [Eric Wheeler], spam and virus filters do not like the message parser to stop on broken headers. Therefore, a new option Mail::Box::new(fix_headers) is created. This option progresses into a few other classes, and should be usable with all folder types. version 2.035: Fri Jan 24 20:41:23 CET 2003 Fixes: - Mail::Reporter::defaultTrace() now accepts names as well. Recieved a fix by [David A Golden] - Mail::Message::Field::attribute() now returns (undef) when the attribute is not defined. Patched by [Marty Pauley] - [Jost Krieger] found that getline() in ::Base64 does catch the read line in $_, which could be expected reading its doc. - message/rfc822 within delayed multiparts are now triggered correctly. - [Beirne Konarski] found out that eval{} in test.pl sometimes modified $_, which broke installations. - Headers from body where lost in multipart. Reported by [Nik Clayton]. Improvements: - {Greg Matheson] contributed Mail::Transport::Exim, to send email using an external exim client. - Added Mail::Transport::new(executable) which offers you a way to explicitly specify where the transfer agent is located. - Changed Mail::Transport::SMTP::init(debug) option into smtp_debug, to show that it is not Mail::Box which is being traced, but the low level SMTP drivers only. - Added some example options to examples/send.pl, which showed some inconveniences of Mail::Message::send(), which have been solved. - [David A Golden] wrote Mail::Classification based on Mail::Box, which is a learning spam filter. References added to README.FAQ - Doc-fix in Mail::Message::from/to/cc/bcc() by [Greg Matheson]. - Renamed Mail::Message::Field*::folded_body() and ::unfolded_body() to ::foldedBody() and ::unfoldedBody(), to be consequent with the method naming of Mail::Box. - Mail::Message::TransferEnc::Base64::_decode_from_lines() does not warn anymore in case of a line which only contains padding. Found by [David A Golden] - Mail::Messsage::Field::stripCFWS() now understands escaped quotes and parenthesis. Parenthesis within quotes are not seen as comment anymore. - Implemented Mail::Message::Field::Full with many tests in tests/11field/40full.t. Implements RFC2047. - Implemented Mail::Message::Field::Attribute with many tests in tests/11field/41attr.t It implements field attribute understanding as defined in RFC2822 and RFC2045, with the extensions about parameter encoding and continuations as defined in RFC2231. - Implemented Mail::Message::Field::Unstructured, as first category of fields. Tests in test/11field/42unstr.t - Added Maildir quotas to the long wishlist. Suggested by [Brian Grossman] - On request by [David A Golden], Mail::Reporter now returns Scalar::Util::dualvar values where the use may wish to know the numeric value as well as the string representation of an error level. Tests added in tests/10report/10errors. - Modified examples/grep.pl you unix-grep syntax - Mail::Box::Search now takes nested messages under the flag of multiparts (search or not to search, that's the question) - Mail::Message->build and buildFromBody now accept a pre-filled header. - Mail::Message->build accepts a new option 'files', which is an abbreviation for multiple 'file' options. - Mail::Message::TransferEnc::decode() now als decodes chars above 127 and tab. Escape characters are still not decoded for safety reasons. On request by [Marty Pauley] version 2.034: Thu Jan 2 15:08:56 CET 2003 Fixes: - When a message is added to a folder, it shall be flagged as modified, otherwise the message is not written when the folder closes. Problem discovered by [Greg Matheson]. - Mail::Message->read() did not inspect the status fields. Spotted by [Simon von Janowsky] - When an empty field is folded, at least a new-line must be produced. - Mail::Box::File::appendMessage() doesn't need to open the folder locked: appending should be a safe action. Reported by [Greg Matheson]. - multipart->lines accidentally did not include the headers of the parts. Spotted by [Constantin Khatsckevich] Enhancements: - Resent Groups in the header now also support Delivered-To. - Renamed some toString() methods to the more consistent name string(), without breaking backwards compatibility. version 2.033: Thu Dec 12 11:23:42 CET 2002 Fixes: - [Greg Matheson] found a truncate() difference between Windows and UNIX: fewer errors for the Windows test. - [Greg Matheson] solved problem with mbox write-replace related to \n -> CRLF translations vice versa. The number of problems for Mail::Box on Windows decreased even furter. - Some improvements of the tests.pl scripts, related to the installation of optional modules when Term::ReadKey is not installed. - Mail::Message::Part::parent() 4th try to solve... on some places, the body was returned, in other places the surrounding message. This was partially caused by the confusion created by the name of the method. Therefore, the method is renamed to "container" which returns a Mail::Message::Body::Multipart or ::Nested. - appendMessage requires access => 'a' to the folder. [Greg Matheson] - Parts of multiparts which do not contain any header lines were stopping the parser to look for more parts: all the rest was put in the epilogue of the multipart. Detected by [Melvyn Sopacua] - Mail::Message::Part's can contain empty bodies. Spotted by [Melvyn Sopacua] - Hopefully, the installation of option modules has smoothened a little. - Mail::Box::File::appendMessage() didn't check success for opening a folder. Reported by [Melvyn Sopacua] - default for $mgr->appendMessage was to create an MH, not an mbox folder. Improvements: - tests/55locking/20flock excluded for Windows: no flock implemented. - Added examples/strip-attachments.pl by [Pjotr Prins] - Mail::Reporter::AUTOLOAD will produce a class name in the error message if a class method failed... The blank is not very informative. - "create" is now a valid option for Mail::Box::(Mbox|MH|Maildir)::new, which required some changes in the Mail::Box::Manager as well. version 2.032: Fri Nov 29 19:59:47 CET 2002 Fixes: - Enforce Text::FormatPS version 2.01, because the output format has changed. Scripts adapted to the new layout. [Blair Zajac] - Required Term::ReadKey for installation. [Greg Matheson] - Silly problem with lock-filenames... detected by [Blair Zajac] - $part->toplevel did not return a message, but a body. Detected by [Pjotr Prins] - $part->delete did not seem to have an effect... silly bug caused this problem, which was spotted by [Pjotr Prins]. Improvements: - Removed dependency from Term::ReadKey. - $msg->printStructure shows parts which are flagged to be deleted. version 2.031: Mon Nov 25 14:50:23 CET 2002 Fixes: - Mail::Box::Locker::new(file) has now comparible meaning for DotLock and flock locking methods. - Removed Mail::Box::Locker::POSIX from Windows options: not all fcntls present. Improvements: - MBOX handling of the parser much simplified. - [Blair Zajac] is still nitpicking about close()... - $Mail::Message::crlf_platform added as central resource for all modules which have to know. - Mail::Message::Body::File::size() compensates for "superfluous" CRs in the file's line-endings. - Messages in test-scripts are compared by a special function which permits differences in Content-Length for platforms with CRLF (Windows) - Message sizes in thread-dumps within test-scripts are ignored by a special function, but only on CRLF platforms like Windows. - Some code has moved from Mail::Box::Parser::Perl into Mail::Box::Parser Cannot break existing code. - Quite some code has moved from Mail::Box::File to Mail::Box::Mbox. Cannot break existing code. - Added Mail::Box::Search::IMAP as place-holder for a dedicated (remote) search implementation using the IMAP protocol features. - Added Mail::Transport::IMAP, Mail::Box::IMAP, and Mail::Box::IMAP::Message with some pseudo-code how IMAP folders could be handled. - Improved the docs on ::POP3 - Mail::Box::POP3 now refuses addMessage() and addMessages() with nice errors. When someone implements the writing extensions to POP3, this may change. update() still has to be implemented - Multipart message will also have a Content-Length in the header. - Mail::Message::Convert::MailInternet requires Mail::Message [Adam Byrtek 'alpha'] - New version of tests/POP3/server, which can be used to test the POP3 client against some weird POP3 servers. [Liz Mattijsen] - Upgraded Mail::Box::write() to allow mid-life writes of files. - Removed option Mail::Box::write(keep_deleted), because it is unsafe. - Replaced all uses of FileHandle by IO::File. - test scripts ask for optional packages to be installed. The user will be asked per package... more info about it has been added, for instance the option Mail::SpamAssassin. version 2.029: Mon Nov 4 21:06:30 CET 2002 Fixes: - Empty header lines where printed without trailing new-line. This was spotted by [Blair Zajac] soon after the release which broke it: do not use 2.028 - Some extra checks for the return-code of close(), added as wished for by [Blair Zajac] version 2.028: Mon Nov 4 15:08:57 CET 2002 Fixes: - [Greg Matheson] decovered a small bug in the 10field test-script. After being corrected, it showed a mistake in MM::Field with folding very long words in field bodies. This bug was corrected. - Fixed a parser bug in MBOX, which showed an error when closing a folder without explicit write before it. Reported by [David A Golden] - [Blair Zajac] reported that the multipart boundary was not added to the Content-Type field. - [Sebastian Krahmer] adviced me to put a very strong warning against the use of mailx (Mail::Transport::Mailx), which is accepted because the funarability has been proven: mailx is exploitable insecure. - [Shagren] hit a POP3 server which does not add a blank at the end of each message. The last line of his message body was removed because Mail::Transport::POP3 did not anticipate that. Improvements: - In joint forces with [Greg Matheson], some small improvements have been made in the mailbox parser for Windows... But it is still far from perfect. version 2.027: Sat Oct 26 08:52:32 CEST 2002 Fixes: - Lazy Mail::Box::Dir::Message::print() (mbox and mh messages) used File::Copy's copy(), which cannot handle IO::Lines file objects as destination. Replaced by own implementation. [Tony Bowden] reported this problem, and fix my patch as well. - Mail::Box::find() was not able to get the id of the first lazy-loaded message. - The empty line which preceeds a separator in mbox folders was accidenitally included in the body of the message before it (this was quite hard to fix) [Albert Schueller] - Mail::Message::Body::Multipart::foreachComponent(), used by many multipart methods, created Mail::Message i.s.o. Mail::Message::Part objects. This is not right: especially encode() and decode() where frustrated by it. Same for nested messages. Signalled by [Mike Cudmore] Improvement: - Mail::Transfer::POP3 implemented by [Liz Mattijsen]. - [Shagren] found the first reason to modify Mail::Transfer::POP3 a little. - Mail::Box::POP3 and Mail::Box::POP3::Message should be working now. Mo Tests are included. - Reorganized the tests. This is needed, because the number of testscripts grew too long for Windows! Besides, I need more control over installation of optional packages. - All folder-types now have a type() method. - All folder-types now have a url() method, which result van be used to specify a complex folder name to the Mail::Box::Manager. - [David Favor] asked to show the filename when an illegal header is detected by the parser. - Rewrote Mail::Box::scanForMessage() in search of a bug reported by [Shagren] concerning Mail::Box::find() But it was not the cause. Still, the method has improved. - Changed split /(?<=\n)/ into split /^/ everywhere. version 2.026: Mon Oct 7 23:39:07 CEST 2002 Fixes: - Default package for $msg->send was broken. Reported by [Jeremy Banks] Improvements: - Mail::Message::Field::wellformedName() produces better results, thanks to [Emmet Cailfield] - Many more tests are succeeding under Windows, since [Greg Matheson] sent me the output of the tests based on Test::More. Thanks Greg! - Mail::Transport::SMTP warns when send(To => $to) is used where send(to => $to) is needed. [Jeremy Banks] - Mail::Message::Head::ResentGroup::set(field) added Mail::Message::Head::ResentGroup::createReceived() added Mail::Message::Head::ResentGroup::destinations() added - Mail::Message::Construct::bounce() now adds Resent-* lines to the first Received line, if available. - Mail::Message::Head::ResentGroup::new() creates a received field if not defined. - Mail::Message::Head::Clone uses $head->addNoRealize i.s.o add(), and thereby does not re-fold the headers anymore. - Deleting or resetting a non-existing field in the header will not flag the message to be 'modified'. - Implemented Mail::Box::Search::SpamAssassin, a spam filter - Implemented Mail::Message::Wrapper::SpamAssassin, a wrapper used in the new spam filter. - Implemented authorization for SMTP, based in work by [Michael de Beer] - X-Spam-* headers are not disclosed for transmission. version 2.025: Mon Sep 23 13:11:57 CEST 2002 Fixes: - Accidentally left debug-printstatements in Mail::Transport::SMTP - Fixed "from" address used in Mail::Transport::SMTP. Improvements: - MIME-Version header line automatically added to constructed messages (rfc 2045). [Matthew Darwin] version 2.024: Sun Sep 22 23:06:55 CEST 2002 Fixes: - SMTP sending accidentally only included the headers *not* to be disclosed :( The check has the correct negation in Mail::Message::Field::toDisclose() now. Reported by [Matthew Darwin] - Generated messages without message-id must get one assigned. Reported by [Matthew Darwin] Improvements: - All tests converted to use Test::More, which produces better feedback on failures. Hopefully, failures on Windows will start disappearing now. - Mail::Box::Dir::Message's take their size from the real file (unless they are modified) - Mail::Box::Mbox now derived from new Mail::Box::File - Mail::Box::Mbox::Message now derived from new Mail::Box::File::Message. - Set the shape of the message-id with Mail::Message::Head::messageIdPrefix() - A message constructed without data will be an empty text message, not an empty multipart :( - Mail::Message::Construct::build() now calls buildFromBody() to prepare the whole message, instead of doing it itself. You can also specify field objects to buld() now. - From and To fields are no longer required to construct a message. They may be filled-in later. - Mail::Message::Construct::bounce() now uses the MM::Head::ResentGroup object, which much improved outcome. - Made a start with Mail::Box::Search::SpamAssassin. version 2.023: Sat Sep 14 11:11:03 CEST 2002 Fixes: - t/65search.t failed for some Perl versions, dependent on the hash implementation. Mail::Box::Search::Grep::inHead did not use MM::Head::orderedFields() yet. Discovered by [Blair & Liz & Greg & Conrad Heiney] - Mail::Box::Mbox includes IO::File with () to avoid colission between constant definitions in IO::File and POSIX. Fixed by [Marcel Gruenauer] version 2.022: Mon Sep 9 18:55:01 CEST 2002 Detailed checks against RFC2822 is in progress, which means that some changes have to be made. The API had to be changed on some places, but on most places could be kept unchanged. Application breakers: - $msg->from now returns a list fo addresses! Mind the context! required by the RFC. - stringified $body->type returns whole Content-Type body. Use $body->mimeType! Example: if($msg->type eq 'text/html') # breaks now if($msg->mimeType eq 'text/html') # works as always - a header field stringifies to "body; comment", not only the body. Fixes: - Messages which of unknown Content-Type (unknown by MIME::Types) could cause segmentation violates. Solved by [Darrell Fuhriman] - In Mail::Box::Manager, the method foldertypes() was called, which should have been folderTypes(). [Swapnil Khabiya] - Mail::Message::Construct::replyPrelude produced warning when from address of originating message dit not defined a user's name. Now it has a fallback. Reported by [Jon Thomason] Improvements: - new method Mail::Box::Message::moveTo() - new method Mail::Message::sender() - Mail::Message::Convert::selectedFields() retuns fields now (in the right order), not field names. - Mail::Reporter::log() now also as class method. - Mail::Reporter::defaultTrace() to set program global defaults for logging and tracing. - New class Mail::Message::Head::ResentGroup with tests in t/12head1r.t - Mali::Message::Construct::printStructure now accepts a filehandle. - reply() takes return address from: Reply-To || Sender || From (Sender added) I have re-read specification rfc2822, and reimplemented the three Mail::Message::Field* objects. The next changes are made to these objects: - field data is only stored in folded form to improve performance during parsing and reduce memory consumption (which is quite high for headers) but also to be able to handle structured fields better. This introduced two new methods: folded_body() unfolded_body() The body(), comment(), and content() are quite different now, although return the same results. - toDate() without argument returns an rfc2822 valid date representing the current local time. - new() accepts attributes. The OPTIONS are only available for ::Flex fields. - attributes handle escapes of quotes in quoted strings. - new method length() which returns the total field length. - new method toDisclose() which tells Mail::Message::Head::printUndisclosed whether the header should be visible for extenal receivers. - new method stripCFWS() removes comments and folding white space from header lines. This should only be used on structured header fields. Tests in t/11cfws.t - new method dateToTimestamp converts a date in RFC2822 spec into a timestamp. Also Mail::Message::Head got revisited. The order of the fields is protected stronger. - new method orderedFields() - new method addResentGroup() - new method resentGroups() - new method removeField($field) version 2.021: Tue Aug 20 17:42:24 CEST 2002 Fixes: - Requires HTML::TreeBuilder release 3.13 or newer, if you want to use Mail::Message::Convert::HtmlFormat*.pm, because 3.12 contains a serious bug. Resolved by [Blair Zajac] - A mistake in the previous release could cause that parts of multiparts where lazy. This is not correct: all parts must be extracted at once. Detected by [Jost Krieger] - Another bug introduced with the previous release was the removal of automatic body-to-messagepart coercion. - When a nested body was checked on encoding, it accidentally returned its nested content, in stead of itself. Detected by [Blair Zajac] - Mail::Message::isMultipart triggered the body, which is not needed because the info is in the header as well. - pod2html translators are terrible. Put more sofistication in my html-polisher. Improvements: - Carp is stringifying objects, which is terrible in combination with overloading stringification on message headers and bodies. Therefore, a special exception for stringification is added to return a different result to Carp. - The Mail::Box::determineBodyType is simplified. - Multiparts and Nested (rcf822) message are now also delayed when their size is not known (often the case) or too large. - Implemented Mail::Message::Part::buildFromBody() to assist the improved Mail::Message::Part::coerce() - Testing cloning of complex messages in t/58clone.t version 2.019: Thu Aug 15 09:46:42 CEST 2002 Fixes: - Parsing messages could destroy $_ and IN/OUT file-handles from the user's program. Found a few places in Mail/Message/Body/*.pm Problem spotted by [Jerrad Pierce] - Mail::Message::Head::Delayed extends a Mail::Message::Head, not a Mail::Reporter. - Using an Index with MH folders caused each message header to be triggered: a considerable slowdown. Improvements: - [Blair Zajac] donated a large set of documentation fixes. Even some hidden bugs got fixed this way. - Implemented Mail::Message::Body::Multipart::file(), because it is required for Mail::Transport::SMTP. Spotted by [Marty J. Riley] - Mail::Box::Tie::ARRAY and ::HASH simulate real arrays and hashes better with respect to deleted items. - Mail::Box::Message::Dummy is renamed into Mail::Message::Dummy, which inherit from Mail::Message, not Mail::Box::Message. - Mail::Message::Dummy's now follow the standard pattern of Mail::Message. - The Mail::Box::Thread::Manager is now also an extension of a Mail::Reporter. - The Mail::Box::Thread::Node is now also extends Mail::Reporter. - Added extra doc to MH::Message to avoid confusion between seqnr and filename (which is a number as well). Needed by [Jerrad Pierce] - Mail::Message::Part::clone is not a special case of clone at all. Removed. - Mail::Message::Part::coerce() was much too complicated: most work is already done in Mail::Message::coerce() - The documentation and sometimes also the location of code in Mail::Message::Head* packages has been improved. - Improvements in text of Mail::Box-Overview. version 2.018: Wed Jul 10 23:03:08 CEST 2002 Fixes: - Parser will immediately study multipart en nested messages, because otherwise it will get stuck in nasty multi-level situations. Discovered by [Francois Petillon] - More picky with quotes in header field attributes... Continuing story with weird multipart boundary strings. This time, [Blair Zajac] forced some improvements. - Empty headers were not properly skipped. Usually this went undetected... however not in a very rare case [Blair Zajac] - For read-only folders, the manager always complained about "closing changed folders". Reported by [Blair Zajac] and fixed. - [Greg Matheson] tries to get Mail::Box running on the Cygwin platform, which will benefit everyone, because it is stricter than UNIX in some cases.... for instance, the Perl parser objects left the file-handle open.... - [Blair Zajac] detected that double messages in a read-only folder cause "Changes not written to read-only folder" messages. Not anymore: the doubles will not be flagged for deletion. Improvements: - Filenames sometime contained double /'s between folderdir and foldername. Removed. - Foldernames can be specified like this: pop3://username:password@host:port/folder which is broken into separate arguments in a very early stage. This is especially useful when the name is passed in $ENV{MAIL} - Start of implementation for Mail::Transport::POP3. - To make space for ::POP3, which is a message receiver, the message senders are now derived from Mail::Transport::Send. New options are added which certainly improve the interface. New packages: Mail::Transport::Send Mail::Transport::Receive Mail::Transport::POP3 - Foldernames via $mgr->open() may be specified as URL, for instance $mgr->open('mbox:/tmp/inbox') $mgr->open('pop3://me:secret@pop3.server.com:120') - $mgr->close($folder) and ->closeAllFolders() accept the normal options for $folder->close(OPTIONS). - $folder->appendMessage($msg) now returns the coerced message. - Mail::Box::Dir::messageId() should not trigger headers to find unparsed headers with the id: that's the task of Mail::Box::find(). The code was not consistent with the docs. - Removed Mail::Box::Dir::readAllHeaders()... it contained a bug, so was apperently never used. And that's a good thing. - Small set of additions to Mail::Box::Net and Mail::Box::POP3 Still in the early stages of development. - The parser will complain about files which were modified while it was working with it. Some cases where the parser accidentally stayed open were closed to resolve the complaints for the tests. version 2.017: Fri Jul 5 17:06:08 CEST 2002 Fixes: - Thanks to [Liz Mattijsen] for the detection of some flaws in the QuotedPrintable encoding. Fixed it. - Nested (rfc822) message clone() did not work. Detected by [Blair Zajac] - [Greg Matheson] is fixing the test suite for Windows. Very good work. Changes made in t/65search.t Improvements: - Deleted parts will not be returned in $multipart_body->lines - Deleted parts will not be counted in $multipart_body->nrLines and ->size - Deleted parts will not be cloned. - For efficiency reasons, $multipart_body->foreachComponent will skip deleted parts as well. - Mail::Box::messages() accepts range: $folder->messages(3, 100) non-deleted: $folder->messages('ACTIVE') deleted: $folder->messages('DELETED') labeled: $folder->messages('seen') labeled: $folder->messages('!seen') code: $folder->messages( sub {$_[0]->size > 10000} ) limiting the default result being all messages. - Mail::Message::parts() accepts non-deleted: $msg->parts('ACTIVE') deleted: $msg->parts('DELETED') nested: $msg->parts('RECURSE'); code: $msg->parts( sub {$_[0]->size > 10000)} ) - Mail::Message::Body::Multipart::parts accepts non-deleted: $body->parts('ACTIVE') deleted: $body->parts('DELETED') nested: $body->parts('RECURSE'); code: $body->parts( sub {$_[0]->size > 10000)} ) - Mail::Box::allMessageIds() renamed to messageIds(), but old name still available. - Add suggestion to close() without writing changes. - Avoid testing of maildir folders for Windows. They are not supported, because maildir uses characters in filenames which are not acceptabled for the Windows file-systyem. [Greg Matheson] - Added Mail::Box::POP3, Mail::Box::POP3::Message Mail::Box::Net, and Mail::Box::Net::Message as first steps to a POP3 implementation. version 2.016: Tue Jun 25 16:24:54 CEST 2002 Fixes: - [Edward Wildgoose] was very persist in pushing me to test return codes in Mail::Transport::SMTP. Late transport failures are reported back now. - [Jeff Squyres] attributes in header fields must be matched case-insensitive. - $folder->writeable --> $folder->writable, but old method kept for backwards compatibility. - [Andreas Piper] AIX also requires r+ on a file to get locking via FLOCK to work. I made the detection 'compile-time'. - The folder to be locked was optional, but used in error messages. Now if is not optional anymore, thanks to [Andreas Piper] - Simulated sub-folders in Mbox were not correctly automagically created. Improvements: - Document fixes in Mail/Transport/SMTP.pm by [Liz Mattijsen] - Recursive copying of whole folders, which may include conversions with Mail::Box::copyTo() with tests in t/66copyto.t - Interface change: $mgr->addMessages, $folder->addMessage, $mgr->appendMessage, $folder->appendMessage, $mgr->moveMessage, $folder->copyMessage, $message->copyTo now all return the coerced message(s), because that is much more useful than the message which are passed into the method call, the folder, or the class. - Mail::Box::Manager::open() is rewritten, and a such much improved. - Much stricter handling of folder closing and folder deletion: when a manager is used, folders are removed before global cleamup commences. - Mail::Box::Manager::registerType is not requiring all known folder types anymore. This means that adding folder types is without cost now: they are compiled only when used. version 2.015: Tue Jun 18 19:41:45 CEST 2002 Fixes: - Duplicated messages without subject or to fields will not produce errors anymore. - Duplicated messages produce NOTICE now, not WARNINGS. Same for empty fields and other minor things the parser detects. - Multiparts where not correctly processed when read from STDIN: the body type was '::Lines' only. Bug reported by [Evan Borgstrom] - Bogus message-IDs <> caused problems, but these situations are avoided now. Problem found by [Jost Krieger] Improvements: - message/rfc822 messages are handled now via a Mail::Message::Body::Nested.pm, Tests in t/21p9rfc.t This all because [Max Poduhoroff] asked for it ;-) - Removed all tests for Inline::C parser.... - Mail::Message::Body::AUTOLOAD handles errors better, which should provide nicer error-messages. - Updates on MH/Maildir messages will first be created in an 'invisible' name, to avoid accidental access to partially written messages Mail::Box::Dir::Message::create() - Mail::Message::Parts can be deleted (ignored for printing and sending). $part->deleted, $part->deleted(0), if($part->deleted) - timestamp() prefers time from last Received field over first [Jost Krieger] - Mail::Transport::SMTP: contactServer() --> contactAnyServer() new method tryConnectTo($host, @options); - $msg->printStructure for debugging purposes (see Mail::Message::Construct) - Now requires MIME::Types v1.001 - Mail::Message $msg implemented $msg->string, ->lines, ->file version 2.014: Tue Jun 11 16:26:13 CEST 2002 Fixes: - Forgot to implement the 'delete' method for a header field. The 'reset' method was available to achieve it, but harder to discover for unexperienced programmers. Now 'delete' simply calls 'reset'. Spotted by [Mark Weiler] - A coerce() from Mail::Message to Mail::Box::Message has to clear the deleted flag (to avoid errors). At the same time, the modified flag is cleared. Detected by [Max Maischein] - create option to Maildir's works now. - Signature separator '--' ==> '-- ' - [Gilles Darold] found that m!(['"]?)([^\1])\1! doesn't work. apparently, [^\1] is not working. Temporarily fixed with [^'"] in Mail::Message::Field. Improvements: - Mail::Transport::SMTP is working now. - The 'clone' operation on a message will return a Mail::Message object, which avoids complications with copying message between different kinds of folders. - Maildir messages are moved from 'new' to 'cur' with the new method 'accept'. - Mbox, MH, pure Perl parser, and modules status "Released" (was "beta") - Maildir status "Alpha" (was "under development") - Added some docs to Mail::Transport about receiving messages via POP3. This code may appear in the near future. - Implemented Mail::Message::Convert::TextAutoformat, t/90textaf.t - Implemented Mail::Message::Convert::HtmlFormatText, t/90htmlft.t - Implemented Mail::Message::Convert::HtmlFormatPS, t/90htmlfps.t - Initial coding of Mail::Message::Convert::Html, t/90html.t - Mail::Message::Head::grepNames() now accepts regexes as well. - Mail::Message::Field::wellformedName method added which returns preferred capitization of a field's name. The name() method returns the lower-cased name. Tests in t/11field1.t - Mail::Message::Field::content returns both body and comment part of the message header line. - added Mail::Message::Body::charset() to simplify code. - removed useless Mail::Message::printUndisclosed(). version 2.013: Thu May 23 11:30:35 CEST 2002 Fixes: - Create MH directories when asked to. [Greg Matheson] reported the problem. - Mail::Box::Locker::new "timeout" and "wait" options where too confusing to be implemented correctly. So they didn't work as described. Now, they are called "expire" and "timeout". Thanks to [John B Batzel] for pointing-out the problems. - Messages with empty bodies where not accepted at all. This combined with a mistake in treating these errors in Mbox folders gave s when asked for a body. Improvements: - Maildir implementation runs all its tests. Still there are some support functions lacking. Reports are that sub-folders are to be implemented differently. version 2.012: Mon Apr 22 15:53:05 CEST 2002 Fixes: - [alex] found-out that remove_when_empty and save_on_exit could not be set to false for Mail::Box'es. - [Cory Johns] examples/reply.pl closed the folder but later still used one of its messages. This is not permitted, but may be allowed later. - [Robin Berjon] multiple improvements to the Maildir implementation. Not finalized yet. - Mail::Message::Construct->build called Body->new(filename => which must be Body->new(file => - Two fixes in Base64 encoding.... Problem reported by [Bernd Patolla] - Forgot to use File::Copy in Mail::Message::Body::File. reported by [Andre Schultze] Improvements: - Creation of new message-files for Mail::Box::Dir::Message extensions implemented by a create($filename) method which tries to be very smart. - [Mark Ethan Trostler] Mail::Message::Field::attribute with value of gave complaints. For now, these calls with will be ingnored. In the close future they will remove the attribute. - Removed references to HTML.pm from all files... version 2.011: Sun Mar 3 23:51:41 CET 2002 Improvements: -- one day of rapid development ;) - Mail::Message::read was confusing many users. Therefore, it has been renamed to readFromParser. - Now read() became unused, it is used to implement my $msg = Mail::Message->read(\*STDIN); Please use it sparsely. - Implemented Mail::Box::Maildir->writeMessages and Mail::Box::Maildir->appendMessages. Tests in t/44mdir*.t Still small things to fix. - Mail::Message::clone() includes labels now. version 2.010: Sun Mar 3 16:05:16 CET 2002 Fixes: - Fixed serious mis-calculation for delayed bodies in MH folders. The 'fail-safe' approach did safe the programs till now, but it is much better now: correct 'Content-Length' headers will safe you time now. - Improved quite some doc-issues in Mail::Box::MH::(Label|Index).pm - Prototype of Mail::Message::Body::_data_from_lines was @_, which is a silly typo checked by bleadperl... [Marcel Gruenauer] - Mail::Box::Parser::Perl line 87, binmode without filehandle... reported by [Marcel Gruenauer] But now it is causing problems with perlio in 5.7.2 ... - Minor changes to scripts/takemail by [Tassilo v Parseval] - Mistakes in the docs of Mail::Box::Search::Grep, found by [Tassilo v Parseval] - Accidentally took only non-delayed messages in Grep: wrong default. Detected by [Tassilo v Parseval] - The METHOD INDEXes ended with a list of links to related manual-pages which where not expanded correctly by pod. Therefor is was changed: now the INDEX starts with the man-pages which will have correct links this time. Improvements: - Changed encoders/decoders status from ALPHA to BETA. - Removed organization option to new() for Mail::Boxes: it is not modifyable. The method which shows whether the folder is DIRECTORY or FILE organized will stay. - *PARTIAL* implementation of Maildir folders, which did have large implications for the MH implementation. The maildir implementation is NOT READY yet. New class structure: Mail::Box::MH is a Mail::Box::Dir <-- new is a Mail::Box Mail::Box::MH::Message is a Mail::Box::Dir::Message <-- new is a Mail::Box::Message is a Mail::Message Mail::Box::Maildir <-- new is a Mail::Box::Dir <-- new is a Mail::Box Mail::Box::Maildir::Message <-- new is a Mail::Box::Dir::Message <-- new is a Mail::Box::Message - Massive changes in label management, required to facilitate Maildir labels which are in the filename. - Added /usr/lib to the safe_directories are searched by Mail::Transport for binaries [Slaven Rezic] - Any Mail::Box type may implement an 'updateMessages'. When $mailbox->update is called and 'updateMessages' exists, the folder tries to figure-out changes in the folder which were made by external programs. External programs may add messages to the end of the folder without applying a lock, which is dangerous. version 2.009: Wed Feb 20 09:03:56 CET 2002 Fixes: - Forgot to update METHOD INDEX - t/65search1g.t tests Mail::Box::Search::Grep, which found some problems in the implementation which are fixed now. Improvements: - Mail::Box::Manager::threads() now also works when the folders are not used as named parameter: $mgr->threads(folders => [$inbox, $outbox]); # was $mgr->threads($inbox, $outbox); # added - Default output file-handle changed from STDOUT to the selected file-handle (see perldoc -f select)... usually this will return STDOUT. version 2.008: Mon Feb 18 16:11:52 CET 2002 Fixes: - [Alan Kelm] proved me that the other perl modules are wrong, wrapping the header-lines more often than the RFC permits. So, wrapping on ';' and '.' is removed. Wrapped headers are always accepted, so there is no difference when reading a folder. - Added 'use Mail::Address' to Mail::Message::Field [Walery Studennikov] - [Andreas Marcel Riechert] Added -I flag for {net|open}bsd with mailx in Mail::Transport::Mailx - The parent of a Multipart body after reading accidentally was a body, not a message. Fixed in Mail::Message::Body::Multipart. Improvements: - New modules Mail::Box::Search and Mail::Box::Search::Grep, however they still need testing. De docs have to be updated too. Mail::Box::Search::Spam must be a piece of cake now. Example in examples/grep.pl - Replaced -w flag in test-scripts by 'use warnings' - Centralized definition of folder-files in t/Tools.pm to simplify implementation on Windows. - t/00windows.t to convert t/mbox.src to t/mbox.win with CRLF line-terminations. - moved Mail::Message::Body::Encode::eol to Mail::Message::Body::eol because is always needed and hence triggered the parsing of Encode.. - Mail::Message::Body::eol option NATIVE will be translated into LF, CR or CRLF. - Mail::Message::Body::*::size will return the size of the message as stored in the file, so taking care of \n which becomes CRLF on some systems. - Croak when $mgr->copyTo/moveTo is used with a message which is not part of a folder yet: appendMessage should be used instead. - Mail::Box::Thread::Node::threadMessages() collects all messages which are in a thread. version 2.007: Mon Jan 14 10:07:09 CET 2002 Fixes: - [Alan Kelm] found a mistake in Mail::Box::Locker::DotLock::_try_lock - [Alan Kelm] updated some docs about locking. - [Alan Kelm] folder->new keep_dups option. - [Alan Kelm] fixed a stupid bug: messages printed to MBOX folders did not get an empty line after them (before the from-line). changed print('') into print("\n") in Mail::Box::Mbox::Messages.pm Mail::Box doesn't need that line, but other mail-agents might. Improvements: - Avoid colissions between two messages which falsily share messageID. One will get a new number. - Start implementing understanding of CRLF / CR and foreign line-endings - Implemented stricter checks. When a body is created, it is not trusted until the data is checked. This is lazy again ;) Specify the checked option for the body is you are sure the data is correct. Also for the folders: when they are `trusted', all bodies will be created `checked', which boosts performance when used with the Perl parser. version 2.006: Wed Jan 2 08:27:21 CET 2002 Fixes: - Accidentally typed (@_) as prototype of some methods. Found by [Jeffrey Friedl] version 2.005: Sun Dec 30 14:25:22 CET 2001 Fixes: - Because of a bug related to weak references in the 5.6.0 Perl core, 5.6.1 is required now... Improvements: - Rewrote Mail::Box::Parser::Perl, to avoid use of unget_line. At the same time, the detection of the folder's line mode is simplified. However, not seek is sparsely used... maybe as next improvement this could be avoided as well. - The performance is improved considerably when the folder is trusted. However, a little slowdown can be experienced for untrusted folders, because better CRLF handling. - $mboxmsg->fileLocation returns only begin message in scalar context. - readHeader returns ref-array for each field i.s.o. four elements in a list. - Mail::Box::Parser::inDosmode is now called Mail::Box::Parser::lineSeparator. Although a start has been made to support Windows and non-native folders, it is not fully implemented yet. - Updated the Mail::Box::Parser manual-page. version 2.004: Sun Dec 16 22:53:06 CET 2001 Fixes: - I didn't know yet, but you can do things like: $reply->head->add(To => $orig->head->get('From')); because of stringification ;) - $message->from also may return the content of the Sender header. - Mail::Message::Construct::quotePrelude renamed to ::replyPrelude, which is more consequent. New: - Added Mail::Message::Construct::forward() and ::forwardSubject. With tests in t/57* - Replies are even more flexible now. version 2.003: Sat Dec 15 00:47:50 CET 2001 Fixes: - Moved stuff from Mail::Message::Head::read to Mail::Box::Parser::readHeader to improve parser indepency and speed. - [Marcel de Boer] showed me that labels were not treated right in Mail::Box v2. Moved from Mail::Box::Message to Mail::Message and Mail::Message::Head. - [Marcel de Boer] also found a problem with cloning of multi- parts which got solved: a Mail::Message::Part is cloned to be a Mail::Message! - Quite a speed improvement too. - Changed version policy version 2.002: Fri Dec 13 17:46:01 CET 2001 Fixes: - Better (less complaining) recovery of bad header parsing. - Removed a back-reference from a locker object to the folder, by which the folders where kept alive although out of scope. "circular reference". According the errors I got when removing this one, there should be no strong refs left. - replaced many "warn"s by "$self->log(WARNING =>"s in Mail::Box::Manager. - Improved handling and creating folders in the Mail::Box::Manager. - A header may be empty, but then it will be 'false'. This is needed to correctly recover corrupted mbox folders. New: - Mail::Message::Field::Fast implements a fast but dirty way to store the header information. Tested in t/11field1.t It saves about 10% memory and 7% performance. - Mail::Message::Field::Flex implements an extendible but slower way to manage the data. Tested in t/11field2.t version 2.00_19: Wed Dec 12 22:13:56 CET 2001 Most work about sending messages. Slight extension of the interface for some other packages. Fixes: - Removed Tassilo's header parser optimization in favor of split again, because it breaks on empty fields. - [Tassilo v Parseval] added some 'binmode OUT' lines to make 98% of the tests succeed on Windows!! But I am not sure that is the right answer. More on that later. New: - Added to/from/cc/bcc/subject methods to Mail::Message, to hide Resent- header lines which overrule these fields in the header. Required for correct rfc822 support. - Added destinations() to Mail::Message. - Added isResent() to Mail::Message::Field. - Added addresses() to Mail::Message::Field, which returns a list of addresses as specified by the header line. - Added pod reference to Mail::Message's service methods on header lines. - Added Mail::Message::Head::Complete::printUndisclosed() and Mail::Message::printUndisclosed() which is the same as print() but leaving the Cc and Bcc headers out. - Added Mail::Transport::putContent($message) - Added Mail::Transport::SMTP shaped after Net/SMTP, but much more facilities and real Perl 5 code! Not ready yet. version 2.00_18: Mon Dec 10 22:19:44 CET 2001 - Added some requires for package FileHandle. - Added Mail::Transport::Qmail (cannot test it, but expect it to work) - Reorganized (and improved the docs) on all Transport modules. - Added POSIX fcntl locking. - [Tassilo v Parseval] demonstrated the fastest way to split a header, determined by benchmarking 6 variations on the theme. Used in Mail::Box::Parser::Perl.pm version 2.00_17: Sat Dec 8 23:10:06 CET 2001 - Moved scripts/web/* to scripts/ - Header line options in Mail::Message::Construct::reply start with capitals too. - Added Mail::Message::Body::Multipart::stripSignature - Simplified Mail::Message::Construct::reply a little - Fixed problem with the resulting body-types where delayed bodies where used to be encoded and decoded. - Extra checks for From-line in mbox folders, to help incorrectly formatted folders. - [Tassilo v Parseval] discovered the problematic recovery for erroneous headers. Some recovery is tried. version 2.00_16: Sat Dec 8 16:56:53 CET 2001 First beta of Mail::Box version 2 Most import changes: * Replaced all use of MIME::Parser, Mail::Internet, and MIME::Entity, althought the foreign message types are still useable in some places. * All code has been changed. Simple things, like opening a folder, reading messages and such are the same. However handling of messages is really different from the MIME::Entity/Mail::Internet implementation. Your message handling must be body-oriented ;) tranforming a body into a new body, into a new body, and finally create a new message from it. See Mail::Box-Cookbook. * Moved code to use 5.6.0 features, so no support for 5.005 anymore. This is required for Inline::C and Unicode support. Mail::Box releases below 2 will be supported for some time for people with `old' perl. * Parsing in Inline::C or plain Perl * folder->open(take_headers) removed folder->open(extract) replaces folder->open(lazy_extract) to avoid double negation in your program. listFolders became listSubFolders allMessages became messages(); so $folder->messages always returns all. * Unfolding of headers considered stupid: headers which are Mail-Box-2.118/test.pl0000644000175000001440000001354212473603434015202 0ustar00markovusers00000000000000#!/usr/bin/env perl use warnings; use strict; use File::Spec; use File::Basename; use lib qw(tests lib); # test env at home $ENV{PERL5LIB} .= qw(:/home/markov/shared/perl/IMAPClient/lib) if $ENV{MARKOV_DEVEL}; delete $ENV{PERLIO}; use Config; use Tools; # test tools use Mail::Reporter; # to avoid 'too late for INIT' use IO::Dir; use TAP::Harness (); use TAP::Parser::Aggregator (); # we use Test::More without a plan here, but we don't want # Test::Builder to mess with the exit code Test::More->builder->no_ending(1); chdir 'tests' ##### CHANGE DIR TO tests or die "Cannot go to test scripts directory: $!\n"; my $verbose = 0; if(@ARGV && $ARGV[0] eq '-v') { $verbose = 1; shift @ARGV; } my $select_tests; if(@ARGV) { my $pat = join '|', @ARGV; $select_tests = qr/$pat/o; } # The versions of the following packages are reported to help understanding # the environment in which the tests are run. This is certainly not a # full list of all installed modules. my @show_versions = defined $select_tests ? () : qw/Mail::Box Mail::Box::Parser::C User::Identity Object::Realize::Later MIME::Types TAP::Harness Encode MIME::Entity Mail::Internet HTML::FormatText /; my $skip_tests = -f 'skiptests' || -f '../skiptests' || ($ENV{MAILBOX_RUN_TESTS} || 'yes') eq 'no'; #warn "SKIP? ", (-f 'skiptests' ? 'Y' : 'N'), (-f '../skiptests' ? 'Y' : 'N'), # "#$ENV{MAILBOX_RUN_TESTS}#", `pwd`; sub package_of($); sub testnames($); sub run_in_harness(@); sub report(); sub dl_format($@); warn <<'WARN' unless $select_tests; * * Testing MailBox WARN if($skip_tests) { warn <<'WARN'; * Tests are disabled, because you said so when the Makefile was created. * remove the file "skiptests" if you want to run them and/or clear * environment variable MAILBOX_RUN_TESTS * WARN exit 0; } warn <<'WARN' unless $select_tests; * * Sometimes installing MailBox breaks because of the huge size * of the whole package. Simply restarting the installation is in * most cases enough to solve the problems. You may require a new * version of ExtUtils::MakeMaker. * * On *Windows* you will get a large number of failing tests, but they * are usually harmless. Please help me to get rit of them. * WARN warn "Running on $^O ($Config{archname} $Config{osvers}), with Perl $]\n"; foreach my $package (@show_versions) { eval "require $package"; my $report = !$@ ? "version ". ($package->VERSION || 'unknown') : $@ =~ m/^Can't locate/ ? "not installed" : "reports error"; warn "$package $report\n"; } warn "\n"; # # Get all the test-sets. # my $testdir = '.'; my $setdir = IO::Dir->new($testdir); die "Cannot open directory $testdir: $!" unless $setdir; my @sets = sort grep { /^\d/ && -d File::Spec->catfile($testdir, $_) } $setdir->read; $setdir->close; my (%success, %skipped); my $tests_run = 0; foreach my $set (@sets) { my $script = File::Spec->catfile($testdir, $set, 'Definition.pm'); eval "require '$script'"; if($@) { warn "Errors while requiring $script:\n$@"; next; } my $package = package_of $set; if(my $reason = $package->skip) { $skipped{$set} = $reason; printf "%-15s -- %s\n", $set, $reason; next; } my @tests = testnames $set; @tests = grep { $_ =~ $select_tests } @tests if defined $select_tests; if(@tests) { printf "%-15.15s -- %d %s %s\n", $set, scalar @tests, (@tests==1 ? "script; " : "scripts;"), $package->name; } elsif(defined $select_tests) { ; } # silence else { printf "%-15.15s -- skip all tests for %s\n", $set, $package->name; } next unless @tests; $success{$set} = run_in_harness @tests; $tests_run += @tests; } my $critical = $tests_run ? report : 0; exit $critical; # # PACKAGE_OF SET # Returns the name of the package which contains details about the test-set. # sub package_of($) { "MailBox::Test::$_[0]::Definition" } # # TESTNAMES SET # Returns a list of all the test for a certain test-set. # sub testnames($) { my $set = shift; my $dirname = File::Spec->catdir($testdir, $set); my $dir = IO::Dir->new($dirname) or return (); sort map { File::Spec->catfile($dirname, $_) } grep /\.t$/, $dir->read; } # # RUN_IN_HARNESS @files # Run the specified test files in a harness, but then the MailBox # way doing things. # sub run_in_harness(@) { my @files = @_; return 1 unless @files; # cannot use $harness->runtests() because it always shows summary my $harness = TAP::Harness->new( {verbosity => ($verbose ? 1 : 0)} ); my $aggregate = TAP::Parser::Aggregator->new; $harness->aggregate_tests($aggregate, @files); not $aggregate->has_problems; } # # PRINT_REPORT # sub report() { print "--- Test report\n"; my @success = sort grep {$success{$_}} keys %success; local $" = ', '; dl_format(Success => @success) if @success; my @failed; my $critical = 0; foreach my $set (sort grep {not $success{$_}} keys %success) { push @failed, $set; my $package = package_of $set; if($package->critical) { $failed[-1] .= '(*)'; $critical++; } } dl_format(Failure => @failed) if @failed; print " Marked (*) are critical errors.\n" if $critical; my @skipped = sort keys %skipped; dl_format(Skipped => @skipped) if @skipped; $critical; } # # DL_FORMAT DT, DD-LIST # Print in an HTML description-list fashion, with $" between the elements. # sub dl_format($@) { my $line = (shift) . ': '; my $elem = shift; while(defined $elem) { $elem .= $" if @_; if(length($line) + length($elem) > 72) { print "$line\n"; $line = " "; } $line .= $elem; $elem = shift; } print "$line\n" if $line =~ /[^ ]/; } Mail-Box-2.118/TODO.v20000644000175000001440000000225112473603434014677 0ustar00markovusers00000000000000 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 Mail-Box-2.118/lib/0000755000175000001440000000000012473604501014423 5ustar00markovusers00000000000000Mail-Box-2.118/lib/Mail/0000755000175000001440000000000012473604501015305 5ustar00markovusers00000000000000Mail-Box-2.118/lib/Mail/Box-Overview.pod0000644000175000001440000003250712473604426020362 0ustar00markovusers00000000000000=encoding utf8 =head1 NAME Mail::Box-Overview - objects used by Mail::Box =head1 DESCRIPTION =head2 Introduction The MailBox package is a suite of classes for accessing and managing email folders in a folder-independent manner. This package is an alternative to the C and C packages. It abstracts the details of messages, message storage, and message threads, while providing better performance than older mail packages. It is meant to provide an object-oriented toolset for all kinds of e-mail applications, under which Mail User-Agents (MUA) and mail filtering programs. This package is modular --parts of it can be used independently of the rest. For example, the L can automatically determine that a folder is in Mbox format and return an object of the L class, or the user program can bypass the manager and create L objects directly. Similarly, if the user program is only manipulating a single message, a L. The Mail::Box package has special features to help MUA's access folder data quickly in random order. You will not really benefit (neither slower) if you need the full folder sequentially. You may want to have a look at the sample scripts in the C directory. =head2 The class relations L objects play a central role in any program which is built with MailBox. Each program will create one manager, and then open folders via that manager. Besides folders, the manager can also be used to discover message threads: sequences of messages with their follow-ups. Mail::Box::Mbox Mail::Box::Manager <---------* (Mail::Box::MH) ^ : (Mail::Box::Maildir) | (maintains) (Mail::Box::POP3) | : | : `---------------------* Mail::Box::Thread::Manager () Each folder maintains a list of messages. Much effort is made to hide differences between folder types and kinds of messages. Your program can be used for MBOX, MH, Maildir, and POP3 folders with no change at all (as long as you stick to the rules). Mail::Box::Mbox <-----------* Mail::Box::Mbox::Message ^ ^ | | | | Mail::Box ............. Mail::Box::Message ^ | | Mail::Message / \ / \ Mail::Message Mail::Message ::Body ::Head The situation for MH and Maildir folders is a little more complicated, because they have an extra intermediate level of abstraction: L. The POP3 folder has an intermediate L. In the future, when more Mbox-like folder types get implemented, there may be a L level too. The following is also true for the mail boxes MB::MH::Message MB::POP3::Message \ MB::Maildir::Message / \ / / \ / MB::Mbox::Message / \ / | / MB::Dir::Message | MB::Net::Message \ | / \ | / MB::Message | | Mail::Message =head2 The Manager The mailbox manager L encapsulates folder management issues. It maintains a set of open mail folders (mailboxes), and provides methods for opening and closing them, efficiently moving messages between folders, and efficiently appending messages to folders. It contains L objects which may be of different types. Most folder types can be detected automatically. The main manager also manages message-thread detector objects, and informs them when the contents of a folder have changed. This manager class is the only one you instantiate yourself: objects of all other classes will be provided by your folder manager. You are strongly advised to use this object, but you can often do without it and open a specific folder-type directly. =head2 The Messages =over 4 =item L A base class that defines an interface for manipulating the head and body of a message. There are various header object types (L's) and a bunch of body object types (L's). The L package is loaded when more complex tasks have to be performed on messages, like creating replies, bounces, or a forward message. These functionalities are described and implemented in the ::Construct file, but are automatically added to the L namespace when used. Message types which are foreign to MailBox can be used in the MailBox environment: there are some converters implemented via L. Particularly the popular L and MIME::Entity are supported. =item L An abstract base class which defines an interface for mail messages which are stored in any folder. It inherits from L, and adds the basic idea of I to a message. =item L This is the base class for all message bodies. It describes what you can do with any kind of body. The body types differ on the way how the keep the body content during the run of your program. One special case of the body types is the L, which contains a set of L objects. These are just like normal messages, except that they are contained in an other message. The L body type is comparible, but contains only one message: they are used for C message encodings. When needed, the functionality of the body objects is extended with L and L. The former package implements things like concatenation, the later controls message encoding and decoding. In the current implementation this is limited to transfer encodings (implemented in the L packages). Automatic character and mime recodings are on the wish-list. =item L The header for a single message. Maintains a set of L objects, each containing one header line. Fields are the only objects which have no logging and tracing facilities, purely for reasons of performance. The header object has three sub-classes: the L version knows all lines for sure, L maintains an unknown subset of lines, and the L has no lines yet but knows where to get them. The latter two will automatically get the missing header lines from the mailbox files when needed, and so transform into a C<::Complete> header. It is fully transparent to the user of MailBox in which shape the header really is on the moment. =back =head2 The Folder types =over 4 =item L A base class that defines a standard interface for mail boxes which is independent of mailbox type. Objects of this class contain a L and a list of L objects. =item L The base class for all folders which use a directory organization: each message is a separate entity (file) grouped in a directory. Each L represents one message, one such entity. =item L The base class for all folders which have the messages outside direct reach of the MailBox library, for instance on a remote system, or in a database. =item L This class derives from L, and implements its interface for mbox-style folders. It maintains a set of L objects, which are derived from a L. Mbox-style folders have one file containing multiple messages per folder. When folders get large, access tends to get slow. =item L This class derives from L, and implements its interface for MH-style folders. It maintains a set of L objects, which are derived from a L. MH-style folders are represented by a directory, where each message is stored in a separate file. The message files are sequentially numbered. It is fast to open one single message, but hard to get an overview. =item L The base class for MH mailbox indexes which provides methods for reading, writing, and managing message indexes. These indexes are used to speed-up access to directory based folders. =item L Also for efficiency reasons, a separate file is maintained which contains flags about the messages. This file for instance lists new files. This way, the MH message files do not have to be opened to find that out. =item L Like the MH folder type, this class derives from L. It implements its interface for Maildir-style folders. It maintains a set of L objects, which are derived from a L. =item L Implements the POP3 protocol based on L. The L implementation handles the protocol details. In this kind of folders, you can only read and delete messages. =back =head2 Various Other Classes =over 4 =item L Maintains a set of message-threads over one or more folders. A message-thread is a start message with all the replies on it. And the replies on replies, and so on. This object is used to construct the thread for a set of open folders. This object maintains linked lists of L objects. L's fill-up some holes. =item L Provides a folder locking interface which is inherited by the L class. Currently it supports dot-file locking (C), flock filehandle locking, and locking over NFS. Each is implemented in a separate class. A multi-locker, using a set of lock-methods at the same time is also available. =item L The set of search packages implement various search techniques in an uniformal way. Although implementing your own search algorithm is simple in general, in practice multiparts, encodings, and mime-types complicate things. =item L The parser reads messages, and transforms them into data-structures such that the content of header and body can be used within the program. The first parser is implemented in pure Perl. A second parser is under development, and will written in C, to gain speed. =item L Provides hash (L) or array tied (L) access to any mail folder derived from L. This beautifies your code in some applications. =item L Various ways of sending and receiving messages are implemented. Sending is possible via external programs, like C, C, C, or autonomously with direct SMTP. Receiving is currently only implemented via POP3. =item L A debugging and logging class which is inherited by most of the Mail:: modules. For each object, you can say what log and error reports must be kept or directly presented to the user. This way you can decide to have Mail::Box report about problems, or do it all yourself. =back All classes are written to be extensible. =head1 SEE ALSO This module is part of Mail-Box distribution version 2.118, built on February 26, 2015. Website: F =head1 LICENSE Copyrights 2001-2015 by [Mark Overmeer]. For other contributors see ChangeLog. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See F Mail-Box-2.118/lib/Mail/Reporter.pm0000644000175000001440000001245112473604425017455 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. use strict; use warnings; package Mail::Reporter; use vars '$VERSION'; $VERSION = '2.118'; use Carp; use Scalar::Util 'dualvar'; my @levelname = (undef, qw(DEBUG NOTICE PROGRESS WARNING ERROR NONE INTERNAL)); my %levelprio = (ERRORS => 5, WARNINGS => 4, NOTICES => 2); for(my $l = 1; $l < @levelname; $l++) { $levelprio{$levelname[$l]} = $l; $levelprio{$l} = $l; } sub new(@) { my $class = shift; #confess "Parameter list has odd length: @_" if @_ % 2; (bless {}, $class)->init({@_}); } my($default_log, $default_trace, $trace_callback); sub init($) { my ($self, $args) = @_; $self->{MR_log} = $levelprio{$args->{log} || $default_log}; $self->{MR_trace} = $levelprio{$args->{trace} || $default_trace}; $self; } #------------------------------------------ sub _trace_warn($$$) { my ($who, $level, $text) = @_; warn "$level: $text\n"; } sub defaultTrace(;$$) { my $thing = shift; return ($default_log, $default_trace) unless @_; my $level = shift; my $prio = $thing->logPriority($level) or croak "Unknown trace-level $level."; if( ! @_) { $default_log = $default_trace = $prio; $trace_callback = \&_trace_warn; } elsif(ref $_[0]) { $default_log = $thing->logPriority('NONE'); $default_trace = $prio; $trace_callback = shift; } else { $default_log = $prio; $default_trace = $thing->logPriority(shift); $trace_callback = \&_trace_warn; } ($default_log, $default_trace); } __PACKAGE__->defaultTrace('WARNINGS'); #------------------------------------------ sub trace(;$$) { my $self = shift; return $self->logPriority($self->{MR_trace}) unless @_; my $level = shift; my $prio = $levelprio{$level} or croak "Unknown trace-level $level."; $self->{MR_trace} = $prio; } #------------------------------------------ # Implementation detail: the Mail::Box::Parser::C code avoids calls back # to Perl by checking the trace-level itself. In the perl code of this # module however, just always call the log() method, and let it check # whether or not to display it. sub log(;$@) { my $thing = shift; if(ref $thing) # instance call { return $thing->logPriority($thing->{MR_log}) unless @_; my $level = shift; my $prio = $levelprio{$level} or croak "Unknown log-level $level"; return $thing->{MR_log} = $prio unless @_; my $text = join '', @_; $trace_callback->($thing, $level, $text) if $prio >= $thing->{MR_trace}; push @{$thing->{MR_report}[$prio]}, $text if $prio >= $thing->{MR_log}; } else # class method { my $level = shift; my $prio = $levelprio{$level} or croak "Unknown log-level $level"; $trace_callback->($thing, $level, join('',@_)) if $prio >= $default_trace; } $thing; } #------------------------------------------ sub report(;$) { my $self = shift; my $reports = $self->{MR_report} || return (); if(@_) { my $level = shift; my $prio = $levelprio{$level} or croak "Unknown report level $level."; return $reports->[$prio] ? @{$reports->[$prio]} : (); } my @reports; for(my $prio = 1; $prio < @$reports; $prio++) { next unless $reports->[$prio]; my $level = $levelname[$prio]; push @reports, map { [ $level, $_ ] } @{$reports->[$prio]}; } @reports; } #------------------------------------------- sub addReport($) { my ($self, $other) = @_; my $reports = $other->{MR_report} || return (); for(my $prio = 1; $prio < @$reports; $prio++) { push @{$self->{MR_report}[$prio]}, @{$reports->[$prio]} if exists $reports->[$prio]; } $self; } #------------------------------------------- sub reportAll(;$) { my $self = shift; map { [ $self, @$_ ] } $self->report(@_); } #------------------------------------------- sub errors(@) {shift->report('ERRORS')} #------------------------------------------- sub warnings(@) {shift->report('WARNINGS')} #------------------------------------------- sub notImplemented(@) { my $self = shift; my $package = ref $self || $self; my $sub = (caller 1)[3]; $self->log(ERROR => "Package $package does not implement $sub."); confess "Please warn the author, this shouldn't happen."; } #------------------------------------------ sub logPriority($) { my $level = $levelprio{$_[1]} or return undef; dualvar $level, $levelname[$level]; } #------------------------------------------- sub logSettings() { my $self = shift; (log => $self->{MR_log}, trace => $self->{MR_trace}); } #------------------------------------------- sub AUTOLOAD(@) { my $thing = shift; our $AUTOLOAD; my $class = ref $thing || $thing; (my $method = $AUTOLOAD) =~ s/^.*\:\://; $Carp::MaxArgLen=20; confess "Method $method() is not defined for a $class.\n"; } #------------------------------------------- #------------------------------------------- sub DESTROY {shift} 1; Mail-Box-2.118/lib/Mail/Message.pm0000644000175000001440000003634712473604425017251 0ustar00markovusers00000000000000# Copyrights 2001-2015 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.01. use strict; use warnings; package Mail::Message; use vars '$VERSION'; $VERSION = '2.118'; use base 'Mail::Reporter'; use Mail::Message::Part; use Mail::Message::Head::Complete; use Mail::Message::Construct; use Mail::Message::Body::Lines; use Mail::Message::Body::Multipart; use Mail::Message::Body::Nested; use Carp; use Scalar::Util 'weaken'; our $crlf_platform; BEGIN { $crlf_platform = $^O =~ m/win32|cygwin/i } #------------------------------------------ sub init($) { my ($self, $args) = @_; $self->SUPER::init($args); # Field initializations also in coerce() $self->{MM_modified} = $args->{modified} || 0; $self->{MM_trusted} = $args->{trusted} || 0; # Set the header my $head; if(defined($head = $args->{head})) { $self->head($head) } elsif(my $msgid = $args->{messageId} || $args->{messageID}) { $self->takeMessageId($msgid); } # Set the body if(my $body = $args->{body}) { $self->{MM_body} = $body; $body->message($self); } $self->{MM_body_type} = $args->{body_type} if defined $args->{body_type}; $self->{MM_head_type} = $args->{head_type} if defined $args->{head_type}; $self->{MM_field_type} = $args->{field_type} if defined $args->{field_type}; my $labels = $args->{labels} || []; my @labels = ref $labels eq 'ARRAY' ? @$labels : %$labels; push @labels, deleted => $args->{deleted} if exists $args->{deleted}; $self->{MM_labels} = { @labels }; $self; } sub clone(@) { my ($self, %args) = @_; # First clone body, which may trigger head load as well. If head is # triggered first, then it may be decided to be lazy on the body at # moment. And then the body would be triggered. my ($head, $body) = ($self->head, $self->body); $head = $head->clone unless $args{shallow} || $args{shallow_head}; $body = $body->clone unless $args{shallow} || $args{shallow_body}; my $clone = Mail::Message->new ( head => $head , body => $body , $self->logSettings ); my $labels = $self->labels; my %labels = %$labels; delete $labels{deleted}; $clone->{MM_labels} = \%labels; $clone->{MM_cloned} = $self; weaken($clone->{MM_cloned}); $clone; } #------------------------------------------ sub messageId() { $_[0]->{MM_message_id} || $_[0]->takeMessageId} sub messageID() {shift->messageId} # compatibility sub container() { undef } # overridden by Mail::Message::Part sub isPart() { 0 } # overridden by Mail::Message::Part sub partNumber() { my $self = shift; my $cont = $self->container; $cont ? $cont->partNumber : undef; } sub toplevel() { shift } # overridden by Mail::Message::Part sub isDummy() { 0 } sub print(;$) { my $self = shift; my $out = shift || select; $self->head->print($out); my $body = $self->body; $body->print($out) if $body; $self; } sub write(;$) { my $self = shift; my $out = shift || select; $self->head->print($out); $self->body->print($out); $self; } my $default_mailer; sub send(@) { my $self = shift; require Mail::Transport::Send; my $mailer; $default_mailer = $mailer = shift if ref $_[0] && $_[0]->isa('Mail::Transport::Send'); my %args = @_; if( ! $args{via} && defined $default_mailer ) { $mailer = $default_mailer; } else { my $via = delete $args{via} || 'sendmail'; $default_mailer = $mailer = Mail::Transport->new(via => $via, %args); } $mailer->send($self, %args); } sub size() { my $self = shift; $self->head->size + $self->body->size; } #------------------------------------------ sub head(;$) { my $self = shift; return $self->{MM_head} unless @_; my $head = shift; unless(defined $head) { delete $self->{MM_head}; return undef; } $self->log(INTERNAL => "wrong type of head ($head) for message $self") unless ref $head && $head->isa('Mail::Message::Head'); $head->message($self); if(my $old = $self->{MM_head}) { $self->{MM_modified}++ unless $old->isDelayed; } $self->{MM_head} = $head; $self->takeMessageId unless $head->isDelayed; $head; } sub get($) { my $self = shift; my $field = $self->head->get(shift) || return undef; $field->body; } sub study($) { my $head = shift->head or return; scalar $head->study(@_); # return only last } sub from() { my @from = shift->head->get('From') or return (); map $_->addresses, @from; } sub sender() { my $self = shift; my $sender = $self->head->get('Sender') || $self->head->get('From') || return (); ($sender->addresses)[0]; # first specified address } sub to() { map $_->addresses, shift->head->get('To') } sub cc() { map $_->addresses, shift->head->get('Cc') } sub bcc() { map $_->addresses, shift->head->get('Bcc') } sub destinations() { my $self = shift; my %to = map +(lc($_->address) => $_), $self->to, $self->cc, $self->bcc; values %to; } sub subject() { my $subject = shift->get('subject'); defined $subject ? $subject : ''; } sub guessTimestamp() {shift->head->guessTimestamp} sub timestamp() { my $head = shift->head; $head->recvstamp || $head->timestamp; } sub nrLines() { my $self = shift; $self->head->nrLines + $self->body->nrLines; } #------------------------------------------- sub body(;$@) { my $self = shift; return $self->{MM_body} unless @_; my $head = $self->head; $head->removeContentInfo if defined $head; my ($rawbody, %args) = @_; unless(defined $rawbody) { # Disconnect body from message. my $body = delete $self->{MM_body}; $body->message(undef) if defined $body; return $body; } ref $rawbody && $rawbody->isa('Mail::Message::Body') or $self->log(INTERNAL => "wrong type of body for message $rawbody"); # Bodies of real messages must be encoded for safe transmission. # Message parts will get encoded on the moment the whole multipart # is transformed into a real message. my $body = $self->isPart ? $rawbody : $rawbody->encoded; $body->contentInfoTo($self->head); my $oldbody = $self->{MM_body}; return $body if defined $oldbody && $body==$oldbody; $body->message($self); $body->modified(1) if defined $oldbody; $self->{MM_body} = $body; } sub decoded(@) { my $body = shift->body->load; $body ? $body->decoded(@_) : undef; } sub encode(@) { my $body = shift->body->load; $body ? $body->encode(@_) : undef; } sub isMultipart() {shift->head->isMultipart} sub isNested() {shift->body->isNested} sub contentType() { my $head = shift->head; my $ct = (defined $head ? $head->get('Content-Type', 0) : undef) || ''; $ct =~ s/\s*\;.*//; length $ct ? $ct : 'text/plain'; } sub parts(;$) { my $self = shift; my $what = shift || 'ACTIVE'; my $body = $self->body; my $recurse = $what eq 'RECURSE' || ref $what; my @parts = $body->isNested ? $body->nested->parts($what) : $body->isMultipart ? $body->parts($recurse ? 'RECURSE' : ()) : $self; ref $what eq 'CODE' ? (grep {$what->($_)} @parts) : $what eq 'ACTIVE' ? (grep {not $_->isDeleted } @parts) : $what eq 'DELETED' ? (grep { $_->isDeleted } @parts) : $what eq 'ALL' ? @parts : $recurse ? @parts : confess "Select parts via $what?"; } #------------------------------------------ sub modified(;$) { my $self = shift; return $self->isModified unless @_; # compatibility 2.036 my $flag = shift; $self->{MM_modified} = $flag; my $head = $self->head; $head->modified($flag) if $head; my $body = $self->body; $body->modified($flag) if $body; $flag; } sub isModified() { my $self = shift; return 1 if $self->{MM_modified}; my $head = $self->head; if($head && $head->isModified) { $self->{MM_modified}++; return 1; } my $body = $self->body; if($body && $body->isModified) { $self->{MM_modified}++; return 1; } 0; } sub label($;$@) { my $self = shift; return $self->{MM_labels}{$_[0]} unless @_ > 1; my $return = $_[1]; my %labels = @_; @{$self->{MM_labels}}{keys %labels} = values %labels; $return; } sub labels() { my $self = shift; wantarray ? keys %{$self->{MM_labels}} : $self->{MM_labels}; } sub isDeleted() { shift->label('deleted') } sub delete() { my $self = shift; my $old = $self->label('deleted'); $old || $self->label(deleted => time); } sub deleted(;$) { my $self = shift; @_ ? $self->label(deleted => shift) : $self->label('deleted') # compat 2.036 } sub labelsToStatus() { my $self = shift; my $head = $self->head; my $labels = $self->labels; my $status = $head->get('status') || ''; my $newstatus = $labels->{seen} ? 'RO' : $labels->{old} ? 'O' : ''; $head->set(Status => $newstatus) if $newstatus ne $status; my $xstatus = $head->get('x-status') || ''; my $newxstatus = ($labels->{replied} ? 'A' : '') . ($labels->{flagged} ? 'F' : ''); $head->set('X-Status' => $newxstatus) if $newxstatus ne $xstatus; $self; } sub statusToLabels() { my $self = shift; my $head = $self->head; if(my $status = $head->get('status')) { $status = $status->foldedBody; $self->label ( seen => (index($status, 'R') >= 0) , old => (index($status, 'O') >= 0) ); } if(my $xstatus = $head->get('x-status')) { $xstatus = $xstatus->foldedBody; $self->label ( replied => (index($xstatus, 'A') >= 0) , flagged => (index($xstatus, 'F') >= 0) ); } $self; } #------------------------------------------ my $mail_internet_converter; my $mime_entity_converter; my $email_simple_converter; sub coerce($@) { my ($class, $message) = @_; ref $message or die "coercion starts with some object"; return bless $message, $class if $message->isa(__PACKAGE__); if($message->isa('MIME::Entity')) { unless($mime_entity_converter) { eval {require Mail::Message::Convert::MimeEntity}; confess "Install MIME::Entity" if $@; $mime_entity_converter = Mail::Message::Convert::MimeEntity->new; } $message = $mime_entity_converter->from($message) or return; } elsif($message->isa('Mail::Internet')) { unless($mail_internet_converter) { eval {require Mail::Message::Convert::MailInternet}; confess "Install Mail::Internet" if $@; $mail_internet_converter = Mail::Message::Convert::MailInternet->new; } $message = $mail_internet_converter->from($message) or return; } elsif($message->isa('Email::Simple')) { unless($email_simple_converter) { eval {require Mail::Message::Convert::EmailSimple}; confess "Install Email::Simple" if $@; $email_simple_converter = Mail::Message::Convert::EmailSimple->new; } $message = $email_simple_converter->from($message) or return; } elsif($message->isa('Email::Abstract')) { return $class->coerce($message->object); } else { $class->log(INTERNAL => "Cannot coerce a ". ref($message) . " object into a ". __PACKAGE__." object"); } $message->{MM_modified} ||= 0; bless $message, $class; } sub clonedFrom() { shift->{MM_cloned} } #------------------------------------------ # All next routines try to create compatibility with release < 2.0 sub isParsed() { not shift->isDelayed } sub headIsRead() { not shift->head->isa('Mail::Message::Delayed') } sub readFromParser($;$) { my ($self, $parser, $bodytype) = @_; my $head = $self->readHead($parser) || Mail::Message::Head::Complete->new ( message => $self , field_type => $self->{MM_field_type} , $self->logSettings ); my $body = $self->readBody($parser, $head, $bodytype) or return; $self->head($head); $self->storeBody($body); $self; } sub readHead($;$) { my ($self, $parser) = (shift, shift); my $headtype = shift || $self->{MM_head_type} || 'Mail::Message::Head::Complete'; $headtype->new ( message => $self , field_type => $self->{MM_field_type} , $self->logSettings )->read($parser); } my $mpbody = 'Mail::Message::Body::Multipart'; my $nbody = 'Mail::Message::Body::Nested'; my $lbody = 'Mail::Message::Body::Lines'; sub readBody($$;$$) { my ($self, $parser, $head, $getbodytype) = @_; my $bodytype = ! $getbodytype ? ($self->{MM_body_type} || $lbody) : ref $getbodytype ? $getbodytype->($self, $head) : $getbodytype; my $body; if($bodytype->isDelayed) { $body = $bodytype->new ( message => $self , charset => 'us-ascii' , $self->logSettings ); } else { my $ct = $head->get('Content-Type', 0); my $type = defined $ct ? lc($ct->body) : 'text/plain'; # Be sure you have acceptable bodies for multiparts and nested. if(substr($type, 0, 10) eq 'multipart/' && !$bodytype->isMultipart) { $bodytype = $mpbody } elsif($type eq 'message/rfc822' && !$bodytype->isNested) { $bodytype = $nbody } $body = $bodytype->new ( message => $self , checked => $self->{MM_trusted} , charset => 'us-ascii' , $self->logSettings ); $body->contentInfoFrom($head); } my $lines = $head->get('Lines'); # usually off-by-one my $size = $head->guessBodySize; $body->read ( $parser, $head, $getbodytype, , $size, (defined $lines ? $lines : undef) ); } sub storeBody($) { my ($self, $body) = @_; $self->{MM_body} = $body; $body->message($self); $body; } sub isDelayed() { my $body = shift->body; !$body || $body->isDelayed; } sub takeMessageId(;$) { my $self = shift; my $msgid = (@_ ? shift : $self->get('Message-ID')) || ''; if($msgid =~ m/\<([^>]*)\>/s) { $msgid = $1; $msgid =~ s/\s//gs; } $msgid = $self->head->createMessageId unless length $msgid; $self->{MM_message_id} = $msgid; } #------------------------------------------ sub shortSize(;$) { my $self = shift; my $size = shift; $size = $self->head->guessBodySize unless defined $size; !defined $size ? '?' : $size < 1_000 ? sprintf "%3d " , $size : $size < 10_000 ? sprintf "%3.1fK", $size/1024 : $size < 1_000_000 ? sprintf "%3.0fK", $size/1024 : $size < 10_000_000 ? sprintf "%3.1fM", $size/(1024*1024) : sprintf "%3.0fM", $size/(1024*1024); } sub shortString() { my $self = shift; sprintf "%4s %-30.30s", $self->shortSize, $self->subject; } #------------------------------------------ sub destruct() { $_[0] = undef } #------------------------------------------ 1; Mail-Box-2.118/lib/Mail/Message.pod0000644000175000001440000013042712473604427017413 0ustar00markovusers00000000000000=encoding utf8 =head1 NAME Mail::Message - general message object =head1 INHERITANCE Mail::Message has extra code in Mail::Message::Construct Mail::Message::Construct::Bounce Mail::Message::Construct::Build Mail::Message::Construct::Forward Mail::Message::Construct::Read Mail::Message::Construct::Rebuild Mail::Message::Construct::Reply Mail::Message::Construct::Text Mail::Message is a Mail::Reporter Mail::Message is extended by Mail::Box::Message Mail::Message::Dummy Mail::Message::Part Mail::Message::Replace::MailInternet =head1 SYNOPSIS use Mail::Box::Manager; my $mgr = Mail::Box::Manager->new; my $folder = $mgr->open(folder => 'InBox'); my $msg = $folder->message(2); # $msg is a Mail::Message now my $subject = $msg->subject; # The message's subject my @cc = $msg->cc; # List of Mail::Address'es my $msg = Mail::Message->build(...); my $reply_msg = Mail::Message->reply(...); my $frwd_msg = Mail::Message->forward(...); my Mail::Message::Head $head = $msg->head; my Mail::Message::Body $body = $msg->decoded; $msg->decoded->print($outfile); =head1 DESCRIPTION A C object is a container for MIME-encoded message information, as defined by RFC2822. Everything what is not specificly related to storing the messages in mailboxes (folders) is implemented in this class. Methods which are related to folders is implemented in the L extension. The main methods are L, to get information from a message header field, and L to get the intended content of a message. But there are many more which can assist your program. Complex message handling, like construction of replies and forwards, are implemented in separate packages which are autoloaded into this class. This means you can simply use these methods as if they are part of this class. Those package add functionality to all kinds of message objects. Extends L<"DESCRIPTION" in Mail::Reporter|Mail::Reporter/"DESCRIPTION">. =head1 METHODS Extends L<"METHODS" in Mail::Reporter|Mail::Reporter/"METHODS">. =head2 Constructors Extends L<"Constructors" in Mail::Reporter|Mail::Reporter/"Constructors">. =over 4 =item $obj-EB(%options) Create a copy of this message. Returned is a C object. The head and body, the log and trace levels are taken. Labels are copied with the message, but the delete and modified flags are not. BE WARNED: the clone of any kind of message (or a message part) will B be a C object. For example, a L's clone is detached from the folder of its original. When you use L with the cloned message at hand, then the clone will automatically be coerced into the right message type to be added. See also L and L. -Option --Default shallow shallow_body shallow_head =over 2 =item shallow => BOOLEAN When a shallow clone is made, the header and body of the message will not be cloned, but shared. This is quite dangerous: for instance in some folder types, the header fields are used to store folder flags. When one of both shallow clones change the flags, that will update the header and thereby be visible in both. There are situations where a shallow clone can be used safely. For instance, when L is used and you are sure that the original message cannot get undeleted after the move. =item shallow_body => BOOLEAN A rather safe bet, because you are not allowed to modify the body of a message: you may only set a new body with L. =item shallow_head => BOOLEAN Only the head uses is reused, not the body. This is probably a bad choice, because the header fields can be updated, for instance when labels change. =back example: $copy = $msg->clone; =item Mail::Message-EB(%options) -Option --Defined in --Default body undef body_type Mail::Message::Body::Lines deleted field_type undef head undef head_type Mail::Message::Head::Complete labels {} log Mail::Reporter 'WARNINGS' messageId undef modified trace Mail::Reporter 'WARNINGS' trusted =over 2 =item body => OBJECT Instantiate the message with a body which has been created somewhere before the message is constructed. The OBJECT must be a sub-class of Mail::Message::Body. See also L and L. =item body_type => CLASS Default type of body to be created for L. =item deleted => BOOLEAN Is the file deleted from the start? =item field_type => CLASS =item head => OBJECT Instantiate the message with a head which has been created somewhere before the message is constructed. The OBJECT must be a (sub-)class of L. See also L. =item head_type => CLASS Default type of head to be created for L. =item labels => ARRAY|HASH Initial values of the labels. In case of L's, this shall reflect the state the message is in. For newly constructed L's, this may be anything you want, because L will take care of the folder specifics once the message is added to one. =item log => LEVEL =item messageId => STRING The id on which this message can be recognized. If none specified and not defined in the header --but one is needed-- there will be one assigned to the message to be able to pass unique message-ids between objects. =item modified => BOOLEAN Flags this message as being modified from the beginning on. Usually, modification is auto-detected, but there may be reasons to be extra explicit. =item trace => LEVEL =item trusted => BOOLEAN Is this message from a trusted source? If not, the content must be checked before use. This checking will be performed when the body data is decoded or used for transmission. =back =back =head2 Constructing a message =over 4 =item $obj-EB( [<$rg_object|%options>] ) Inherited, see L =item Mail::Message-EB( [$message|$part|$body], $content ) Inherited, see L =item Mail::Message-EB($body, [$head], $headers) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB() Inherited, see L =item $obj-EB(STRING) Inherited, see L =item Mail::Message-EB($fh|STRING|SCALAR|ARRAY, %options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB(%options) Inherited, see L =item $obj-EB( [STRING|$field|$address|ARRAY-$of-$things] ) Inherited, see L =item $obj-EB(STRING) =item Mail::Message-EB(STRING) Inherited, see L =back =head2 The message =over 4 =item $obj-EB() If the message is a part of another message, C returns the reference to the containing body. example: my Mail::Message $msg = ... return unless $msg->body->isMultipart; my $part = $msg->body->part(2); return unless $part->body->isMultipart; my $nested = $part->body->part(3); $nested->container; # returns $msg->body $nested->toplevel; # returns $msg $msg->container; # returns undef $msg->toplevel; # returns $msg $msg->isPart; # returns false $part->isPart; # returns true =item $obj-EB() Dummy messages are used to fill holes in linked-list and such, where only a message-id is known, but not the place of the header of body data. This method is also available for L objects, where this will return C. On any extension of C, this will return C. =item $obj-EB() Returns true if the message is a part of another message. This is the case for L extensions of C. =item $obj-EB() Retrieve the message's id. Every message has a unique message-id. This id is used mainly for recognizing discussion threads. =item $obj-EB() Returns a string representing the location of this part. In case the top message is a single message, 'undef' is returned. When it is a multipart, '1' upto the number of multiparts is returned. A multi-level nested part may for instance return '2.5.1'. Usually, this string is very short. Numbering follows the IMAP4 design, see RFC2060 secion 6.4.5. =item $obj-EB( [$fh] ) Print the message to the FILE-HANDLE, which defaults to the selected filehandle, without the encapsulation sometimes required by a folder type, like L does. example: $message->print(\*STDERR); # to the error output $message->print; # to the selected file my $out = IO::File->new('out', 'w'); $message->print($out); # no encapsulation: no folder $message->write($out); # with encapsulation: is folder. =item $obj-EB( [$mailer], %options ) Transmit the message to anything outside this Perl program. $mailer is a L object. When the $mailer is not specified, one will be created, and kept as default for the next messages as well. The %options are mailer specific, and a mixture of what is usable for the creation of the mailer object and the sending itself. Therefore, see for possible options L and L. example: $message->send; is short (but little less flexibile) for my $mailer = Mail::Transport::SMTP->new(@smtpopts); $mailer->send($message, @sendopts); See examples/send.pl in the distribution of L. example: $message->send(via => 'sendmail') =item $obj-EB() Returns an estimated size of the whole message in bytes. In many occasions, the functions which process the message further, for instance L or L will need to add/change header lines or add CR characters, so the size is only an estimate with a few percent margin of the real result. The computation assumes that each line ending is represented by one character (like UNIX, MacOS, and sometimes Cygwin), and not two characters (like Windows and sometimes Cygwin). If you write the message to file on a system which uses CR and LF to end a single line (all Windows versions), the result in that file will be at least L larger than this method returns. =item $obj-EB() Returns a reference to the main message, which will be the current message if the message is not part of another message. =item $obj-EB( [$fh] ) Write the message to the FILE-HANDLE, which defaults to the selected $fh, with all surrounding information which is needed to put it correctly in a folder file. In most cases, the result of C will be the same as with L. The main exception is for Mbox folder messages, which will get printed with their leading 'From ' line and a trailing blank. Each line of their body which starts with 'From ' will have an 'E' added in front. =back =head2 The header =over 4 =item $obj-EB() Returns the addresses which are specified on the C header line (or lines) A list of L objects is returned. C stands for I: destinations of the message which are not listed in the messages actually sent. So, this field will be empty for received messages, but may be present in messages you construct yourself. =item $obj-EB() Returns the addresses which are specified on the C header line (or lines) A list of L objects is returned. C stands for I; the people addressed on this line receive the message informational, and are usually not expected to reply on its content. =item $obj-EB() Method has been removed for reasons of consistency. Use L or C<< $msg->head->get('Date') >>. =item $obj-EB() Returns a list of L objects which contains the combined info of active C, C, and C addresses. Double addresses are removed if detectable. =item $obj-EB() Returns the addresses from the senders. It is possible to have more than one address specified in the C field of the message, according to the specification. Therefore a list of L objects is returned, which usually has length 1. If you need only one address from a sender, for instance to create a "original message by" line in constructed forwarded message body, then use L. example: using from() to get all sender addresses my @from = $message->from; =item $obj-EB($fieldname) Returns the value which is stored in the header field with the specified name. The $fieldname is case insensitive. The I of the field is returned, stripped from any attributes. See L. If the field has multiple appearances in the header, only the last instance is returned. If you need more complex handing of fields, then call L yourself. See L when you want to be smart, doing the better (but slower) job. example: the get() short-cut for header fields print $msg->get('Content-Type'), "\n"; Is equivalent to: print $msg->head->get('Content-Type')->body, "\n"; =item $obj-EB() Return an estimate on the time this message was sent. The data is derived from the header, where it can be derived from the C and C lines. For MBox-like folders you may get the date from the from-line as well. This method may return C if the header is not parsed or only partially known. If you require a time, then use the L method, described below. example: using guessTimestamp() to get a transmission date print "Receipt ", ($message->timestamp || 'unknown'), "\n"; =item $obj-EB( [$head] ) Return (optionally after setting) the $head of this message. The head must be an (sub-)class of L. When the head is added, status information is taken from it and transformed into labels. More labels can be added by the LABELS hash. They are added later. example: my $header = Mail::Message::Head->new; $msg->head($header); # set my $head = $msg->head; # get =item $obj-EB() Returns the number of lines used for the whole message. =item $obj-EB() Returns exactly one address, which is the originator of this message. The returned L object is taken from the C header field, unless that field does not exists, in which case the first address from the C field is taken. If none of both provide an address, C is returned. example: using sender() to get exactly one sender address my $sender = $message->sender; print "Reply to: ", $sender->format, "\n" if defined $sender; =item $obj-EB($fieldname) Study the content of a field, like L does, with as main difference that a L object is returned. These objects stringify to an utf8 decoded representation of the data contained in the field, where L does not decode. When the field does not exist, then C is returned. See L. example: the study() short-cut for header fields print $msg->study('to'), "\n"; Is equivalent to: print $msg->head->study('to'), "\n"; # and print $msg->head->get('to')->study, "\n"; or better: if(my $to = $msg->study('to')) { print "$to\n" } if(my $to = $msg->get('to')) { print $to->study, "\n" } =item $obj-EB() Returns the message's subject, or the empty string. The subject may have encoded characters in it; use L to get rit of that. example: using subject() to get the message's subject print $msg->subject; print $msg->study('subject'); =item $obj-EB() Get a good timestamp for the message, doesn't matter how much work it is. The value returned is compatible with the platform dependent result of function time(). In these days, the timestamp as supplied by the message (in the C field) is not trustable at all: many spammers produce illegal or unreal dates to influence their location in the displayed folder. To start, the received headers are tried for a date (see L) and only then the C field. In very rare cases, only with some locally produced messages, no stamp can be found. =item $obj-EB() Returns the addresses which are specified on the C header line (or lines). A list of L objects is returned. The people addressed here are the targets of the content, and should read it contents carefully. example: using to() to get all primar destination addresses my @to = $message->to; =back =head2 The body =over 4 =item $obj-EB( [$body] ) Return the body of this message. BE WARNED that this returns you an object which may be encoded: use decoded() to get a body with usable data. With options, a new $body is set for this message. This is B for normal use unless you understand the consequences: you change the message content without changing the message-ID. The right way to go is via $message = Mail::Message->buildFromBody($body); # or $message = Mail::Message->build($body); # or $message = $origmsg->forward(body => $body); The $body must be an (sub-)class of L. In this case, information from the specified body will be copied into the header. The body object will be encoded if needed, because messages written to file or transmitted shall not contain binary data. The converted body is returned. When $body is C, the current message body will be dissected from the message. All relation will be cut. The body is returned, and can be connected to a different message. example: my $body = $msg->body; my @encoded = $msg->body->lines; my $new = Mail::Message::Body->new(mime_type => 'text/html'); my $converted = $msg->body($new); =item $obj-EB() Returns the content type header line, or C if it is not defined. The parameters will be stripped off. =item $obj-EB(%options) Decodes the body of this message, and returns it as a body object. Short for C<<$msg->body->decoded>> All %options are passed-on. =item $obj-EB(%options) Encode the message to a certain format. Read the details in the dedicated manual page L. The %options which can be specified here are those of the L method. =item $obj-EB() Check whether this message is a multipart message (has attachments). To find this out, we need at least the header of the message; there is no need to read the body of the message to detect this. =item $obj-EB() Returns C for C messages and message parts. =item $obj-EB( [<'ALL'|'ACTIVE'|'DELETED'|'RECURSE'|$filter>] ) Returns the I of this message. Usually, the term I is used with I messages: messages which are encapsulated in the body of a message. To abstract this concept: this method will return you all header-body combinations which are stored within this message B the multipart and message/rfc822 wrappers. Objects returned are C's and L's. The option default to 'ALL', which will return the message itself for single-parts, the nested content of a message/rfc822 object, respectively the parts of a multipart without recursion. In case of 'RECURSE', the parts of multiparts will be collected recursively. This option cannot be combined with the other options, which you may want: it that case you have to test yourself. 'ACTIVE' and 'DELETED' check for the deleted flag on messages and message parts. The $filter is a code reference, which is called for each part of the message; each part as C would return. example: my @parts = $msg->parts; # $msg not multipart: returns ($msg) my $parts = $msg->parts('ACTIVE'); # returns ($msg) $msg->delete; my @parts = $msg->parts; # returns ($msg) my $parts = $msg->parts('ACTIVE'); # returns () =back =head2 Flags =over 4 =item $obj-EB() Flag the message to be deleted, which is a shortcut for $msg->label(deleted => time); The real deletion only takes place on a synchronization of the folder. See L as well. The time stamp of the moment of deletion is stored as value, but that is not always preserved in the folder (depends on the implementation). When the same message is deleted more than once, the first time stamp will stay. example: $message->delete; $message->deleted(1); # exactly the same $message->label(deleted => 1); delete $message; =item $obj-EB( [BOOLEAN] ) Set the delete flag for this message. Without argument, the method returns the same as L, which is preferred. When a true value is given, L is called. example: $message->deleted(1); # delete $message->delete; # delete (preferred) $message->deleted(0); # undelete if($message->deleted) {...} # check if($message->isDeleted) {...} # check (preferred) =item $obj-EB() Short-cut for $msg->label('deleted') For some folder types, you will get the time of deletion in return. This depends on the implementation. example: next if $message->isDeleted; if(my $when = $message->isDeleted) { print scalar localtime $when; } =item $obj-EB() Returns whether this message is flagged as being modified. Modifications are changes in header lines, when a new body is set to the message (dangerous), or when labels change. =item $obj-EB