summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-04-11 16:59:52 +0000
committerfukachan <fukachan>2001-04-11 16:59:52 +0000
commit23a6851376404d5a15b1d2215a2c7ca578fa0f51 (patch)
tree48ce75c2d26b57980720a1effaa0cb07c6d6561c
parent41ccaedcce9505fc8bc2a5dd6f2efaf23cd6222c (diff)
downloadfml8-23a6851376404d5a15b1d2215a2c7ca578fa0f51.tar.gz
fml8-23a6851376404d5a15b1d2215a2c7ca578fa0f51.tar.bz2
fml8-23a6851376404d5a15b1d2215a2c7ca578fa0f51.zip
enable to trap smail error format
-rw-r--r--fml/lib/Mail/Bounce/SimpleMatch.pm9
-rw-r--r--regress/testmails/error=smail33
2 files changed, 41 insertions, 1 deletions
diff --git a/fml/lib/Mail/Bounce/SimpleMatch.pm b/fml/lib/Mail/Bounce/SimpleMatch.pm
index 936a0679..69816e22 100644
--- a/fml/lib/Mail/Bounce/SimpleMatch.pm
+++ b/fml/lib/Mail/Bounce/SimpleMatch.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: SimpleMatch.pm,v 1.1 2001/04/11 16:17:41 fukachan Exp $
+# $FML: SimpleMatch.pm,v 1.2 2001/04/11 16:37:49 fukachan Exp $
#
@@ -48,6 +48,11 @@ my $address_trap_regexp = {
'start' => '----- The following addresses had delivery problems -----',
'end' => '----- Non-delivered information -----',
},
+
+ 'smail' => {
+ 'start' => 'Failed addresses follow:',
+ 'end' => 'Message text follows:',
+ },
};
my $reason_trap_regexp = {
@@ -101,6 +106,8 @@ sub _address_match
if (/(\S+\@\S+)/) {
my $addr = $1;
+ $addr =~ s/^<//;
+ $addr =~ s/>$//;
$result->{ $addr }->{ 'Final-Recipient' } = $addr;
$result->{ $addr }->{ 'Status'} = '5.x.y';
}
diff --git a/regress/testmails/error=smail b/regress/testmails/error=smail
new file mode 100644
index 00000000..4e04856d
--- /dev/null
+++ b/regress/testmails/error=smail
@@ -0,0 +1,33 @@
+From: MAILER-DAEMON <MAILER-DAEMON@terrania.nuinui.net>
+To: rudo@nuinui.net
+
+|------------------------- Message log follows: -------------------------|
+ no valid recipients were found for this message
+|------------------------- Failed addresses follow: ---------------------|
+ <rudo@nuinui.net> ... unknown user
+|------------------------- Message text follows: ------------------------|
+Received: from email.ac.nuiniu.net(really [10.20.30.10]) by
+terrania.nuinui.net
+ via smail with smtp
+ id <m0xL2TN-000KhhC@terrania.nuinui.net>
+ for <unknown>; Tue, 14 Oct 1997 10:37:01 +0200 (CEST)
+ (Smail-3.2 1996-Jul-4 #1 built 1996-Nov-18)
+Received: from speedy.pch.ac.nuiniu.net by email.ac.nuiniu.net with SMTP (PP);
+ Tue, 14 Oct 1997 09:36:50 +0100
+Received: from S02PHCH1/MAIL by speedy.pch.ac.nuiniu.net (Mercury 1.11);
+ Tue, 14 Oct 97 10:36:50 MET
+Received: from MAIL by S02PHCH1 (Mercury 1.11); Tue, 14 Oct 97 10:36:26 MET
+From: fukachan@fml.org (Ken'ichi Fukamachi)
+To: elena@nuinui.net
+Reply-To: rudo@nuinui.net
+Subject: [elena:00300] test 01
+ appended_mesg
+Message-Id: <20010102080803.1BCBE15024@iris.fml.org>
+Date: Tue, 2 Jan 2001 17:08:03 +0900 (JST)
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-2022-JP
+Content-Transfer-Encoding: 7bit
+
+test message
+
+-- rudo's mabuachi