blob: 6829cb46ec48337be4e8ef97540a71e4d782e604 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
#-*- perl -*-
#
# Copyright (C) 2001,2002 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: Japanese.pm,v 1.4 2001/12/24 02:26:33 fukachan Exp $
#
#
# *** CAUTION: THIS FILE CODE IS JAPANESE EUC. ***
#
package Mail::Bounce::Language::Japanese;
use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
my $debug = 0;
@ISA = qw(Mail::Bounce);
=head1 NAME
Mail::Bounce::Language::Japanese - Japanese dependent error message parser
=head1 SYNOPSIS
See C<Mail::Bounce> for more details.
=head1 DESCRIPTION
See C<Mail::Bounce> for more details.
=head1 ERROR EXAMPLE
=head2 Lotus Notes
�������顼��ݡ���
��̾: [XXXXXXX:08268] Re: �ܤ����
������: xxxxxxxx@chuo.tokyo.nuinui.net
����: The peer SMTP host reports that it received bad SMTP command
syntax.
=head2 jp-r.ne.jp
������E-mail���ɥ쥹�����פǤ�
To:****@jp-r.ne.jp
Subject:** ���ä�subject������
** ���ä���ʸ��192ʸ����������
=head2 pakeo.ne.jp
���ʤ����������Ȥ������ɥ쥹��*********�פϡ���Ͽ����Ƥ��ޤ���
�⤦���ٳ�ǧ���ơ��������ʤ����Ʋ�������
=cut
# Descriptions: trap Japanese specific error address
# Arguments: OBJ($self) HASH_REF($args)
# Side Effects: update $args->{result}
# Return Value: none
sub _japanese_address_match
{
my ($self, $args) = @_;
my ($addr, $mta_type);
my $result = $args->{ result };
my $rbuf = $args->{ buf };
my $buf = $$rbuf;
use Jcode;
&Jcode::convert(\$buf, 'euc');
print STDERR "rbuf={$buf}\n" if $debug;
# lotus NOTES
if ($buf =~ /������:\s*(\S+)/) {
$addr = $1;
$mta_type = 'lotus notes';
}
# ������E-mail���ɥ쥹�����פǤ�
# To:****@jp-r.ne.jp
elsif ($buf =~ /To:\s*(\S+jp-r.ne.jp)/i) {
$addr = $1;
$mta_type = 'jp-r.ne.jp';
}
# ���ʤ����������Ȥ������ɥ쥹��**@i.pakeo.ne.jp�פϡ���Ͽ����Ƥ��ޤ���
elsif ($buf =~
/���ʤ����������Ȥ������ɥ쥹��(.*)�פϡ���Ͽ����Ƥ��ޤ���/) {
$addr = $1;
$mta_type = 'pakeo.ne.jp';
}
if ($addr) {
$result->{ $addr }->{ 'Final-Recipient' } = $addr;
$result->{ $addr }->{ 'Status'} = '5.x.y';
$result->{ $addr }->{ 'hints' } = $mta_type;
}
}
=head1 AUTHOR
Ken'ichi Fukamachi
=head1 COPYRIGHT
Copyright (C) 2001,2002 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.
=head1 HISTORY
Mail::Bounce::Language::Japanese appeared in fml5 mailing list driver package.
See C<http://www.fml.org/> for more details.
=cut
1;
|