Filename | /usr/local/lib/perl5/site_perl/Mail/SpamAssassin/Constants.pm |
Statements | Executed 57 statements in 4.89ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
7 | 7 | 1 | 70µs | 70µs | CORE:qr (opcode) | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 56µs | 56µs | BEGIN@28 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 45µs | 56µs | BEGIN@24 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 34µs | 265µs | BEGIN@403 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 34µs | 267µs | BEGIN@91 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 33µs | 259µs | BEGIN@255 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 28µs | 205µs | BEGIN@180 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 27µs | 215µs | BEGIN@62 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 26µs | 240µs | BEGIN@266 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 26µs | 216µs | BEGIN@352 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 26µs | 243µs | BEGIN@378 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 24µs | 213µs | BEGIN@65 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 24µs | 223µs | BEGIN@356 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 24µs | 225µs | BEGIN@400 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 24µs | 62µs | BEGIN@25 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 23µs | 218µs | BEGIN@375 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 22µs | 201µs | BEGIN@366 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 22µs | 310µs | BEGIN@33 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 21µs | 85µs | BEGIN@26 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 20µs | 197µs | BEGIN@63 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 20µs | 222µs | BEGIN@64 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 19µs | 210µs | BEGIN@370 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 18µs | 224µs | BEGIN@175 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 18µs | 116µs | BEGIN@30 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 18µs | 181µs | BEGIN@372 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 17µs | 214µs | BEGIN@368 | Mail::SpamAssassin::Constants::
1 | 1 | 1 | 11µs | 11µs | BEGIN@29 | Mail::SpamAssassin::Constants::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # Constants used in many parts of the SpamAssassin codebase. | ||||
2 | # | ||||
3 | # TODO! we need to reimplement parts of the RESERVED regexp! | ||||
4 | |||||
5 | # <@LICENSE> | ||||
6 | # Licensed to the Apache Software Foundation (ASF) under one or more | ||||
7 | # contributor license agreements. See the NOTICE file distributed with | ||||
8 | # this work for additional information regarding copyright ownership. | ||||
9 | # The ASF licenses this file to you under the Apache License, Version 2.0 | ||||
10 | # (the "License"); you may not use this file except in compliance with | ||||
11 | # the License. You may obtain a copy of the License at: | ||||
12 | # | ||||
13 | # http://www.apache.org/licenses/LICENSE-2.0 | ||||
14 | # | ||||
15 | # Unless required by applicable law or agreed to in writing, software | ||||
16 | # distributed under the License is distributed on an "AS IS" BASIS, | ||||
17 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
18 | # See the License for the specific language governing permissions and | ||||
19 | # limitations under the License. | ||||
20 | # </@LICENSE> | ||||
21 | |||||
22 | package Mail::SpamAssassin::Constants; | ||||
23 | |||||
24 | 2 | 77µs | 2 | 66µs | # spent 56µs (45+10) within Mail::SpamAssassin::Constants::BEGIN@24 which was called:
# once (45µs+10µs) by Mail::SpamAssassin::BEGIN@70 at line 24 # spent 56µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@24
# spent 10µs making 1 call to strict::import |
25 | 2 | 65µs | 2 | 100µs | # spent 62µs (24+38) within Mail::SpamAssassin::Constants::BEGIN@25 which was called:
# once (24µs+38µs) by Mail::SpamAssassin::BEGIN@70 at line 25 # spent 62µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@25
# spent 38µs making 1 call to warnings::import |
26 | 2 | 70µs | 2 | 149µs | # spent 85µs (21+64) within Mail::SpamAssassin::Constants::BEGIN@26 which was called:
# once (21µs+64µs) by Mail::SpamAssassin::BEGIN@70 at line 26 # spent 85µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@26
# spent 64µs making 1 call to re::import |
27 | |||||
28 | # spent 56µs within Mail::SpamAssassin::Constants::BEGIN@28 which was called:
# once (56µs+0s) by Mail::SpamAssassin::BEGIN@70 at line 59 | ||||
29 | 2 | 69µs | 1 | 11µs | # spent 11µs within Mail::SpamAssassin::Constants::BEGIN@29 which was called:
# once (11µs+0s) by Mail::SpamAssassin::BEGIN@70 at line 29 # spent 11µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@29 |
30 | 2 | 107µs | 2 | 213µs | # spent 116µs (18+98) within Mail::SpamAssassin::Constants::BEGIN@30 which was called:
# once (18µs+98µs) by Mail::SpamAssassin::BEGIN@70 at line 30 # spent 116µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@30
# spent 98µs making 1 call to vars::import |
31 | 1 | 13µs | @ISA = qw(Exporter); | ||
32 | |||||
33 | 1 | 2µs | # spent 310µs (22+288) within Mail::SpamAssassin::Constants::BEGIN@33 which was called:
# once (22µs+288µs) by Mail::SpamAssassin::BEGIN@70 at line 35 | ||
34 | @BAYES_VARS @IP_VARS @SA_VARS %EXPORT_TAGS @EXPORT_OK | ||||
35 | 1 | 216µs | 2 | 597µs | ); # spent 310µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@33
# spent 288µs making 1 call to vars::import |
36 | |||||
37 | 1 | 6µs | @IP_VARS = qw( | ||
38 | IP_IN_RESERVED_RANGE IP_PRIVATE LOCALHOST IPV4_ADDRESS IP_ADDRESS | ||||
39 | ); | ||||
40 | 1 | 2µs | @BAYES_VARS = qw( | ||
41 | DUMP_MAGIC DUMP_TOKEN DUMP_BACKUP | ||||
42 | ); | ||||
43 | # These are generic constants that may be used across several modules | ||||
44 | 1 | 8µs | @SA_VARS = qw( | ||
45 | HARVEST_DNSBL_PRIORITY MBX_SEPARATOR | ||||
46 | MAX_BODY_LINE_LENGTH MAX_HEADER_KEY_LENGTH MAX_HEADER_VALUE_LENGTH | ||||
47 | MAX_HEADER_LENGTH ARITH_EXPRESSION_LEXER AI_TIME_UNKNOWN | ||||
48 | CHARSETS_LIKELY_TO_FP_AS_CAPS MAX_URI_LENGTH | ||||
49 | ); | ||||
50 | |||||
51 | 1 | 12µs | %EXPORT_TAGS = ( | ||
52 | bayes => [ @BAYES_VARS ], | ||||
53 | ip => [ @IP_VARS ], | ||||
54 | sa => [ @SA_VARS ], | ||||
55 | all => [ @BAYES_VARS, @IP_VARS, @SA_VARS ], | ||||
56 | ); | ||||
57 | |||||
58 | 1 | 20µs | @EXPORT_OK = ( @BAYES_VARS, @IP_VARS, @SA_VARS ); | ||
59 | 1 | 79µs | 1 | 56µs | } # spent 56µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@28 |
60 | |||||
61 | # BAYES_VARS | ||||
62 | 2 | 85µs | 2 | 402µs | # spent 215µs (27+188) within Mail::SpamAssassin::Constants::BEGIN@62 which was called:
# once (27µs+188µs) by Mail::SpamAssassin::BEGIN@70 at line 62 # spent 215µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@62
# spent 188µs making 1 call to constant::import |
63 | 2 | 64µs | 2 | 374µs | # spent 197µs (20+177) within Mail::SpamAssassin::Constants::BEGIN@63 which was called:
# once (20µs+177µs) by Mail::SpamAssassin::BEGIN@70 at line 63 # spent 197µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@63
# spent 177µs making 1 call to constant::import |
64 | 2 | 66µs | 2 | 424µs | # spent 222µs (20+202) within Mail::SpamAssassin::Constants::BEGIN@64 which was called:
# once (20µs+202µs) by Mail::SpamAssassin::BEGIN@70 at line 64 # spent 222µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@64
# spent 202µs making 1 call to constant::import |
65 | 2 | 738µs | 2 | 402µs | # spent 213µs (24+189) within Mail::SpamAssassin::Constants::BEGIN@65 which was called:
# once (24µs+189µs) by Mail::SpamAssassin::BEGIN@70 at line 65 # spent 213µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@65
# spent 189µs making 1 call to constant::import |
66 | |||||
67 | # IP_VARS | ||||
68 | # --------------------------------------------------------------------------- | ||||
69 | # Initialize a regexp for private IPs, i.e. ones that could be | ||||
70 | # used inside a company and be the first or second relay hit by | ||||
71 | # a message. Some companies use these internally and translate | ||||
72 | # them using a NAT firewall. These are listed in the RBL as invalid | ||||
73 | # originators -- which is true, if you receive the mail directly | ||||
74 | # from them; however we do not, so we should ignore them. | ||||
75 | # | ||||
76 | # sources: | ||||
77 | # IANA = <http://www.iana.org/numbers>, | ||||
78 | # 5735 = <http://tools.ietf.org/html/rfc5735> | ||||
79 | # 6598 = <http://tools.ietf.org/html/rfc6598> | ||||
80 | # 4193 = <http://tools.ietf.org/html/rfc4193> | ||||
81 | # CYMRU = <http://www.cymru.com/Documents/bogon-list.html> | ||||
82 | # | ||||
83 | # This includes: | ||||
84 | # host-local address space 127.0.0.0/8 and ::1, | ||||
85 | # link-local address space 169.254.0.0/16 and fe80::/10, | ||||
86 | # private-use address space 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, | ||||
87 | # TODO: Unique Local Unicast Addresses fc00::/7 (RFC 4193) | ||||
88 | # shared address space 100.64.0.0/10 (RFC 6598 - for use in CGN), | ||||
89 | # IPv4-mapped IPv6 address ::ffff:0:0/96 (RFC 3513) | ||||
90 | # | ||||
91 | 1 | 2µs | # spent 267µs (34+233) within Mail::SpamAssassin::Constants::BEGIN@91 which was called:
# once (34µs+233µs) by Mail::SpamAssassin::BEGIN@70 at line 172 | ||
92 | (?: # IPv4 addresses | ||||
93 | 10| # 10.0.0.0/8 Private Use (5735, 1918) | ||||
94 | 127| # 127.0.0.0/8 Host-local (5735, 1122) | ||||
95 | 169\.254| # 169.254.0.0/16 Link-local (5735, 3927) | ||||
96 | 172\.(?:1[6-9]|2[0-9]|3[01])| # 172.16.0.0/12 Private Use (5735, 1918) | ||||
97 | 192\.168| # 192.168.0.0/16 Private Use (5735, 1918) | ||||
98 | 100\.(?:6[4-9]|[7-9][0-9]|1[01][0-9]|12[0-7]) # 100.64.0.0/10 CGN (6598) | ||||
99 | )\..* | ||||
100 | | | ||||
101 | (?: # IPv6 addresses | ||||
102 | # don't use \b here, it hits on :'s | ||||
103 | (?:IPv6: # with optional prefix | ||||
104 | | (?<![a-f0-9:]) | ||||
105 | ) | ||||
106 | (?: | ||||
107 | # IPv4 mapped in IPv6 | ||||
108 | # note the colon after the 12th byte in each here | ||||
109 | (?: | ||||
110 | # first 6 (12 bytes) non-zero | ||||
111 | (?:0{1,4}:){5} ffff: | ||||
112 | | | ||||
113 | # leading zeros omitted (note {0,5} not {1,5}) | ||||
114 | ::(?:0{1,4}:){0,4} ffff: | ||||
115 | | | ||||
116 | # trailing zeros (in the first 6) omitted | ||||
117 | (?:0{1,4}:){1,4}: ffff: | ||||
118 | | | ||||
119 | # 0000 in second up to (including) fifth omitted | ||||
120 | 0{1,4}::(?:0{1,4}:){1,3} ffff: | ||||
121 | | | ||||
122 | # 0000 in third up to (including) fifth omitted | ||||
123 | (?:0{1,4}:){2}:0{1,2}: ffff: | ||||
124 | | | ||||
125 | # 0000 in fourth up to (including) fifth omitted | ||||
126 | (?:0{1,4}:){3}:0: ffff: | ||||
127 | | | ||||
128 | # 0000 in fifth omitted | ||||
129 | (?:0{1,4}:){4}: ffff: | ||||
130 | ) | ||||
131 | # and the IPv4 address appended to all of the 12 bytes above | ||||
132 | (?: | ||||
133 | 10| | ||||
134 | 127| | ||||
135 | 169\.254| | ||||
136 | 172\.(?:1[6-9]|2[0-9]|3[01])| | ||||
137 | 192\.168| | ||||
138 | 100\.(?:6[4-9]|[7-9][0-9]|1[01][0-9]|12[0-7]) | ||||
139 | )\..* | ||||
140 | |||||
141 | | # or IPv6 link-local address space, fe80::/10 | ||||
142 | fe[89ab][0-9a-f]:.* | ||||
143 | |||||
144 | | # or the host-local ::1 addr, as a pure IPv6 address | ||||
145 | |||||
146 | # all 8 (16 bytes) of them present | ||||
147 | (?:0{1,4}:){7} 0{0,3}1 | ||||
148 | | | ||||
149 | # leading zeros omitted | ||||
150 | :(?::0{1,4}){0,6}: 0{0,3}1 | ||||
151 | | | ||||
152 | # 0000 in second up to (including) seventh omitted | ||||
153 | 0{1,4}:(?::0{1,4}){0,5}: 0{0,3}1 | ||||
154 | | | ||||
155 | # 0000 in third up to (including) seventh omitted | ||||
156 | (?:0{1,4}:){2}(?::0{1,4}){0,4}: 0{0,3}1 | ||||
157 | | | ||||
158 | # 0000 in fouth up to (including) seventh omitted | ||||
159 | (?:0{1,4}:){3}(?::0{1,4}){0,3}: 0{0,3}1 | ||||
160 | | | ||||
161 | # 0000 in fifth up to (including) seventh omitted | ||||
162 | (?:0{1,4}:){4}(?::0{1,4}){0,2}: 0{0,3}1 | ||||
163 | | | ||||
164 | # 0000 in sixth up to (including) seventh omitted | ||||
165 | (?:0{1,4}:){5}(?::0{1,4}){0,1}: 0{0,3}1 | ||||
166 | | | ||||
167 | # 0000 in seventh omitted | ||||
168 | (?:0{1,4}:){6}: 0{0,3}1 | ||||
169 | ) | ||||
170 | (?![a-f0-9:]) | ||||
171 | ) | ||||
172 | 1 | 98µs | 3 | 500µs | )}oxi; # spent 267µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@91
# spent 218µs making 1 call to constant::import
# spent 15µs making 1 call to Mail::SpamAssassin::Constants::CORE:qr |
173 | |||||
174 | # backward compatibility | ||||
175 | 2 | 484µs | 2 | 430µs | # spent 224µs (18+206) within Mail::SpamAssassin::Constants::BEGIN@175 which was called:
# once (18µs+206µs) by Mail::SpamAssassin::BEGIN@70 at line 175 # spent 224µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@175
# spent 206µs making 1 call to constant::import |
176 | |||||
177 | # --------------------------------------------------------------------------- | ||||
178 | # match the various ways of saying "localhost". | ||||
179 | |||||
180 | 1 | 2µs | # spent 205µs (28+177) within Mail::SpamAssassin::Constants::BEGIN@180 which was called:
# once (28µs+177µs) by Mail::SpamAssassin::BEGIN@70 at line 250 | ||
181 | (?: | ||||
182 | # as a string | ||||
183 | localhost(?:\.localdomain)? | ||||
184 | | | ||||
185 | \b(?<!:) # ensure no "::" IPv6 marker before this one | ||||
186 | # plain IPv4 | ||||
187 | 127\.0\.0\.1 \b | ||||
188 | | | ||||
189 | # IPv6 addresses | ||||
190 | # don't use \b here, it hits on :'s | ||||
191 | (?:IPv6: # with optional prefix | ||||
192 | | (?<![a-f0-9:]) | ||||
193 | ) | ||||
194 | (?: | ||||
195 | # IPv4 mapped in IPv6 | ||||
196 | # note the colon after the 12th byte in each here | ||||
197 | (?: | ||||
198 | # first 6 (12 bytes) non-zero | ||||
199 | (?:0{1,4}:){5} ffff: | ||||
200 | | | ||||
201 | # leading zeros omitted (note {0,5} not {1,5}) | ||||
202 | ::(?:0{1,4}:){0,4} ffff: | ||||
203 | | | ||||
204 | # trailing zeros (in the first 6) omitted | ||||
205 | (?:0{1,4}:){1,4}: ffff: | ||||
206 | | | ||||
207 | # 0000 in second up to (including) fifth omitted | ||||
208 | 0{1,4}::(?:0{1,4}:){1,3} ffff: | ||||
209 | | | ||||
210 | # 0000 in third up to (including) fifth omitted | ||||
211 | (?:0{1,4}:){2}:0{1,2}: ffff: | ||||
212 | | | ||||
213 | # 0000 in fourth up to (including) fifth omitted | ||||
214 | (?:0{1,4}:){3}:0: ffff: | ||||
215 | | | ||||
216 | # 0000 in fifth omitted | ||||
217 | (?:0{1,4}:){4}: ffff: | ||||
218 | ) | ||||
219 | # and the IPv4 address appended to all of the 12 bytes above | ||||
220 | 127\.0\.0\.1 # no \b, we check later | ||||
221 | |||||
222 | | # or (separately) a pure IPv6 address | ||||
223 | |||||
224 | # all 8 (16 bytes) of them present | ||||
225 | (?:0{1,4}:){7} 0{0,3}1 | ||||
226 | | | ||||
227 | # leading zeros omitted | ||||
228 | :(?::0{1,4}){0,6}: 0{0,3}1 | ||||
229 | | | ||||
230 | # 0000 in second up to (including) seventh omitted | ||||
231 | 0{1,4}:(?::0{1,4}){0,5}: 0{0,3}1 | ||||
232 | | | ||||
233 | # 0000 in third up to (including) seventh omitted | ||||
234 | (?:0{1,4}:){2}(?::0{1,4}){0,4}: 0{0,3}1 | ||||
235 | | | ||||
236 | # 0000 in fouth up to (including) seventh omitted | ||||
237 | (?:0{1,4}:){3}(?::0{1,4}){0,3}: 0{0,3}1 | ||||
238 | | | ||||
239 | # 0000 in fifth up to (including) seventh omitted | ||||
240 | (?:0{1,4}:){4}(?::0{1,4}){0,2}: 0{0,3}1 | ||||
241 | | | ||||
242 | # 0000 in sixth up to (including) seventh omitted | ||||
243 | (?:0{1,4}:){5}(?::0{1,4}){0,1}: 0{0,3}1 | ||||
244 | | | ||||
245 | # 0000 in seventh omitted | ||||
246 | (?:0{1,4}:){6}: 0{0,3}1 | ||||
247 | ) | ||||
248 | (?![a-f0-9:]) | ||||
249 | ) | ||||
250 | 1 | 246µs | 3 | 382µs | /oxi; # spent 205µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@180
# spent 163µs making 1 call to constant::import
# spent 13µs making 1 call to Mail::SpamAssassin::Constants::CORE:qr |
251 | |||||
252 | # --------------------------------------------------------------------------- | ||||
253 | # an IP address, in IPv4 format only. | ||||
254 | # | ||||
255 | 1 | 2µs | # spent 259µs (33+226) within Mail::SpamAssassin::Constants::BEGIN@255 which was called:
# once (33µs+226µs) by Mail::SpamAssassin::BEGIN@70 at line 260 | ||
256 | (?:1\d\d|2[0-4]\d|25[0-5]|\d\d|\d)\. | ||||
257 | (?:1\d\d|2[0-4]\d|25[0-5]|\d\d|\d)\. | ||||
258 | (?:1\d\d|2[0-4]\d|25[0-5]|\d\d|\d)\. | ||||
259 | (?:1\d\d|2[0-4]\d|25[0-5]|\d\d|\d) | ||||
260 | 1 | 811µs | 3 | 485µs | \b/ox; # spent 259µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@255
# spent 212µs making 1 call to constant::import
# spent 14µs making 1 call to Mail::SpamAssassin::Constants::CORE:qr |
261 | |||||
262 | # --------------------------------------------------------------------------- | ||||
263 | # an IP address, in IPv4, IPv4-mapped-in-IPv6, or IPv6 format. NOTE: cannot | ||||
264 | # just refer to $IPV4_ADDRESS, due to perl bug reported in nesting qr//s. :( | ||||
265 | # | ||||
266 | 1 | 2µs | # spent 240µs (26+213) within Mail::SpamAssassin::Constants::BEGIN@266 which was called:
# once (26µs+213µs) by Mail::SpamAssassin::BEGIN@70 at line 348 | ||
267 | (?: | ||||
268 | \b(?<!:) # ensure no "::" IPv4 marker before this one | ||||
269 | # plain IPv4, as above | ||||
270 | (?:1\d\d|2[0-4]\d|25[0-5]|\d\d|\d)\. | ||||
271 | (?:1\d\d|2[0-4]\d|25[0-5]|\d\d|\d)\. | ||||
272 | (?:1\d\d|2[0-4]\d|25[0-5]|\d\d|\d)\. | ||||
273 | (?:1\d\d|2[0-4]\d|25[0-5]|\d\d|\d)\b | ||||
274 | | | ||||
275 | # IPv6 addresses | ||||
276 | # don't use \b here, it hits on :'s | ||||
277 | (?:IPv6: # with optional prefix | ||||
278 | | (?<![a-f0-9:]) | ||||
279 | ) | ||||
280 | (?: | ||||
281 | # IPv4 mapped in IPv6 | ||||
282 | # note the colon after the 12th byte in each here | ||||
283 | (?: | ||||
284 | # first 6 (12 bytes) non-zero | ||||
285 | (?:[a-f0-9]{1,4}:){6} | ||||
286 | | | ||||
287 | # leading zeros omitted (note {0,5} not {1,5}) | ||||
288 | ::(?:[a-f0-9]{1,4}:){0,5} | ||||
289 | | | ||||
290 | # trailing zeros (in the first 6) omitted | ||||
291 | (?:[a-f0-9]{1,4}:){1,5}: | ||||
292 | | | ||||
293 | # 0000 in second up to (including) fifth omitted | ||||
294 | [a-f0-9]{1,4}::(?:[a-f0-9]{1,4}:){1,4} | ||||
295 | | | ||||
296 | # 0000 in third up to (including) fifth omitted | ||||
297 | (?:[a-f0-9]{1,4}:){2}:(?:[a-f0-9]{1,4}:){1,3} | ||||
298 | | | ||||
299 | # 0000 in fourth up to (including) fifth omitted | ||||
300 | (?:[a-f0-9]{1,4}:){3}:(?:[a-f0-9]{1,4}:){1,2} | ||||
301 | | | ||||
302 | # 0000 in fifth omitted | ||||
303 | (?:[a-f0-9]{1,4}:){4}:[a-f0-9]{1,4}: | ||||
304 | ) | ||||
305 | # and the IPv4 address appended to all of the 12 bytes above | ||||
306 | (?:1\d\d|2[0-4]\d|25[0-5]|\d\d|\d)\. | ||||
307 | (?:1\d\d|2[0-4]\d|25[0-5]|\d\d|\d)\. | ||||
308 | (?:1\d\d|2[0-4]\d|25[0-5]|\d\d|\d)\. | ||||
309 | (?:1\d\d|2[0-4]\d|25[0-5]|\d\d|\d) # no \b, we check later | ||||
310 | |||||
311 | | # or (separately) a pure IPv6 address | ||||
312 | |||||
313 | # all 8 (16 bytes) of them present | ||||
314 | (?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4} | ||||
315 | | | ||||
316 | # leading zeros omitted | ||||
317 | :(?::[a-f0-9]{1,4}){1,7} | ||||
318 | | | ||||
319 | # trailing zeros omitted | ||||
320 | (?:[a-f0-9]{1,4}:){1,7}: | ||||
321 | | | ||||
322 | # 0000 in second up to (including) seventh omitted | ||||
323 | [a-f0-9]{1,4}:(?::[a-f0-9]{1,4}){1,6} | ||||
324 | | | ||||
325 | # 0000 in third up to (including) seventh omitted | ||||
326 | (?:[a-f0-9]{1,4}:){2}(?::[a-f0-9]{1,4}){1,5} | ||||
327 | | | ||||
328 | # 0000 in fouth up to (including) seventh omitted | ||||
329 | (?:[a-f0-9]{1,4}:){3}(?::[a-f0-9]{1,4}){1,4} | ||||
330 | | | ||||
331 | # 0000 in fifth up to (including) seventh omitted | ||||
332 | (?:[a-f0-9]{1,4}:){4}(?::[a-f0-9]{1,4}){1,3} | ||||
333 | | | ||||
334 | # 0000 in sixth up to (including) seventh omitted | ||||
335 | (?:[a-f0-9]{1,4}:){5}(?::[a-f0-9]{1,4}){1,2} | ||||
336 | | | ||||
337 | # 0000 in seventh omitted | ||||
338 | (?:[a-f0-9]{1,4}:){6}:[a-f0-9]{1,4} | ||||
339 | | | ||||
340 | # :: (the unspecified address 0:0:0:0:0:0:0:0) | ||||
341 | # dos: I don't expect to see this address in a header, and | ||||
342 | # it may cause non-address strings to match, but we'll | ||||
343 | # include it for now since it is valid | ||||
344 | :: | ||||
345 | ) | ||||
346 | (?![a-f0-9:]) | ||||
347 | ) | ||||
348 | 1 | 92µs | 3 | 453µs | /oxi; # spent 240µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@266
# spent 204µs making 1 call to constant::import
# spent 9µs making 1 call to Mail::SpamAssassin::Constants::CORE:qr |
349 | |||||
350 | # --------------------------------------------------------------------------- | ||||
351 | |||||
352 | 2 | 183µs | 2 | 407µs | # spent 216µs (26+190) within Mail::SpamAssassin::Constants::BEGIN@352 which was called:
# once (26µs+190µs) by Mail::SpamAssassin::BEGIN@70 at line 352 # spent 216µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@352
# spent 190µs making 1 call to constant::import |
353 | |||||
354 | # regular expression that matches message separators in The University of | ||||
355 | # Washington's MBX mailbox format | ||||
356 | 2 | 96µs | 3 | 421µs | # spent 223µs (24+198) within Mail::SpamAssassin::Constants::BEGIN@356 which was called:
# once (24µs+198µs) by Mail::SpamAssassin::BEGIN@70 at line 356 # spent 223µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@356
# spent 195µs making 1 call to constant::import
# spent 4µs making 1 call to Mail::SpamAssassin::Constants::CORE:qr |
357 | # $1 = datestamp (str) | ||||
358 | # $2 = size of message in bytes (int) | ||||
359 | # $3 = message status - binary (hex) | ||||
360 | # $4 = message ID (hex) | ||||
361 | |||||
362 | # --------------------------------------------------------------------------- | ||||
363 | # values used for internal message representations | ||||
364 | |||||
365 | # maximum byte length of lines in the body | ||||
366 | 2 | 59µs | 2 | 380µs | # spent 201µs (22+179) within Mail::SpamAssassin::Constants::BEGIN@366 which was called:
# once (22µs+179µs) by Mail::SpamAssassin::BEGIN@70 at line 366 # spent 201µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@366
# spent 179µs making 1 call to constant::import |
367 | # maximum byte length of a header key | ||||
368 | 2 | 75µs | 2 | 411µs | # spent 214µs (17+197) within Mail::SpamAssassin::Constants::BEGIN@368 which was called:
# once (17µs+197µs) by Mail::SpamAssassin::BEGIN@70 at line 368 # spent 214µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@368
# spent 197µs making 1 call to constant::import |
369 | # maximum byte length of a header value including continued lines | ||||
370 | 2 | 60µs | 2 | 400µs | # spent 210µs (19+190) within Mail::SpamAssassin::Constants::BEGIN@370 which was called:
# once (19µs+190µs) by Mail::SpamAssassin::BEGIN@70 at line 370 # spent 210µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@370
# spent 190µs making 1 call to constant::import |
371 | # maximum byte length of entire header | ||||
372 | 2 | 61µs | 2 | 344µs | # spent 181µs (18+163) within Mail::SpamAssassin::Constants::BEGIN@372 which was called:
# once (18µs+163µs) by Mail::SpamAssassin::BEGIN@70 at line 372 # spent 181µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@372
# spent 163µs making 1 call to constant::import |
373 | |||||
374 | # maximum byte length of any given URI | ||||
375 | 2 | 361µs | 2 | 413µs | # spent 218µs (23+195) within Mail::SpamAssassin::Constants::BEGIN@375 which was called:
# once (23µs+195µs) by Mail::SpamAssassin::BEGIN@70 at line 375 # spent 218µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@375
# spent 195µs making 1 call to constant::import |
376 | |||||
377 | # used for meta rules and "if" conditionals in Conf::Parser | ||||
378 | 1 | 2µs | # spent 243µs (26+218) within Mail::SpamAssassin::Constants::BEGIN@378 which was called:
# once (26µs+218µs) by Mail::SpamAssassin::BEGIN@70 at line 392 | ||
379 | [\-\+\d\.]+| # A Number | ||||
380 | \w[\w\:]*| # Rule or Class Name | ||||
381 | [\(\)]| # Parens | ||||
382 | \|\|| # Boolean OR | ||||
383 | \&\&| # Boolean AND | ||||
384 | \^| # Boolean XOR | ||||
385 | !(?!=)| # Boolean NOT | ||||
386 | >=?| # GT or EQ | ||||
387 | <=?| # LT or EQ | ||||
388 | ==| # EQ | ||||
389 | !=| # NEQ | ||||
390 | [\+\-\*\/]| # Mathematical Operator | ||||
391 | [\?:] # ? : Operator | ||||
392 | 1 | 89µs | 3 | 461µs | )/ox; # spent 243µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@378
# spent 214µs making 1 call to constant::import
# spent 4µs making 1 call to Mail::SpamAssassin::Constants::CORE:qr |
393 | |||||
394 | # ArchiveIterator | ||||
395 | |||||
396 | # if AI doesn't read in the message in the first pass to see if the received | ||||
397 | # date makes the message useful or not, we need to mark it so that in the | ||||
398 | # second pass (when the message is actually read + processed) the received | ||||
399 | # date is calculated. this value signifies "unknown" from the first pass. | ||||
400 | 2 | 302µs | 2 | 426µs | # spent 225µs (24+201) within Mail::SpamAssassin::Constants::BEGIN@400 which was called:
# once (24µs+201µs) by Mail::SpamAssassin::BEGIN@70 at line 400 # spent 225µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@400
# spent 201µs making 1 call to constant::import |
401 | |||||
402 | # Charsets which use capital letters heavily in their encoded representation. | ||||
403 | 1 | 2µs | # spent 265µs (34+231) within Mail::SpamAssassin::Constants::BEGIN@403 which was called:
# once (34µs+231µs) by Mail::SpamAssassin::BEGIN@70 at line 405 | ||
404 | koi|jp|jis|euc|gb|big5|isoir|cp1251|windows-1251|georgianps|pt154|tis | ||||
405 | 1 | 141µs | 3 | 496µs | )[-_a-z0-9]*}ix; # spent 265µs making 1 call to Mail::SpamAssassin::Constants::BEGIN@403
# spent 220µs making 1 call to constant::import
# spent 11µs making 1 call to Mail::SpamAssassin::Constants::CORE:qr |
406 | |||||
407 | 1 | 16µs | 1; | ||
# spent 70µs within Mail::SpamAssassin::Constants::CORE:qr which was called 7 times, avg 10µs/call:
# once (15µs+0s) by Mail::SpamAssassin::Constants::BEGIN@91 at line 172
# once (14µs+0s) by Mail::SpamAssassin::Constants::BEGIN@255 at line 260
# once (13µs+0s) by Mail::SpamAssassin::Constants::BEGIN@180 at line 250
# once (11µs+0s) by Mail::SpamAssassin::Constants::BEGIN@403 at line 405
# once (9µs+0s) by Mail::SpamAssassin::Constants::BEGIN@266 at line 348
# once (4µs+0s) by Mail::SpamAssassin::Constants::BEGIN@378 at line 392
# once (4µs+0s) by Mail::SpamAssassin::Constants::BEGIN@356 at line 356 |