sisimai 4.24.0 → 4.24.1
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/ChangeLog.md +9 -0
- data/lib/sisimai/datetime.rb +0 -24
- data/lib/sisimai/rfc3464.rb +4 -0
- data/lib/sisimai/version.rb +1 -1
- data/set-of-emails/maildir/not/is-not-bounce-02.eml +119 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c05fb659bbe5bf0e9f2268ba9985a202d63a13ae
|
4
|
+
data.tar.gz: 37042ce08e061b0b8abb9ce684541334ee89b576
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8461be4bdf9ca6b330f0a06e3a14cf35d93c4d157ff34c60fe04f25c115c584f8d555b3a0de52f837c5c9bd8df4503ee03756e7598c9e8bdd45a4ec0e3ef64e7
|
7
|
+
data.tar.gz: ac00f4eb9c091157278e12e493c1e29a3ab1ba8da4fb6b179e0e1dc239325f539031fc42b007f8076339fa3e7c52023c00c7b5ec37f5f38d3ed442f9e371984c
|
data/ChangeLog.md
CHANGED
@@ -3,6 +3,15 @@ RELEASE NOTES for Ruby version of Sisimai
|
|
3
3
|
- releases: "https://github.com/sisimai/rb-Sisimai/releases"
|
4
4
|
- download: "https://rubygems.org/gems/sisimai"
|
5
5
|
|
6
|
+
v4.24.1
|
7
|
+
--------------------------------------------------------------------------------
|
8
|
+
- release: "Wed, 14 Nov 2018 11:09:44 +0900 (JST)"
|
9
|
+
- version: "4.24.1"
|
10
|
+
- changes:
|
11
|
+
- Fix bug in Sisimai::RFC3464: scan method unintentionally detects non-bounce
|
12
|
+
mail as a bounce.
|
13
|
+
- Remove unused method Sisimai::DateTime.o2d
|
14
|
+
|
6
15
|
v4.24.0
|
7
16
|
--------------------------------------------------------------------------------
|
8
17
|
- release: "Thu, 1 Nov 2018 18:00:00 +0900 (JST)"
|
data/lib/sisimai/datetime.rb
CHANGED
@@ -244,30 +244,6 @@ module Sisimai
|
|
244
244
|
return HourName[value]
|
245
245
|
end
|
246
246
|
|
247
|
-
# Convert from date offset to date string
|
248
|
-
# @param [Integer] argv1 Offset of
|
249
|
-
# @param [String] argv2 Delimiter character: default is '-'
|
250
|
-
# @return [String] Date string
|
251
|
-
# @example Get the value of n days before(today is 2015/11/04)
|
252
|
-
# o2d(1) #=> 2015-11-03
|
253
|
-
# o2d(2,'/') #=> 2015/11/02
|
254
|
-
def o2d(argv1 = 0, argv2 = '-')
|
255
|
-
piece = ::DateTime.now
|
256
|
-
|
257
|
-
return piece.strftime('%Y/%m/%d') unless argv1 =~ /\A[-]?\d+\z/
|
258
|
-
epoch = piece.to_time.to_i - argv1 * 86400
|
259
|
-
|
260
|
-
if epoch < 0
|
261
|
-
# Negative value
|
262
|
-
epoch = 0
|
263
|
-
|
264
|
-
elsif epoch >= 2**31
|
265
|
-
# See http://en.wikipedia.org/wiki/Year_2038_problem
|
266
|
-
epoch = 2**31 - 1
|
267
|
-
end
|
268
|
-
return Time.at(epoch).strftime('%Y' + argv2 + '%m' + argv2 + '%d')
|
269
|
-
end
|
270
|
-
|
271
247
|
# Parse date string; strptime() wrapper
|
272
248
|
# @param [String] argv1 Date string
|
273
249
|
# @return [String] Converted date string
|
data/lib/sisimai/rfc3464.rb
CHANGED
@@ -53,6 +53,7 @@ module Sisimai
|
|
53
53
|
blanklines = 0 # (Integer) The number of blank lines
|
54
54
|
readcursor = 0 # (Integer) Points the current cursor position
|
55
55
|
recipients = 0 # (Integer) The number of 'Final-Recipient' header
|
56
|
+
itisbounce = false
|
56
57
|
connheader = {
|
57
58
|
'date' => nil, # The value of Arrival-Date header
|
58
59
|
'rhost' => nil, # The value of Reporting-MTA header
|
@@ -126,6 +127,7 @@ module Sisimai
|
|
126
127
|
end
|
127
128
|
v['recipient'] = y
|
128
129
|
recipients += 1
|
130
|
+
itisbounce ||= true
|
129
131
|
|
130
132
|
elsif cv = e.match(/\AX-Actual-Recipient:[ ]*(?:RFC|rfc)822;[ ]*([^ ]+)\z/)
|
131
133
|
# X-Actual-Recipient: RFC822; |IFS=' ' && exec procmail -f- || exit 75 ...
|
@@ -392,6 +394,7 @@ module Sisimai
|
|
392
394
|
b['recipient'] = y
|
393
395
|
b['agent'] = self.smtpagent + '::Fallback'
|
394
396
|
recipients += 1
|
397
|
+
itisbounce ||= true
|
395
398
|
|
396
399
|
elsif cv = e.match(/[(](?:expanded|generated)[ ]from:?[ ]([^@]+[@][^@]+)[)]/)
|
397
400
|
# (expanded from: neko@example.jp)
|
@@ -403,6 +406,7 @@ module Sisimai
|
|
403
406
|
|
404
407
|
break
|
405
408
|
end
|
409
|
+
return nil unless itisbounce
|
406
410
|
|
407
411
|
unless recipients > 0
|
408
412
|
# Try to get a recipient address from email headers
|
data/lib/sisimai/version.rb
CHANGED
@@ -0,0 +1,119 @@
|
|
1
|
+
Return-Path: <dummy@example.com>
|
2
|
+
Received: from [172.17.234.195] (p5B283A6B.dip0.t-ipconnect.de. [91.40.58.107])
|
3
|
+
by smtp.example.com with ESMTPSA id p16-v6sm7861105wro.29.2018.11.08.14.39.35
|
4
|
+
for <dummy2@example.com>
|
5
|
+
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
|
6
|
+
Thu, 08 Nov 2018 14:39:35 -0800 (PST)
|
7
|
+
From: =?utf-8?B?eHB0bw?= <dummy@example.com>
|
8
|
+
Content-Type: multipart/mixed;
|
9
|
+
boundary="Apple-Mail=_E2B0EF7A-9E43-470C-AC46-2FDA496697AF"
|
10
|
+
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
|
11
|
+
Subject: original as attachment
|
12
|
+
Message-Id: <A3CE5E53-2501-4A47-9E48-ACB6137B9E96@example.com>
|
13
|
+
Date: Thu, 8 Nov 2018 23:39:34 +0100
|
14
|
+
To: =?utf-8?B?eHB0bw?= <dummy2@example.com>
|
15
|
+
X-Mailer: Apple Mail (2.3445.9.1)
|
16
|
+
|
17
|
+
|
18
|
+
--Apple-Mail=_E2B0EF7A-9E43-470C-AC46-2FDA496697AF
|
19
|
+
Content-Transfer-Encoding: 7bit
|
20
|
+
Content-Type: text/plain;
|
21
|
+
charset=us-ascii
|
22
|
+
|
23
|
+
it shouldn't be considered as bounce
|
24
|
+
|
25
|
+
|
26
|
+
--Apple-Mail=_E2B0EF7A-9E43-470C-AC46-2FDA496697AF
|
27
|
+
Content-Disposition: attachment;
|
28
|
+
filename=original.eml
|
29
|
+
Content-Type: message/rfc822;
|
30
|
+
x-mac-hide-extension=yes;
|
31
|
+
x-unix-mode=0666;
|
32
|
+
name="original.eml"
|
33
|
+
Content-Transfer-Encoding: 7bit
|
34
|
+
|
35
|
+
Delivered-To: dummy2@example.com
|
36
|
+
Received: by 2002:a17:906:4cca:0:0:0:0 with SMTP id q10-v6csp51694ejt;
|
37
|
+
Thu, 8 Nov 2018 14:38:18 -0800 (PST)
|
38
|
+
X-Received: by 2002:a1c:b513:: with SMTP id e19-v6mr2606301wmf.114.1541716698766;
|
39
|
+
Thu, 08 Nov 2018 14:38:18 -0800 (PST)
|
40
|
+
ARC-Seal: i=1; a=rsa-sha256; t=1541716698; cv=none;
|
41
|
+
d=example.com; s=arc-20160816;
|
42
|
+
b=GKpdbTMPvynmnz2/9zlJFSQgGyZWvtnqzUcwDfnG1mBKc/lbf6Iedn2u7CBnZ7+vJT
|
43
|
+
0rtTY+sJZYPj2Ffu0UuwSqdoOWr961ycEgy3ha4gkh6B/PexKAJjiEzJsTgxeztJxWqu
|
44
|
+
QPzDrsbwD1WjSERQdvXEytML7kuNzi1WDQhNSUZMQC1F4qkgm5OXF4Fyt3TsdCFQeIs0
|
45
|
+
hk1YLCvlmTKczy5j5LqnDheY1EBJ5rnHImozE/6KB73vWded4wqe8VawI8+DuWavOim+
|
46
|
+
xyDd20hKwdDO12xxIMHGMmgmyvsWoqaTLod2Mx1hl8bJpf8nGXztip3Nv9C9Ye223XmC
|
47
|
+
E8UQ==
|
48
|
+
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com; s=arc-20160816;
|
49
|
+
h=to:date:message-id:subject:mime-version:content-transfer-encoding
|
50
|
+
:from:dkim-signature;
|
51
|
+
bh=RarS/pY26SoZ9t7u+csjkoR6wz1tPUsfs26574w9WmY=;
|
52
|
+
b=hNikgXfZ4KJoOFMZHaGNbFnfhxce8wz4VRHOIW10ZDpSeBzpw//YMdpe+UBMu8LvXn
|
53
|
+
0LwjBh09QTHJxPazpm9Ibi5nlI5KsWkEQKr9Nd7bAaH/POA16O+ChcyCSrZMFD6qc9qu
|
54
|
+
dAAIkOyZfoCWCeo8/hK+8YiEa6u2yugqJ8ynbh7kWEbfkA3Ymp3wqdYhjuWVffT7CfKW
|
55
|
+
ZPh7dJDfs9ADaAFmZ/FIpD8uU/Ts9M0duNlncslRj8bRcYD8glp3qiU6CPDT2u1EQALY
|
56
|
+
u9zrBo7e+m1itlnmanY6M/tVDFvlrVChdrHaffCrbXIxnD07ok+eeqWRoumdqYdxw0IO
|
57
|
+
/umg==
|
58
|
+
ARC-Authentication-Results: i=1; mx.example.com;
|
59
|
+
dkim=pass header.i=@example.com header.s=20161025 header.b=RJNz7oaY;
|
60
|
+
spf=pass (example.com: domain of dummy@example.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dummy@example.com;
|
61
|
+
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=example.com
|
62
|
+
Return-Path: <dummy@example.com>
|
63
|
+
Received: from mail-sor-f41.example.com (mail-sor-f41.example.com. [209.85.220.41])
|
64
|
+
by mx.example.com with SMTPS id j3-v6sor4060253wrq.14.2018.11.08.14.38.18
|
65
|
+
for <dummy2@example.com>
|
66
|
+
(Google Transport Security);
|
67
|
+
Thu, 08 Nov 2018 14:38:18 -0800 (PST)
|
68
|
+
Received-SPF: pass (example.com: domain of dummy@example.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
|
69
|
+
Authentication-Results: mx.example.com;
|
70
|
+
dkim=pass header.i=@example.com header.s=20161025 header.b=RJNz7oaY;
|
71
|
+
spf=pass (example.com: domain of dummy@example.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dummy@example.com;
|
72
|
+
dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=example.com
|
73
|
+
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
74
|
+
d=example.com; s=20161025;
|
75
|
+
h=from:content-transfer-encoding:mime-version:subject:message-id:date
|
76
|
+
:to;
|
77
|
+
bh=RarS/pY26SoZ9t7u+csjkoR6wz1tPUsfs26574w9WmY=;
|
78
|
+
b=RJNz7oaYizzixehKFhR+GdHUVUQWzvfo/yLl6jRPwMtmUlvpfqwCotAUSsaxWKJPG2
|
79
|
+
GsPkd1dQYIK/Ebx6Jwh3mOfLa183M51kBDGHDpr8Y9/S78sJGJXRu6jhsjCSjufHExOK
|
80
|
+
IFRl7AB9ZKEtwjekOTPoPX9/bhJwtMRaUzlG29G3f6wqHbbBQRF9DpbiUEvnoMXFBmwm
|
81
|
+
7Q4+lM1Q0z+7Y5KRe28IVVYfNorKtGi1zxn1H3GdHf+t29VserpWnFiA92bliXL+UVxp
|
82
|
+
+2Pk0kljrX+6lrO3q6SFHdR5fbRZmG7S4c4VjoGW3i5ZJh0Q+dr2ATvdQcp9Pp5mvnOt
|
83
|
+
FrEg==
|
84
|
+
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
85
|
+
d=1e100.net; s=20161025;
|
86
|
+
h=x-gm-message-state:from:content-transfer-encoding:mime-version
|
87
|
+
:subject:message-id:date:to;
|
88
|
+
bh=RarS/pY26SoZ9t7u+csjkoR6wz1tPUsfs26574w9WmY=;
|
89
|
+
b=f2k0rz6q8Pd6e/0Phor8WXWR1Ql7j7YvJSNoRRSb+OEjhRXzCesp+iVVcc00ZPqo0b
|
90
|
+
aAADjNxOx2Jj/8c8CBDM1HDHl4LZ1IGfB+2O6i1L0mqF+apObbqZK+VgGfeVnDlwF+KJ
|
91
|
+
f7pyW3+8C8FrXeJTTkwkNGo0X1METvzs3pVs3EXauRgSJVXqzuzH/0EXy7VBlfLGcjkL
|
92
|
+
AnZu6UNeI+QzGlcohwvIRbWpCmkshyJTdZeTNtwgZ4WVhuBAMPmPRRFweI024Uh0tp3k
|
93
|
+
I74cWt1qy5pgAqPv8sQqAO0gk6QXNmekDaZubY5IopoW0crRc9imDggIG3WOVLvhGY++
|
94
|
+
hRmg==
|
95
|
+
X-Gm-Message-State: AGRZ1gLAnFaJcDjt4iRW4PzS0X0QnTQ5BLx/Lm2RrO+yM8tDnEDTtZsQ
|
96
|
+
HeAwyUhDqOUQ00M5A8jLXaTYMrbop30=
|
97
|
+
X-Google-Smtp-Source: AJdET5co4A/o4N85mjHvSmpBbQe/DDaQewbpIO0i+QRaD4T9MUA4sPyR1kwTezrIJuz/b01z2Lq85A==
|
98
|
+
X-Received: by 2002:adf:f68e:: with SMTP id v14-v6mr5304235wrp.261.1541716698186;
|
99
|
+
Thu, 08 Nov 2018 14:38:18 -0800 (PST)
|
100
|
+
Return-Path: <dummy@example.com>
|
101
|
+
Received: from [172.17.234.195] (p5B283A6B.dip0.t-ipconnect.de. [91.40.58.107])
|
102
|
+
by smtp.example.com with ESMTPSA id v11-v6sm4030321wrt.40.2018.11.08.14.38.17
|
103
|
+
for <dummy2@example.com>
|
104
|
+
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
|
105
|
+
Thu, 08 Nov 2018 14:38:17 -0800 (PST)
|
106
|
+
From: =?utf-8?B?QW5kcsOpIEJyw6Fz?= <dummy@example.com>
|
107
|
+
Content-Type: text/plain;
|
108
|
+
charset=us-ascii
|
109
|
+
Content-Transfer-Encoding: 7bit
|
110
|
+
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
|
111
|
+
Subject: original
|
112
|
+
Message-Id: <E5CEC0EA-2569-48E3-A47E-B01E78F1A409@example.com>
|
113
|
+
Date: Thu, 8 Nov 2018 23:38:16 +0100
|
114
|
+
To: =?utf-8?B?eHB0bw?= <dummy2@example.com>
|
115
|
+
X-Mailer: Apple Mail (2.3445.9.1)
|
116
|
+
|
117
|
+
something
|
118
|
+
|
119
|
+
--Apple-Mail=_E2B0EF7A-9E43-470C-AC46-2FDA496697AF--
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sisimai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.24.
|
4
|
+
version: 4.24.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- azumakuniyuki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -803,6 +803,7 @@ files:
|
|
803
803
|
- set-of-emails/maildir/mac/rhost-google-apps-01.eml
|
804
804
|
- set-of-emails/maildir/mac/rhost-kddi-01.eml
|
805
805
|
- set-of-emails/maildir/not/is-not-bounce-01.eml
|
806
|
+
- set-of-emails/maildir/not/is-not-bounce-02.eml
|
806
807
|
- set-of-emails/to-be-debugged-because/something-is-wrong/issue-106-01.eml
|
807
808
|
- set-of-emails/to-be-debugged-because/something-is-wrong/issue-106-02.eml
|
808
809
|
- set-of-emails/to-be-debugged-because/something-is-wrong/issue-106-03.eml
|