sisimai 4.14.2 → 4.15.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sisimai might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.rubocop.yml +19 -2
- data/.travis.yml +0 -1
- data/Changes +16 -0
- data/README.md +69 -17
- data/appveyor.yml +23 -0
- data/lib/sisimai.rb +9 -7
- data/lib/sisimai/address.rb +8 -2
- data/lib/sisimai/arf.rb +1 -6
- data/lib/sisimai/data.rb +35 -47
- data/lib/sisimai/data/json.rb +16 -12
- data/lib/sisimai/datetime.rb +1 -8
- data/lib/sisimai/mail/maildir.rb +0 -3
- data/lib/sisimai/mail/mbox.rb +1 -1
- data/lib/sisimai/mail/stdin.rb +2 -1
- data/lib/sisimai/message.rb +46 -31
- data/lib/sisimai/mime.rb +2 -2
- data/lib/sisimai/msp.rb +3 -3
- data/lib/sisimai/msp/de/einsundeins.rb +1 -1
- data/lib/sisimai/msp/de/gmx.rb +1 -1
- data/lib/sisimai/msp/jp/biglobe.rb +2 -2
- data/lib/sisimai/msp/jp/ezweb.rb +10 -10
- data/lib/sisimai/msp/jp/kddi.rb +1 -1
- data/lib/sisimai/msp/ru/yandex.rb +1 -1
- data/lib/sisimai/msp/uk/messagelabs.rb +1 -1
- data/lib/sisimai/msp/us/amazonses.rb +1 -1
- data/lib/sisimai/msp/us/amazonworkmail.rb +224 -0
- data/lib/sisimai/msp/us/aol.rb +1 -1
- data/lib/sisimai/msp/us/bigfoot.rb +1 -1
- data/lib/sisimai/msp/us/facebook.rb +1 -1
- data/lib/sisimai/msp/us/google.rb +1 -1
- data/lib/sisimai/msp/us/office365.rb +273 -0
- data/lib/sisimai/msp/us/outlook.rb +2 -3
- data/lib/sisimai/msp/us/receivingses.rb +1 -1
- data/lib/sisimai/msp/us/sendgrid.rb +2 -2
- data/lib/sisimai/msp/us/verizon.rb +7 -7
- data/lib/sisimai/msp/us/yahoo.rb +1 -1
- data/lib/sisimai/msp/us/zoho.rb +1 -1
- data/lib/sisimai/mta.rb +8 -9
- data/lib/sisimai/mta/activehunter.rb +1 -1
- data/lib/sisimai/mta/apachejames.rb +1 -1
- data/lib/sisimai/mta/courier.rb +1 -1
- data/lib/sisimai/mta/domino.rb +1 -1
- data/lib/sisimai/mta/exchange.rb +15 -15
- data/lib/sisimai/mta/imailserver.rb +1 -1
- data/lib/sisimai/mta/interscanmss.rb +1 -1
- data/lib/sisimai/mta/mailfoundry.rb +1 -1
- data/lib/sisimai/mta/mailmarshalsmtp.rb +1 -1
- data/lib/sisimai/mta/mcafee.rb +1 -1
- data/lib/sisimai/mta/messagingserver.rb +1 -1
- data/lib/sisimai/mta/mxlogic.rb +2 -2
- data/lib/sisimai/mta/notes.rb +1 -1
- data/lib/sisimai/mta/opensmtpd.rb +1 -1
- data/lib/sisimai/mta/postfix.rb +2 -2
- data/lib/sisimai/mta/qmail.rb +1 -1
- data/lib/sisimai/mta/sendmail.rb +2 -2
- data/lib/sisimai/mta/surfcontrol.rb +1 -1
- data/lib/sisimai/mta/v5sendmail.rb +1 -1
- data/lib/sisimai/mta/x1.rb +1 -1
- data/lib/sisimai/mta/x2.rb +1 -1
- data/lib/sisimai/mta/x3.rb +1 -1
- data/lib/sisimai/mta/x4.rb +1 -1
- data/lib/sisimai/mta/x5.rb +1 -1
- data/lib/sisimai/order.rb +4 -1
- data/lib/sisimai/reason.rb +15 -18
- data/lib/sisimai/reason/hostunknown.rb +5 -0
- data/lib/sisimai/reason/mesgtoobig.rb +5 -0
- data/lib/sisimai/reason/userunknown.rb +1 -1
- data/lib/sisimai/rfc3464.rb +3 -3
- data/lib/sisimai/rfc3834.rb +1 -1
- data/lib/sisimai/time.rb +1 -1
- data/lib/sisimai/version.rb +1 -1
- data/set-of-emails/maildir/bsd/us-amazonworkmail-01.eml +156 -0
- data/set-of-emails/maildir/bsd/us-amazonworkmail-02.eml +160 -0
- data/set-of-emails/maildir/bsd/us-amazonworkmail-03.eml +161 -0
- data/set-of-emails/maildir/bsd/us-amazonworkmail-04.eml +156 -0
- data/set-of-emails/maildir/bsd/us-amazonworkmail-05.eml +157 -0
- data/set-of-emails/maildir/bsd/us-office365-01.eml +102 -0
- data/sisimai.gemspec +7 -0
- metadata +26 -3
@@ -57,7 +57,6 @@ module Sisimai
|
|
57
57
|
match += 1 if mhead['received'].find { |a| a =~ Re0[:received] }
|
58
58
|
return nil if match < 2
|
59
59
|
|
60
|
-
require 'sisimai/rfc5322'
|
61
60
|
dscontents = []; dscontents << Sisimai::MSP.DELIVERYSTATUS
|
62
61
|
hasdivided = mbody.split("\n")
|
63
62
|
havepassed = [''];
|
@@ -154,7 +153,7 @@ module Sisimai
|
|
154
153
|
|
155
154
|
else
|
156
155
|
if cv = e.match(/\A[Dd]iagnostic-[Cc]ode:[ ]*(.+?);[ ]*(.+)\z/)
|
157
|
-
|
156
|
+
# Diagnostic-Code: SMTP; 550 5.1.1 <userunknown@example.jp>... User Unknown
|
158
157
|
v['spec'] = cv[1].upcase
|
159
158
|
v['diagnosis'] = cv[2]
|
160
159
|
|
@@ -197,7 +196,7 @@ module Sisimai
|
|
197
196
|
if mhead['received'].size > 0
|
198
197
|
# Get localhost and remote host name from Received header.
|
199
198
|
r0 = mhead['received']
|
200
|
-
|
199
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
201
200
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
202
201
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
203
202
|
end
|
@@ -206,7 +206,7 @@ module Sisimai
|
|
206
206
|
if mhead['received'].size > 0
|
207
207
|
# Get localhost and remote host name from Received header.
|
208
208
|
r0 = mhead['received']
|
209
|
-
|
209
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
210
210
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
211
211
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
212
212
|
end
|
@@ -52,7 +52,7 @@ module Sisimai
|
|
52
52
|
require 'sisimai/datetime'
|
53
53
|
dscontents = []; dscontents << Sisimai::MSP.DELIVERYSTATUS
|
54
54
|
hasdivided = mbody.split("\n")
|
55
|
-
havepassed = ['']
|
55
|
+
havepassed = ['']
|
56
56
|
rfc822next = { 'from' => false, 'to' => false, 'subject' => false }
|
57
57
|
rfc822part = '' # (String) message/rfc822-headers part
|
58
58
|
previousfn = '' # (String) Previous field name
|
@@ -237,7 +237,7 @@ module Sisimai
|
|
237
237
|
if mhead['received'].size > 0
|
238
238
|
# Get localhost and remote host name from Received header.
|
239
239
|
r0 = mhead['received']
|
240
|
-
|
240
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
241
241
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
242
242
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
243
243
|
end
|
@@ -11,11 +11,11 @@ module Sisimai
|
|
11
11
|
Re0 = {
|
12
12
|
:'received' => %r/by .+[.]vtext[.]com /,
|
13
13
|
:'vtext.com' => {
|
14
|
-
|
14
|
+
:'from' => %r/\Apost_master[@]vtext[.]com\z/,
|
15
15
|
},
|
16
16
|
:'vzwpix.com' => {
|
17
|
-
|
18
|
-
|
17
|
+
:'from' => %r/[<]?sysadmin[@].+[.]vzwpix[.]com[>]?\z/,
|
18
|
+
:'subject' => %r/Undeliverable Message/,
|
19
19
|
},
|
20
20
|
}
|
21
21
|
Indicators = Sisimai::MSP.INDICATORS
|
@@ -180,9 +180,9 @@ module Sisimai
|
|
180
180
|
:endof => %r/\A__END_OF_EMAIL_MESSAGE__\z/,
|
181
181
|
}
|
182
182
|
reFailure = {
|
183
|
-
|
184
|
-
|
185
|
-
|
183
|
+
'userunknown' => %r{
|
184
|
+
No[ ]valid[ ]recipients[ ]for[ ]this[ ]MM
|
185
|
+
}x,
|
186
186
|
}
|
187
187
|
rfc822next = { 'from' => 0, 'to' => 0, 'subject' => 0 }
|
188
188
|
boundary00 = Sisimai::MIME.boundary(mhead['content-type'])
|
@@ -282,7 +282,7 @@ module Sisimai
|
|
282
282
|
if mhead['received'].size > 0
|
283
283
|
# Get localhost and remote host name from Received header.
|
284
284
|
r0 = mhead['received']
|
285
|
-
|
285
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
286
286
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
287
287
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
288
288
|
end
|
data/lib/sisimai/msp/us/yahoo.rb
CHANGED
@@ -157,7 +157,7 @@ module Sisimai
|
|
157
157
|
if mhead['received'].size > 0
|
158
158
|
# Get localhost and remote host name from Received header.
|
159
159
|
r0 = mhead['received']
|
160
|
-
|
160
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
161
161
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
162
162
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
163
163
|
end
|
data/lib/sisimai/msp/us/zoho.rb
CHANGED
@@ -169,7 +169,7 @@ module Sisimai
|
|
169
169
|
if mhead['received'].size > 0
|
170
170
|
# Get localhost and remote host name from Received header.
|
171
171
|
r0 = mhead['received']
|
172
|
-
|
172
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
173
173
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
174
174
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
175
175
|
end
|
data/lib/sisimai/mta.rb
CHANGED
@@ -10,8 +10,8 @@ module Sisimai
|
|
10
10
|
# @private
|
11
11
|
def INDICATORS
|
12
12
|
return {
|
13
|
-
:'deliverystatus' => (
|
14
|
-
:'message-rfc822' => (
|
13
|
+
:'deliverystatus' => (1 << 1),
|
14
|
+
:'message-rfc822' => (1 << 2),
|
15
15
|
}
|
16
16
|
end
|
17
17
|
|
@@ -40,13 +40,12 @@ module Sisimai
|
|
40
40
|
# MTA list
|
41
41
|
# @return [Array] MTA list with order
|
42
42
|
def index
|
43
|
-
return
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
]
|
43
|
+
return %w|
|
44
|
+
Sendmail Postfix Qmail Exim Courier OpenSMTPD Exchange MessagingServer
|
45
|
+
Domino Notes ApacheJames McAfee MXLogic MailFoundry IMailServer MFILTER
|
46
|
+
Activehunter InterScanMSS SurfControl MailMarshalSMTP
|
47
|
+
X1 X2 X3 X4 X5 V5sendmail
|
48
|
+
|
|
50
49
|
end
|
51
50
|
|
52
51
|
end
|
@@ -132,7 +132,7 @@ module Sisimai
|
|
132
132
|
if mhead['received'].size > 0
|
133
133
|
# Get localhost and remote host name from Received header.
|
134
134
|
r0 = mhead['received']
|
135
|
-
|
135
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
136
136
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
137
137
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
138
138
|
end
|
@@ -175,7 +175,7 @@ module Sisimai
|
|
175
175
|
if mhead['received'].size > 0
|
176
176
|
# Get localhost and remote host name from Received header.
|
177
177
|
r0 = mhead['received']
|
178
|
-
|
178
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
179
179
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
180
180
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
181
181
|
end
|
data/lib/sisimai/mta/courier.rb
CHANGED
@@ -263,7 +263,7 @@ module Sisimai
|
|
263
263
|
if mhead['received'].size > 0
|
264
264
|
# Get localhost and remote host name from Received header.
|
265
265
|
r0 = mhead['received']
|
266
|
-
|
266
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
267
267
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
268
268
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
269
269
|
end
|
data/lib/sisimai/mta/domino.rb
CHANGED
@@ -173,7 +173,7 @@ module Sisimai
|
|
173
173
|
if mhead['received'].size > 0
|
174
174
|
# Get localhost and remote host name from Received header.
|
175
175
|
r0 = mhead['received']
|
176
|
-
|
176
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
177
177
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
178
178
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
179
179
|
end
|
data/lib/sisimai/mta/exchange.rb
CHANGED
@@ -26,31 +26,31 @@ module Sisimai
|
|
26
26
|
:rfc822 => %r|\AContent-Type: message/rfc822|,
|
27
27
|
:endof => %r/\A__END_OF_EMAIL_MESSAGE__\z/,
|
28
28
|
}
|
29
|
-
|
29
|
+
CodeTable = {
|
30
30
|
'onhold' => [
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
'000B099C', # Host Unknown, Message exceeds size limit, ...
|
32
|
+
'000B09AA', # Unable to relay for, Message exceeds size limit,...
|
33
|
+
'000B09B6', # Error messages by remote MTA
|
34
34
|
],
|
35
35
|
'userunknown' => [
|
36
|
-
|
36
|
+
'000C05A6', # Unknown Recipient,
|
37
37
|
],
|
38
38
|
'systemerror' => [
|
39
|
-
|
40
|
-
|
39
|
+
'00010256', # Too many recipients.
|
40
|
+
'000D06B5', # No proxy for recipient (non-smtp mail?)
|
41
41
|
],
|
42
42
|
'networkerror' => [
|
43
|
-
|
43
|
+
'00120270', # Too Many Hops
|
44
44
|
],
|
45
45
|
'contenterr' => [
|
46
|
-
|
47
|
-
|
46
|
+
'00050311', # Conversion to Internet format failed
|
47
|
+
'000502CC', # Conversion to Internet format failed
|
48
48
|
],
|
49
49
|
'securityerr' => [
|
50
|
-
|
50
|
+
'000B0981', # 502 Server does not support AUTH
|
51
51
|
],
|
52
52
|
'filtered' => [
|
53
|
-
|
53
|
+
'000C0595', # Ambiguous Recipient
|
54
54
|
],
|
55
55
|
}
|
56
56
|
Indicators = Sisimai::MTA.INDICATORS
|
@@ -257,7 +257,7 @@ module Sisimai
|
|
257
257
|
if mhead['received'].size > 0
|
258
258
|
# Get localhost and remote host name from Received header.
|
259
259
|
r0 = mhead['received']
|
260
|
-
|
260
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
261
261
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
262
262
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
263
263
|
end
|
@@ -269,9 +269,9 @@ module Sisimai
|
|
269
269
|
errormessage = cv[2]
|
270
270
|
pseudostatus = ''
|
271
271
|
|
272
|
-
|
272
|
+
CodeTable.each_key do |r|
|
273
273
|
# Find captured code from the error code table
|
274
|
-
next unless
|
274
|
+
next unless CodeTable[r].index(capturedcode)
|
275
275
|
e['reason'] = r
|
276
276
|
pseudostatus = Sisimai::SMTP::Status.code(r)
|
277
277
|
e['status'] = pseudostatus if pseudostatus.size > 0
|
@@ -181,7 +181,7 @@ module Sisimai
|
|
181
181
|
if mhead['received'].size > 0
|
182
182
|
# Get localhost and remote host name from Received header.
|
183
183
|
r0 = mhead['received']
|
184
|
-
|
184
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
185
185
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
186
186
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
187
187
|
end
|
@@ -146,7 +146,7 @@ module Sisimai
|
|
146
146
|
if mhead['received'].size > 0
|
147
147
|
# Get localhost and remote host name from Received header.
|
148
148
|
r0 = mhead['received']
|
149
|
-
|
149
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
150
150
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
151
151
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
152
152
|
end
|
@@ -151,7 +151,7 @@ module Sisimai
|
|
151
151
|
if mhead['received'].size > 0
|
152
152
|
# Get localhost and remote host name from Received header.
|
153
153
|
r0 = mhead['received']
|
154
|
-
|
154
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
155
155
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
156
156
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
157
157
|
end
|
@@ -184,7 +184,7 @@ module Sisimai
|
|
184
184
|
if mhead['received'].size > 0
|
185
185
|
# Get localhost and remote host name from Received header.
|
186
186
|
r0 = mhead['received']
|
187
|
-
|
187
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
188
188
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
189
189
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
190
190
|
end
|
data/lib/sisimai/mta/mcafee.rb
CHANGED
@@ -173,7 +173,7 @@ module Sisimai
|
|
173
173
|
if mhead['received'].size > 0
|
174
174
|
# Get localhost and remote host name from Received header.
|
175
175
|
r0 = mhead['received']
|
176
|
-
|
176
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
177
177
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
178
178
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
179
179
|
end
|
@@ -209,7 +209,7 @@ module Sisimai
|
|
209
209
|
if mhead['received'].size > 0
|
210
210
|
# Get localhost and remote host name from Received header.
|
211
211
|
r0 = mhead['received']
|
212
|
-
|
212
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
213
213
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
214
214
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
215
215
|
end
|
data/lib/sisimai/mta/mxlogic.rb
CHANGED
@@ -18,7 +18,7 @@ module Sisimai
|
|
18
18
|
)
|
19
19
|
}x,
|
20
20
|
:'message-id' => %r/\A[<]mxl[~][0-9a-f]+/,
|
21
|
-
}
|
21
|
+
}
|
22
22
|
Re1 = {
|
23
23
|
:rfc822 => %r/\AIncluded is a copy of the message header:\z/,
|
24
24
|
:begin => %r/\AThis message was created automatically by mail delivery software[.]\z/,
|
@@ -27,7 +27,7 @@ module Sisimai
|
|
27
27
|
ReCommand = [
|
28
28
|
%r/SMTP error from remote (?:mail server|mailer) after ([A-Za-z]{4})/,
|
29
29
|
%r/SMTP error from remote (?:mail server|mailer) after end of ([A-Za-z]{4})/,
|
30
|
-
]
|
30
|
+
]
|
31
31
|
|
32
32
|
ReFailure = {
|
33
33
|
'userunknown' => %r{
|
data/lib/sisimai/mta/notes.rb
CHANGED
@@ -177,7 +177,7 @@ module Sisimai
|
|
177
177
|
if mhead['received'].size > 0
|
178
178
|
# Get localhost and remote host name from Received header.
|
179
179
|
r0 = mhead['received']
|
180
|
-
|
180
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
181
181
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
182
182
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
183
183
|
end
|
@@ -196,7 +196,7 @@ module Sisimai
|
|
196
196
|
if mhead['received'].size > 0
|
197
197
|
# Get localhost and remote host name from Received header.
|
198
198
|
r0 = mhead['received']
|
199
|
-
|
199
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
200
200
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
201
201
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
202
202
|
end
|
data/lib/sisimai/mta/postfix.rb
CHANGED
@@ -62,7 +62,7 @@ module Sisimai
|
|
62
62
|
|
63
63
|
dscontents = []; dscontents << Sisimai::MTA.DELIVERYSTATUS
|
64
64
|
hasdivided = mbody.split("\n")
|
65
|
-
havepassed = ['']
|
65
|
+
havepassed = ['']
|
66
66
|
rfc822next = { 'from' => false, 'to' => false, 'subject' => false }
|
67
67
|
rfc822part = '' # (String) message/rfc822-headers part
|
68
68
|
previousfn = '' # (String) Previous field name
|
@@ -284,7 +284,7 @@ module Sisimai
|
|
284
284
|
if mhead['received'].size > 0
|
285
285
|
# Get localhost and remote host name from Received header.
|
286
286
|
r0 = mhead['received']
|
287
|
-
|
287
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
288
288
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
289
289
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
290
290
|
end
|
data/lib/sisimai/mta/qmail.rb
CHANGED
@@ -249,7 +249,7 @@ module Sisimai
|
|
249
249
|
if mhead['received'].size > 0
|
250
250
|
# Get localhost and remote host name from Received header.
|
251
251
|
r0 = mhead['received']
|
252
|
-
|
252
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
253
253
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
254
254
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
255
255
|
end
|
data/lib/sisimai/mta/sendmail.rb
CHANGED
@@ -56,7 +56,7 @@ module Sisimai
|
|
56
56
|
|
57
57
|
dscontents = []; dscontents << Sisimai::MTA.DELIVERYSTATUS
|
58
58
|
hasdivided = mbody.split("\n")
|
59
|
-
havepassed = ['']
|
59
|
+
havepassed = ['']
|
60
60
|
rfc822next = { 'from' => false, 'to' => false, 'subject' => false }
|
61
61
|
rfc822part = '' # (String) message/rfc822-headers part
|
62
62
|
previousfn = '' # (String) Previous field name
|
@@ -266,7 +266,7 @@ module Sisimai
|
|
266
266
|
if mhead['received'].size > 0
|
267
267
|
# Get localhost and remote host name from Received header.
|
268
268
|
r0 = mhead['received']
|
269
|
-
|
269
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
270
270
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
271
271
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
272
272
|
end
|
@@ -171,7 +171,7 @@ module Sisimai
|
|
171
171
|
if mhead['received'].size > 0
|
172
172
|
# Get localhost and remote host name from Received header.
|
173
173
|
r0 = mhead['received']
|
174
|
-
|
174
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
175
175
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
176
176
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
177
177
|
end
|
@@ -193,7 +193,7 @@ module Sisimai
|
|
193
193
|
if mhead['received'].size > 0
|
194
194
|
# Get localhost and remote host name from Received header.
|
195
195
|
r0 = mhead['received']
|
196
|
-
|
196
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
197
197
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
198
198
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
199
199
|
end
|
data/lib/sisimai/mta/x1.rb
CHANGED
@@ -134,7 +134,7 @@ module Sisimai
|
|
134
134
|
if mhead['received'].size > 0
|
135
135
|
# Get localhost and remote host name from Received header.
|
136
136
|
r0 = mhead['received']
|
137
|
-
|
137
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
138
138
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
139
139
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
140
140
|
end
|
data/lib/sisimai/mta/x2.rb
CHANGED
@@ -136,7 +136,7 @@ module Sisimai
|
|
136
136
|
if mhead['received'].size > 0
|
137
137
|
# Get localhost and remote host name from Received header.
|
138
138
|
r0 = mhead['received']
|
139
|
-
|
139
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
140
140
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
141
141
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
142
142
|
end
|
data/lib/sisimai/mta/x3.rb
CHANGED
@@ -149,7 +149,7 @@ module Sisimai
|
|
149
149
|
if mhead['received'].size > 0
|
150
150
|
# Get localhost and remote host name from Received header.
|
151
151
|
r0 = mhead['received']
|
152
|
-
|
152
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
153
153
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
154
154
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
155
155
|
end
|
data/lib/sisimai/mta/x4.rb
CHANGED
@@ -279,7 +279,7 @@ module Sisimai
|
|
279
279
|
if mhead['received'].size > 0
|
280
280
|
# Get localhost and remote host name from Received header.
|
281
281
|
r0 = mhead['received']
|
282
|
-
|
282
|
+
%w|lhost rhost|.each { |a| e[a] ||= '' }
|
283
283
|
e['lhost'] = Sisimai::RFC5322.received(r0[0]).shift if e['lhost'].empty?
|
284
284
|
e['rhost'] = Sisimai::RFC5322.received(r0[-1]).pop if e['rhost'].empty?
|
285
285
|
end
|