summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-04-08 16:17:29 +0000
committerfukachan <fukachan>2001-04-08 16:17:29 +0000
commit64bfe06d50131112615d00141870bd292745327f (patch)
tree6957d2127875c35a5fb7a1f588765adbaf3a9ba2 /regress
parentfcfe1e4b85f198fd83655c8e2cee53efc8ce5374 (diff)
downloadfml8-64bfe06d50131112615d00141870bd292745327f.tar.gz
fml8-64bfe06d50131112615d00141870bd292745327f.tar.bz2
fml8-64bfe06d50131112615d00141870bd292745327f.zip
add prototype() of Mail::Bounce class and test tools for DSN format.
Diffstat (limited to 'regress')
-rwxr-xr-xregress/message/bounce_dsn.pl25
-rw-r--r--regress/testmails/error=dsn155
2 files changed, 180 insertions, 0 deletions
diff --git a/regress/message/bounce_dsn.pl b/regress/message/bounce_dsn.pl
new file mode 100755
index 00000000..effcae5b
--- /dev/null
+++ b/regress/message/bounce_dsn.pl
@@ -0,0 +1,25 @@
+#!/usr/local/bin/perl
+#-*- perl -*-
+#
+# Copyright (C) 2001 Ken'ichi Fukamachi
+# All rights reserved. This program is free software; you can
+# redistribute it and/or modify it under the same terms as Perl itself.
+#
+# $FML: basic_io.pl,v 1.2 2001/04/08 05:05:10 fukachan Exp $
+#
+
+use strict;
+use Carp;
+use lib qw(../../cpan/lib);
+use Mail::Message;
+
+for my $f (@ARGV) {
+ my $fh = new FileHandle $f;
+ my $msg = Mail::Message->parse( { fd => $fh } );
+
+ use Mail::Bounce::DSN;
+ my $r = Mail::Bounce::DSN->analyze( $msg );
+ # use Data::Dumper; print Dumper( $r );
+}
+
+exit 0;
diff --git a/regress/testmails/error=dsn b/regress/testmails/error=dsn
new file mode 100644
index 00000000..b9e774c0
--- /dev/null
+++ b/regress/testmails/error=dsn
@@ -0,0 +1,155 @@
+Received: by hikari.fml.org (8.9.3/3.4W6+Hikari-2.1) with ESMTP id WAA17617 for <fukachan@fml.org>; Sun, 8 Apr 2001 22:47:12 +0900 (UTC)
+Received: by eve.fml.org; id WAA25313; Sun, 8 Apr 2001 22:47:12 +0900 (JST)
+Received: from ahodori.fml.org(202.232.137.17) by eve.fml.org via smap (V4.2)
+ id xma025305; Sun, 8 Apr 01 22:46:24 +0900
+Received: by ahodori.fml.org (Postfix)
+ id CB6CE86662; Sun, 8 Apr 2001 22:46:16 +0900 (JST)
+Delivered-To: fukachan@ahodori.fml.org
+Received: by ahodori.fml.org (Postfix) via BOUNCE
+ id F1DD786658; Sun, 8 Apr 2001 22:46:15 +0900 (JST)
+Date: Sun, 8 Apr 2001 22:46:15 +0900 (JST)
+From: MAILER-DAEMON@ahodori.fml.org (Mail Delivery System)
+Subject: Undelivered Mail Returned to Sender
+To: fml-help-admin@ffs.fml.org
+MIME-Version: 1.0
+Content-Type: multipart/report; report-type=delivery-status;
+ boundary="C687D866E0.986737575/ahodori.fml.org"
+Message-Id: <20010408134615.F1DD786658@ahodori.fml.org>
+X-UIDL: 6b1e632f1de2e3e8927ab007c330682c
+
+This is a MIME-encapsulated message.
+
+--C687D866E0.986737575/ahodori.fml.org
+Content-Description: Notification
+Content-Type: text/plain
+
+This is the Postfix program at host ahodori.fml.org.
+
+I'm sorry to have to inform you that the message returned
+below could not be delivered to one or more destinations.
+
+For further assistance, please send mail to <postmaster>
+
+If you do so, please include this problem report. You can
+delete your own text from the message returned below.
+
+ The Postfix program
+
+<rudo@nuinui.net>: connect to sv.nuinui.net[210.161.170.173]: Connection
+ refused
+
+<master@test.fml.org>: Name service error for test.fml.org: Host not
+ found, try again
+
+--C687D866E0.986737575/ahodori.fml.org
+Content-Description: Delivery error report
+Content-Type: message/delivery-status
+
+Reporting-MTA: dns; ahodori.fml.org
+Arrival-Date: Sun, 25 Mar 2001 22:34:15 +0900 (JST)
+
+Final-Recipient: rfc822; rudo@nuinui.net
+Action: failed
+Status: 4.0.0
+Diagnostic-Code: X-Postfix; connect to sv.nuinui.net[210.161.170.173]:
+ Connection refused
+
+Final-Recipient: rfc822; master@test.fml.org
+Action: failed
+Status: 4.0.0
+Diagnostic-Code: X-Postfix; Name service error for test.fml.org: Host not
+ found, try again
+
+--C687D866E0.986737575/ahodori.fml.org
+Content-Description: Undelivered Message
+Content-Type: message/rfc822
+
+Received: from albatros.fml.org (localhost [127.0.0.1])
+ by ahodori.fml.org (Postfix) with ESMTP
+ id C687D866E0; Sun, 25 Mar 2001 22:34:15 +0900 (JST)
+Received: from beth.fml.org (ahodori.fml.org [202.232.137.17])
+ by ahodori.fml.org (Postfix) with ESMTP id A761B86657
+ for <fml-help@ffs.fml.org>; Sun, 25 Mar 2001 22:34:07 +0900 (JST)
+Received: from fml.org (beth.fml.org [192.168.148.3])
+ by beth.fml.org (Postfix) with ESMTP id 83A50A6822
+ for <fml-help@ffs.fml.org>; Sun, 25 Mar 2001 22:34:04 +0900 (JST)
+Delivered-To: fml-help@ffs.fml.org
+Date: Sun, 25 Mar 2001 22:34:12 +0900
+X-Posted: Sun, 25 Mar 2001 22:34:04 +0900
+From: Ken'ichi Fukamachi <fukachan@fml.org>
+Reply-To: fml-help@ffs.fml.org
+Subject: TODO: can I update MIME library ?
+To: fml-help@ffs.fml.org
+Message-Id: <20010325133404.83A50A6822@beth.fml.org>
+X-ML-Name: fml-help
+X-Mail-Count: 00063
+X-MLServer: fml [fml 4.0A (20010323)]; post only (only members can post)
+X-Stardate: [-30]6382.81
+X-ML-Info: If you have a question, send e-mail with the body
+ "help" (without quotes) to the address fml-help-ctl@ffs.fml.org;
+ help=<mailto:fml-help-ctl@ffs.fml.org?body=help>
+Mime-Version: 1.0
+Content-Type: text/plain; charset="iso-2022-jp"
+Content-Transfer-Encoding: 7bit
+Precedence: bulk
+Lines: 51
+List-Software: fml [fml 4.0A (20010323)]
+List-Post: <mailto:fml-help@ffs.fml.org>
+List-Owner: <mailto:fml-help-admin@ffs.fml.org>
+List-Help: <mailto:fml-help-ctl@ffs.fml.org?body=help>
+List-Unsubscribe: <mailto:fml-help-ctl@ffs.fml.org?body=unsubscribe>
+
+TODO にある『 MIMEライブラリーの書きなおし』なんですが、
+fml-devel のライブラリは次のような結果を返します。
+こうしたいとおもってたんだよね?(やや自信なし)
+
+深町%さっぽろ@IIJ
+
+入力
+ |>うじゃ あじゃじゃ<
+
+変換後
+ |>=?iso-2022-jp?B?GyRCJCYkOCRjGyhCIBskQiQiJDgkYyQ4JGMbKEI=?=<
+ |>=?iso-2022-jp?Q?=1B$B$&$8$c=1B(B?= =?iso-2022-jp?Q?=1B$B$"$8$c$8$c=1B(B?=<
+
+逆変換
+ |<うじゃ あじゃじゃ<
+ |<うじゃ あじゃじゃ<
+ |
+base64 ... ok
+qp ... ok
+
+入力
+ |>うじゃ あじゃじゃ<
+
+変換後
+ |>=?iso-2022-jp?B?GyRCJCYkOCRjISEkIiQ4JGMkOCRjGyhC?=<
+ |>=?iso-2022-jp?Q?=1B$B$&$8$c!!$"$8$c$8$c=1B(B?=<
+
+逆変換
+ |<うじゃ あじゃじゃ<
+ |<うじゃ あじゃじゃ<
+ |
+base64 ... ok
+qp ... ok
+
+入力
+ |>うじゃ
+ |あじゃじゃ<
+
+変換後
+ |>=?iso-2022-jp?B?GyRCJCYkOCRjGyhCChskQiQiJDgkYyQ4JGMbKEI=?=<
+ |>=?iso-2022-jp?Q?=1B$B$&$8$c=1B(B?=
+ |=?iso-2022-jp?Q?=1B$B$"$8$c$8$c=1B(B?=<
+
+逆変換
+ |<うじゃ
+ |あじゃじゃ<
+ |<うじゃ
+ |あじゃじゃ<
+ |
+base64 ... ok
+qp ... ok
+
+--C687D866E0.986737575/ahodori.fml.org--
+