1 |
wakaba |
1.1 |
|
2 |
|
|
=head1 NAME |
3 |
|
|
|
4 |
|
|
Message::Header::Message --- Internet Messages -- Definition |
5 |
|
|
for RFC 822 like header fields of message/* media types |
6 |
|
|
|
7 |
|
|
=cut |
8 |
|
|
|
9 |
|
|
require Message::Header::Default; |
10 |
|
|
package Message::Header::Message; |
11 |
|
|
use strict; |
12 |
|
|
use vars qw($VERSION); |
13 |
wakaba |
1.2 |
$VERSION=do{my @r=(q$Revision: 1.1 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; |
14 |
wakaba |
1.1 |
|
15 |
|
|
package Message::Header::Message::DeliveryStatus; |
16 |
|
|
our %OPTION = %Message::Header::Default::OPTION; |
17 |
|
|
$OPTION{namespace_uri} = 'urn:x-suika-fam-cx:msgpm:header:message:delivery-status'; |
18 |
|
|
|
19 |
|
|
$OPTION{use_ph_namespace} = 0; |
20 |
|
|
$OPTION{namespace_phname} = ''; |
21 |
|
|
$OPTION{namespace_phname_goodcase} = ''; |
22 |
|
|
|
23 |
|
|
$OPTION{case_sensible} = 0; |
24 |
|
|
$OPTION{to_be_goodcase} = \&Message::Header::Default::_goodcase; |
25 |
|
|
|
26 |
|
|
$OPTION{goodcase} = { |
27 |
|
|
'dsn-gateway' => 'DSN-Gateway', |
28 |
|
|
'final-log-id' => 'Final-Log-ID', |
29 |
|
|
#'original-envelope-id' => 'Original-Envelope-Id', |
30 |
|
|
'received-from-mta' => 'Received-From-MTA', |
31 |
|
|
'remote-mta' => 'Remote-MTA', |
32 |
|
|
'reporting-mta' => 'Reporting-MTA', |
33 |
|
|
}; |
34 |
|
|
|
35 |
|
|
$OPTION{value_type} = { |
36 |
wakaba |
1.2 |
':default' => ['Message::Field::Unstructured',{ |
37 |
|
|
-use_encoded_word => 0, |
38 |
|
|
}], |
39 |
wakaba |
1.1 |
|
40 |
|
|
action => ['Message::Field::ValueParams'], |
41 |
|
|
'arival-date' => ['Message::Field::Date'], |
42 |
|
|
'diagnostic-code' => ['Message::Field::TypedText'], |
43 |
|
|
'dsn-gateway' => ['Message::Field::TypedText'], |
44 |
|
|
'final-recipient' => ['Message::Field::TypedText',{ |
45 |
|
|
-separator => ';', |
46 |
|
|
}], |
47 |
|
|
'last-attempt-date' => ['Message::Field::Date'], |
48 |
|
|
'original-recipient' => ['Message::Field::TypedText',{ |
49 |
|
|
-separator => ';', |
50 |
|
|
}], |
51 |
|
|
'received-from-mta' => ['Message::Field::TypedText'], |
52 |
|
|
'remote-mta' => ['Message::Field::TypedText'], |
53 |
|
|
'reporting-mta' => ['Message::Field::TypedText'], |
54 |
wakaba |
1.2 |
status => ['Message::Field::Domain',{ |
55 |
|
|
-use_ipv4_address => 0, |
56 |
|
|
-use_ipv6_address => 0, |
57 |
|
|
-use_domain_literal => 0, |
58 |
|
|
-use_comment => 1, |
59 |
|
|
-output_comment => 1, |
60 |
|
|
}], |
61 |
wakaba |
1.1 |
'will-retry-until' => ['Message::Field::Date'], |
62 |
|
|
'x-actual-recipient' => ['Message::Field::TypedText',{ |
63 |
|
|
-separator => ';', |
64 |
|
|
}], |
65 |
|
|
}; |
66 |
|
|
|
67 |
|
|
$OPTION{uri_mailto_safe} = { |
68 |
|
|
':default' => 1, |
69 |
|
|
}; |
70 |
|
|
|
71 |
|
|
$Message::Header::NS_uri2phpackage{ $OPTION{namespace_uri} } = __PACKAGE__; |
72 |
|
|
|
73 |
|
|
package Message::Header::Message::DispositionNotification; |
74 |
|
|
our %OPTION = %Message::Header::HTTP::OPTION; |
75 |
|
|
our %OPTION = %Message::Header::Default::OPTION; |
76 |
|
|
$OPTION{namespace_uri} = 'urn:x-suika-fam-cx:msgpm:header:message:disposition-notification'; |
77 |
|
|
|
78 |
|
|
$OPTION{use_ph_namespace} = 0; |
79 |
|
|
$OPTION{namespace_phname} = ''; |
80 |
|
|
$OPTION{namespace_phname_goodcase} = ''; |
81 |
|
|
|
82 |
|
|
$OPTION{case_sensible} = 0; |
83 |
|
|
$OPTION{to_be_goodcase} = \&Message::Header::Default::_goodcase; |
84 |
|
|
|
85 |
|
|
$OPTION{goodcase} = { |
86 |
|
|
'mdn-gateway' => 'MDN-Gateway', |
87 |
|
|
'original-message-id' => 'Original-Message-ID', |
88 |
|
|
'reporting-ua' => 'Reporting-UA', |
89 |
|
|
}; |
90 |
|
|
|
91 |
|
|
$OPTION{value_type} = { |
92 |
wakaba |
1.2 |
':default' => ['Message::Field::Unstructured',{ |
93 |
|
|
-use_encoded_word => 0, |
94 |
|
|
}], |
95 |
wakaba |
1.1 |
|
96 |
wakaba |
1.2 |
disposition => ['Message::Field::MDNDisposition'], |
97 |
wakaba |
1.1 |
'final-recipient' => ['Message::Field::TypedText',{ |
98 |
|
|
-separator => ';', |
99 |
|
|
}], |
100 |
|
|
'mdn-gateway' => ['Message::Field::TypedText'], |
101 |
|
|
'original-message-id' => ['Message::Field::MsgID'], |
102 |
|
|
'original-recipient' => ['Message::Field::TypedText',{ |
103 |
|
|
-separator => ';', |
104 |
|
|
}], |
105 |
wakaba |
1.2 |
'reporting-ua' => ['Message::Field::ReportingUA'], |
106 |
wakaba |
1.1 |
}; |
107 |
|
|
|
108 |
|
|
$OPTION{uri_mailto_safe} = { |
109 |
|
|
':default' => 1, |
110 |
|
|
}; |
111 |
|
|
|
112 |
|
|
$Message::Header::NS_uri2phpackage{ $OPTION{namespace_uri} } = __PACKAGE__; |
113 |
|
|
|
114 |
|
|
=head1 LICENSE |
115 |
|
|
|
116 |
|
|
Copyright 2002 wakaba E<lt>w@suika.fam.cxE<gt>. |
117 |
|
|
|
118 |
|
|
This program is free software; you can redistribute it and/or modify |
119 |
|
|
it under the terms of the GNU General Public License as published by |
120 |
|
|
the Free Software Foundation; either version 2 of the License, or |
121 |
|
|
(at your option) any later version. |
122 |
|
|
|
123 |
|
|
This program is distributed in the hope that it will be useful, |
124 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
125 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
126 |
|
|
GNU General Public License for more details. |
127 |
|
|
|
128 |
|
|
You should have received a copy of the GNU General Public License |
129 |
|
|
along with this program; see the file COPYING. If not, write to |
130 |
|
|
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
131 |
|
|
Boston, MA 02111-1307, USA. |
132 |
|
|
|
133 |
|
|
=head1 CHANGE |
134 |
|
|
|
135 |
|
|
See F<ChangeLog>. |
136 |
wakaba |
1.2 |
$Date: 2002/07/08 11:47:20 $ |
137 |
wakaba |
1.1 |
|
138 |
|
|
=cut |
139 |
|
|
|
140 |
|
|
1; |