line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# Mail::SPF::Mech::All |
3
|
|
|
|
|
|
|
# SPF record "all" mechanism class. |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# (C) 2005-2012 Julian Mehnle |
6
|
|
|
|
|
|
|
# 2005 Shevek |
7
|
|
|
|
|
|
|
# $Id: All.pm 57 2012-01-30 08:15:31Z julian $ |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
############################################################################## |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
package Mail::SPF::Mech::All; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 NAME |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Mail::SPF::Mech::All - SPF record C mechanism class |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=cut |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
1
|
|
1330
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
20
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
29
|
|
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
1
|
|
5
|
use base 'Mail::SPF::Mech'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
77
|
|
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
1
|
|
5
|
use constant TRUE => (0 == 0); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
49
|
|
25
|
1
|
|
|
1
|
|
4
|
use constant FALSE => not TRUE; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
1
|
|
4
|
use constant name => 'all'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
59
|
|
28
|
1
|
|
|
1
|
|
6
|
use constant name_pattern => qr/${\name}/i; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
86
|
|
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
137
|
use constant explanation_templates_by_result_code => { |
31
|
1
|
|
|
|
|
1
|
%{__PACKAGE__->SUPER::explanation_templates_by_result_code}, |
32
|
|
|
|
|
|
|
pass => "Sender is authorized by default to use '%{s}' in '%{_scope}' identity", |
33
|
|
|
|
|
|
|
fail => "Sender is not authorized by default to use '%{s}' in '%{_scope}' identity", |
34
|
|
|
|
|
|
|
softfail => "Sender is not authorized by default to use '%{s}' in '%{_scope}' identity, however domain is not currently prepared for false failures", |
35
|
1
|
|
|
1
|
|
5
|
}; |
|
1
|
|
|
|
|
2
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 DESCRIPTION |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
An object of class B represents an SPF record mechanism |
40
|
|
|
|
|
|
|
of type C. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head2 Constructors |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
The following constructors are provided: |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=over |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=item B: returns I |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Creates a new SPF record C mechanism object. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
%options is a list of key/value pairs representing any of the following options: |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=over |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=item B |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
See L. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=back |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=item B: returns I; |
63
|
|
|
|
|
|
|
throws I, I |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Creates a new SPF record C mechanism object by parsing the string and |
66
|
|
|
|
|
|
|
any options given. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=back |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head2 Class methods |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
The following class methods are provided: |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=over |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item B |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item B |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
See L. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=item B: returns I |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Returns B<'all'>. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item B: returns I |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Returns a regular expression that matches a mechanism name of B<'all'>. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=back |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 Instance methods |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
The following instance methods are provided: |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=over |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=cut |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
sub parse_params { |
101
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
102
|
|
|
|
|
|
|
# No parameters. |
103
|
0
|
|
|
|
|
|
return; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item B |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=item B |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item B |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=item B |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
See L. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=item B: returns I |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Returns B because the C mechanism always matches. See RFC 4408, |
119
|
|
|
|
|
|
|
5.1, for details. |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=cut |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
sub match { |
124
|
0
|
|
|
0
|
1
|
|
my ($self, $server, $request) = @_; |
125
|
0
|
|
|
|
|
|
return TRUE; |
126
|
|
|
|
|
|
|
} |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=back |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head1 SEE ALSO |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
L, L, L, L |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
L |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
For availability, support, and license information, see the README file |
137
|
|
|
|
|
|
|
included with Mail::SPF. |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head1 AUTHORS |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
Julian Mehnle , Shevek |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=cut |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
TRUE; |