sisimai 4.25.3-java → 4.25.4-java
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 +5 -5
- data/.gitignore +1 -0
- data/.travis.yml +1 -0
- data/ANALYTICAL-PRECISION +2 -4
- data/CONTRIBUTING +4 -0
- data/ChangeLog.md +39 -0
- data/Developers.mk +1 -72
- data/Makefile +4 -0
- data/README-JA.md +3 -0
- data/README.md +5 -2
- data/lib/sisimai.rb +4 -3
- data/lib/sisimai/arf.rb +6 -6
- data/lib/sisimai/bite.rb +8 -3
- data/lib/sisimai/bite/email.rb +7 -50
- data/lib/sisimai/bite/json.rb +5 -25
- data/lib/sisimai/data.rb +1 -1
- data/lib/sisimai/lhost.rb +101 -0
- data/lib/sisimai/{bite/email → lhost}/activehunter.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/amavis.rb +9 -9
- data/lib/sisimai/lhost/amazonses.rb +403 -0
- data/lib/sisimai/{bite/email → lhost}/amazonworkmail.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/aol.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/apachejames.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/bigfoot.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/biglobe.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/courier.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/domino.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/einsundeins.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/exchange2003.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/exchange2007.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/exim.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/ezweb.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/facebook.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/fml.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/gmx.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/google.rb +14 -14
- data/lib/sisimai/{bite/email → lhost}/gsuite.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/imailserver.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/interscanmss.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/kddi.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/mailfoundry.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/mailmarshalsmtp.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/mailru.rb +11 -11
- data/lib/sisimai/{bite/email → lhost}/mcafee.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/messagelabs.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/messagingserver.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/mfilter.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/mxlogic.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/notes.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/office365.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/opensmtpd.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/outlook.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/postfix.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/qmail.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/receivingses.rb +11 -11
- data/lib/sisimai/{bite/email → lhost}/sendgrid.rb +120 -11
- data/lib/sisimai/{bite/email → lhost}/sendmail.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/surfcontrol.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/userdefined.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/v5sendmail.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/verizon.rb +11 -11
- data/lib/sisimai/{bite/email → lhost}/x1.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/x2.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/x3.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/x4.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/x5.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/yahoo.rb +9 -9
- data/lib/sisimai/{bite/email → lhost}/yandex.rb +10 -10
- data/lib/sisimai/{bite/email → lhost}/zoho.rb +10 -10
- data/lib/sisimai/mda.rb +1 -1
- data/lib/sisimai/message.rb +535 -28
- data/lib/sisimai/message/email.rb +3 -454
- data/lib/sisimai/message/json.rb +3 -177
- data/lib/sisimai/order.rb +238 -4
- data/lib/sisimai/order/email.rb +5 -190
- data/lib/sisimai/order/json.rb +3 -39
- data/lib/sisimai/reason.rb +1 -1
- data/lib/sisimai/reason/norelaying.rb +1 -1
- data/lib/sisimai/reason/userunknown.rb +1 -1
- data/lib/sisimai/reason/virusdetected.rb +1 -0
- data/lib/sisimai/rfc1894.rb +2 -2
- data/lib/sisimai/rfc3464.rb +13 -13
- data/lib/sisimai/rfc3834.rb +3 -3
- data/lib/sisimai/rfc5322.rb +1 -1
- data/lib/sisimai/rhost.rb +5 -4
- data/lib/sisimai/rhost/exchangeonline.rb +1 -1
- data/lib/sisimai/rhost/franceptt.rb +1 -1
- data/lib/sisimai/rhost/godaddy.rb +1 -1
- data/lib/sisimai/rhost/iua.rb +39 -0
- data/lib/sisimai/version.rb +1 -1
- data/set-of-emails/README.md +0 -1
- data/set-of-emails/maildir/bsd/email-gsuite-13.eml +261 -0
- data/set-of-emails/maildir/bsd/email-postfix-62.eml +105 -0
- data/set-of-emails/maildir/bsd/email-postfix-63.eml +85 -0
- data/set-of-emails/maildir/bsd/rhost-iua-01.eml +70 -0
- metadata +75 -94
- data/fig/sisimai-architecture.png +0 -0
- data/lib/sisimai/bite/email/amazonses.rb +0 -186
- data/lib/sisimai/bite/json/amazonses.rb +0 -242
- data/lib/sisimai/bite/json/sendgrid.rb +0 -123
- data/set-of-emails/jsonobj/json-amazonses-01.json +0 -1
- data/set-of-emails/jsonobj/json-amazonses-02.json +0 -11
- data/set-of-emails/jsonobj/json-amazonses-03.json +0 -1
- data/set-of-emails/jsonobj/json-amazonses-04.json +0 -1
- data/set-of-emails/jsonobj/json-amazonses-05.json +0 -1
- data/set-of-emails/jsonobj/json-amazonses-06.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-01.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-02.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-03.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-04.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-05.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-06.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-07.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-08.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-09.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-10.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-11.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-12.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-13.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-14.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-15.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-16.json +0 -1
- data/set-of-emails/jsonobj/json-sendgrid-17.json +0 -1
@@ -1,20 +1,20 @@
|
|
1
|
-
module Sisimai::
|
2
|
-
# Sisimai::
|
1
|
+
module Sisimai::Lhost
|
2
|
+
# Sisimai::Lhost::AmazonWorkMail parses a bounce email which created by
|
3
3
|
# Amazon WorkMail. Methods in the module are called from only Sisimai::Message.
|
4
4
|
module AmazonWorkMail
|
5
5
|
class << self
|
6
|
-
# Imported from p5-Sisimail/lib/Sisimai/
|
7
|
-
require 'sisimai/
|
6
|
+
# Imported from p5-Sisimail/lib/Sisimai/Lhost/AmazonWorkMail.pm
|
7
|
+
require 'sisimai/lhost'
|
8
8
|
|
9
9
|
# https://aws.amazon.com/workmail/
|
10
|
-
Indicators = Sisimai::
|
10
|
+
Indicators = Sisimai::Lhost.INDICATORS
|
11
11
|
StartingOf = {
|
12
12
|
message: ['Technical report:'],
|
13
13
|
rfc822: ['content-type: message/rfc822'],
|
14
14
|
}.freeze
|
15
15
|
|
16
16
|
def description; return 'Amazon WorkMail: https://aws.amazon.com/workmail/'; end
|
17
|
-
def smtpagent; return Sisimai::
|
17
|
+
def smtpagent; return Sisimai::Lhost.smtpagent(self); end
|
18
18
|
|
19
19
|
# X-Mailer: Amazon WorkMail
|
20
20
|
# X-Original-Mailer: Amazon WorkMail
|
@@ -32,7 +32,7 @@ module Sisimai::Bite::Email
|
|
32
32
|
# @return [Hash, Nil] Bounce data list and message/rfc822
|
33
33
|
# part or nil if it failed to parse or
|
34
34
|
# the arguments are missing
|
35
|
-
def
|
35
|
+
def make(mhead, mbody)
|
36
36
|
# :'subject' => %r/Delivery[_ ]Status[_ ]Notification[_ ].+Failure/,
|
37
37
|
# :'received' => %r/.+[.]smtp-out[.].+[.]amazonses[.]com\b/,
|
38
38
|
# :'x-mailer' => %r/\AAmazon WorkMail\z/,
|
@@ -51,7 +51,7 @@ module Sisimai::Bite::Email
|
|
51
51
|
fieldtable = Sisimai::RFC1894.FIELDTABLE
|
52
52
|
permessage = {} # (Hash) Store values of each Per-Message field
|
53
53
|
|
54
|
-
dscontents = [Sisimai::
|
54
|
+
dscontents = [Sisimai::Lhost.DELIVERYSTATUS]
|
55
55
|
hasdivided = mbody.split("\n")
|
56
56
|
rfc822list = [] # (Array) Each line in message/rfc822 part string
|
57
57
|
blanklines = 0 # (Integer) The number of blank lines
|
@@ -101,7 +101,7 @@ module Sisimai::Bite::Email
|
|
101
101
|
# Final-Recipient: rfc822; kijitora@example.jp
|
102
102
|
if v['recipient']
|
103
103
|
# There are multiple recipient addresses in the message body.
|
104
|
-
dscontents << Sisimai::
|
104
|
+
dscontents << Sisimai::Lhost.DELIVERYSTATUS
|
105
105
|
v = dscontents[-1]
|
106
106
|
end
|
107
107
|
v['recipient'] = o[2]
|
@@ -1,12 +1,12 @@
|
|
1
|
-
module Sisimai::
|
2
|
-
# Sisimai::
|
1
|
+
module Sisimai::Lhost
|
2
|
+
# Sisimai::Lhost::Aol parses a bounce email which created by Aol Mail.
|
3
3
|
# Methods in the module are called from only Sisimai::Message.
|
4
4
|
module Aol
|
5
5
|
class << self
|
6
|
-
# Imported from p5-Sisimail/lib/Sisimai/
|
7
|
-
require 'sisimai/
|
6
|
+
# Imported from p5-Sisimail/lib/Sisimai/Lhost/Aol.pm
|
7
|
+
require 'sisimai/lhost'
|
8
8
|
|
9
|
-
Indicators = Sisimai::
|
9
|
+
Indicators = Sisimai::Lhost.INDICATORS
|
10
10
|
StartingOf = {
|
11
11
|
message: ['Content-Type: message/delivery-status'],
|
12
12
|
rfc822: ['Content-Type: message/rfc822'],
|
@@ -16,8 +16,8 @@ module Sisimai::Bite::Email
|
|
16
16
|
'notaccept' => ['type=MX: Malformed or unexpected name server reply'],
|
17
17
|
}.freeze
|
18
18
|
|
19
|
-
def description; return 'Aol Mail:
|
20
|
-
def smtpagent; return Sisimai::
|
19
|
+
def description; return 'Aol Mail: https://www.aol.com'; end
|
20
|
+
def smtpagent; return Sisimai::Lhost.smtpagent(self); end
|
21
21
|
|
22
22
|
# X-AOL-IP: 192.0.2.135
|
23
23
|
# X-AOL-VSS-INFO: 5600.1067/98281
|
@@ -42,7 +42,7 @@ module Sisimai::Bite::Email
|
|
42
42
|
# @return [Hash, Nil] Bounce data list and message/rfc822
|
43
43
|
# part or nil if it failed to parse or
|
44
44
|
# the arguments are missing
|
45
|
-
def
|
45
|
+
def make(mhead, mbody)
|
46
46
|
# :from => %r/\APostmaster [<]Postmaster[@]AOL[.]com[>]\z/,
|
47
47
|
# :subject => %r/\AUndeliverable: /,
|
48
48
|
return nil unless mhead['x-aol-ip']
|
@@ -51,7 +51,7 @@ module Sisimai::Bite::Email
|
|
51
51
|
fieldtable = Sisimai::RFC1894.FIELDTABLE
|
52
52
|
permessage = {} # (Hash) Store values of each Per-Message field
|
53
53
|
|
54
|
-
dscontents = [Sisimai::
|
54
|
+
dscontents = [Sisimai::Lhost.DELIVERYSTATUS]
|
55
55
|
hasdivided = mbody.split("\n")
|
56
56
|
havepassed = ['']
|
57
57
|
rfc822list = [] # (Array) Each line in message/rfc822 part string
|
@@ -106,7 +106,7 @@ module Sisimai::Bite::Email
|
|
106
106
|
# Final-Recipient: rfc822; kijitora@example.jp
|
107
107
|
if v['recipient']
|
108
108
|
# There are multiple recipient addresses in the message body.
|
109
|
-
dscontents << Sisimai::
|
109
|
+
dscontents << Sisimai::Lhost.DELIVERYSTATUS
|
110
110
|
v = dscontents[-1]
|
111
111
|
end
|
112
112
|
v['recipient'] = o[2]
|
@@ -1,12 +1,12 @@
|
|
1
|
-
module Sisimai::
|
2
|
-
# Sisimai::
|
3
|
-
#
|
1
|
+
module Sisimai::Lhost
|
2
|
+
# Sisimai::Lhost::ApacheJames parses a bounce email which created by ApacheJames.
|
3
|
+
# Methods in the module are called from only Sisimai::Message.
|
4
4
|
module ApacheJames
|
5
5
|
class << self
|
6
|
-
# Imported from p5-Sisimail/lib/Sisimai/
|
7
|
-
require 'sisimai/
|
6
|
+
# Imported from p5-Sisimail/lib/Sisimai/Lhost/ApacheJames.pm
|
7
|
+
require 'sisimai/lhost'
|
8
8
|
|
9
|
-
Indicators = Sisimai::
|
9
|
+
Indicators = Sisimai::Lhost.INDICATORS
|
10
10
|
StartingOf = {
|
11
11
|
# apache-james-2.3.2/src/java/org/apache/james/transport/mailets/
|
12
12
|
# AbstractNotify.java|124: out.println("Error message below:");
|
@@ -17,7 +17,7 @@ module Sisimai::Bite::Email
|
|
17
17
|
}.freeze
|
18
18
|
|
19
19
|
def description; return 'Java Apache Mail Enterprise Server'; end
|
20
|
-
def smtpagent; return Sisimai::
|
20
|
+
def smtpagent; return Sisimai::Lhost.smtpagent(self); end
|
21
21
|
def headerlist; return []; end
|
22
22
|
|
23
23
|
# Parse bounce messages from Apache James
|
@@ -31,14 +31,14 @@ module Sisimai::Bite::Email
|
|
31
31
|
# @return [Hash, Nil] Bounce data list and message/rfc822
|
32
32
|
# part or nil if it failed to parse or
|
33
33
|
# the arguments are missing
|
34
|
-
def
|
34
|
+
def make(mhead, mbody)
|
35
35
|
match = 0
|
36
36
|
match += 1 if mhead['subject'] == '[BOUNCE]'
|
37
37
|
match += 1 if mhead['message-id'].to_s.include?('.JavaMail.')
|
38
38
|
match += 1 if mhead['received'].any? { |a| a.include?('JAMES SMTP Server') }
|
39
39
|
return nil unless match > 0
|
40
40
|
|
41
|
-
dscontents = [Sisimai::
|
41
|
+
dscontents = [Sisimai::Lhost.DELIVERYSTATUS]
|
42
42
|
hasdivided = mbody.split("\n")
|
43
43
|
rfc822list = [] # (Array) Each line in message/rfc822 part string
|
44
44
|
blanklines = 0 # (Integer) The number of blank lines
|
@@ -94,7 +94,7 @@ module Sisimai::Bite::Email
|
|
94
94
|
# RCPT TO: kijitora@example.org
|
95
95
|
if v['recipient']
|
96
96
|
# There are multiple recipient addresses in the message body.
|
97
|
-
dscontents << Sisimai::
|
97
|
+
dscontents << Sisimai::Lhost.DELIVERYSTATUS
|
98
98
|
v = dscontents[-1]
|
99
99
|
end
|
100
100
|
v['recipient'] = cv[1]
|
@@ -1,17 +1,17 @@
|
|
1
|
-
module Sisimai::
|
2
|
-
# Sisimai::
|
1
|
+
module Sisimai::Lhost
|
2
|
+
# Sisimai::Lhost::Bigfoot parses a bounce email which created by Bigfoot.
|
3
3
|
# Methods in the module are called from only Sisimai::Message.
|
4
4
|
module Bigfoot
|
5
5
|
class << self
|
6
|
-
# Imported from p5-Sisimail/lib/Sisimai/
|
7
|
-
require 'sisimai/
|
6
|
+
# Imported from p5-Sisimail/lib/Sisimai/Lhost/Bigfoot.pm
|
7
|
+
require 'sisimai/lhost'
|
8
8
|
|
9
|
-
Indicators = Sisimai::
|
9
|
+
Indicators = Sisimai::Lhost.INDICATORS
|
10
10
|
StartingOf = { rfc822: ['Content-Type: message/partial'] }.freeze
|
11
11
|
MarkingsOf = { message: %r/\A[ \t]+[-]+[ \t]*Transcript of session follows/ }.freeze
|
12
12
|
|
13
13
|
def description; return 'Bigfoot: http://www.bigfoot.com'; end
|
14
|
-
def smtpagent; return Sisimai::
|
14
|
+
def smtpagent; return Sisimai::Lhost.smtpagent(self); end
|
15
15
|
def headerlist; return []; end
|
16
16
|
|
17
17
|
# Parse bounce messages from Bigfoot
|
@@ -25,7 +25,7 @@ module Sisimai::Bite::Email
|
|
25
25
|
# @return [Hash, Nil] Bounce data list and message/rfc822
|
26
26
|
# part or nil if it failed to parse or
|
27
27
|
# the arguments are missing
|
28
|
-
def
|
28
|
+
def make(mhead, mbody)
|
29
29
|
# :subject => %r/\AReturned mail: /,
|
30
30
|
match = 0
|
31
31
|
match += 1 if mhead['from'].include?('@bigfoot.com>')
|
@@ -36,7 +36,7 @@ module Sisimai::Bite::Email
|
|
36
36
|
fieldtable = Sisimai::RFC1894.FIELDTABLE
|
37
37
|
permessage = {} # (Hash) Store values of each Per-Message field
|
38
38
|
|
39
|
-
dscontents = [Sisimai::
|
39
|
+
dscontents = [Sisimai::Lhost.DELIVERYSTATUS]
|
40
40
|
hasdivided = mbody.split("\n")
|
41
41
|
havepassed = ['']
|
42
42
|
rfc822list = [] # (Array) Each line in message/rfc822 part string
|
@@ -93,7 +93,7 @@ module Sisimai::Bite::Email
|
|
93
93
|
# Final-Recipient: rfc822; kijitora@example.jp
|
94
94
|
if v['recipient']
|
95
95
|
# There are multiple recipient addresses in the message body.
|
96
|
-
dscontents << Sisimai::
|
96
|
+
dscontents << Sisimai::Lhost.DELIVERYSTATUS
|
97
97
|
v = dscontents[-1]
|
98
98
|
end
|
99
99
|
v['recipient'] = o[2]
|
@@ -1,12 +1,12 @@
|
|
1
|
-
module Sisimai::
|
2
|
-
# Sisimai::
|
1
|
+
module Sisimai::Lhost
|
2
|
+
# Sisimai::Lhost::Biglobe parses a bounce email which created by BIGLOBE.
|
3
3
|
# Methods in the module are called from only Sisimai::Message.
|
4
4
|
module Biglobe
|
5
5
|
class << self
|
6
|
-
# Imported from p5-Sisimail/lib/Sisimai/
|
7
|
-
require 'sisimai/
|
6
|
+
# Imported from p5-Sisimail/lib/Sisimai/Lhost/Biglobe.pm
|
7
|
+
require 'sisimai/lhost'
|
8
8
|
|
9
|
-
Indicators = Sisimai::
|
9
|
+
Indicators = Sisimai::Lhost.INDICATORS
|
10
10
|
StartingOf = {
|
11
11
|
message: [' ----- The following addresses had delivery problems -----'],
|
12
12
|
error: [' ----- Non-delivered information -----'],
|
@@ -17,8 +17,8 @@ module Sisimai::Bite::Email
|
|
17
17
|
'mailboxfull' => ["The number of messages in recipient's mailbox exceeded the local limit."],
|
18
18
|
}.freeze
|
19
19
|
|
20
|
-
def description; return 'BIGLOBE:
|
21
|
-
def smtpagent; return Sisimai::
|
20
|
+
def description; return 'BIGLOBE: https://www.biglobe.ne.jp'; end
|
21
|
+
def smtpagent; return Sisimai::Lhost.smtpagent(self); end
|
22
22
|
def headerlist; return []; end
|
23
23
|
|
24
24
|
# Parse bounce messages from Biglobe
|
@@ -32,11 +32,11 @@ module Sisimai::Bite::Email
|
|
32
32
|
# @return [Hash, Nil] Bounce data list and message/rfc822
|
33
33
|
# part or nil if it failed to parse or
|
34
34
|
# the arguments are missing
|
35
|
-
def
|
35
|
+
def make(mhead, mbody)
|
36
36
|
return nil unless mhead['from'] =~ /postmaster[@](?:biglobe|inacatv|tmtv|ttv)[.]ne[.]jp/
|
37
37
|
return nil unless mhead['subject'].start_with?('Returned mail:')
|
38
38
|
|
39
|
-
dscontents = [Sisimai::
|
39
|
+
dscontents = [Sisimai::Lhost.DELIVERYSTATUS]
|
40
40
|
hasdivided = mbody.split("\n")
|
41
41
|
rfc822list = [] # (Array) Each line in message/rfc822 part string
|
42
42
|
blanklines = 0 # (Integer) The number of blank lines
|
@@ -95,7 +95,7 @@ module Sisimai::Bite::Email
|
|
95
95
|
# ********@***.biglobe.ne.jp
|
96
96
|
if v['recipient']
|
97
97
|
# There are multiple recipient addresses in the message body.
|
98
|
-
dscontents << Sisimai::
|
98
|
+
dscontents << Sisimai::Lhost.DELIVERYSTATUS
|
99
99
|
v = dscontents[-1]
|
100
100
|
end
|
101
101
|
|
@@ -1,13 +1,13 @@
|
|
1
|
-
module Sisimai::
|
2
|
-
# Sisimai::
|
1
|
+
module Sisimai::Lhost
|
2
|
+
# Sisimai::Lhost::Courier parses a bounce email which created by Courier
|
3
3
|
# MTA. Methods in the module are called from only Sisimai::Message.
|
4
4
|
module Courier
|
5
5
|
class << self
|
6
|
-
# Imported from p5-Sisimail/lib/Sisimai/
|
7
|
-
require 'sisimai/
|
6
|
+
# Imported from p5-Sisimail/lib/Sisimai/Lhost/Courier.pm
|
7
|
+
require 'sisimai/lhost'
|
8
8
|
|
9
|
-
#
|
10
|
-
Indicators = Sisimai::
|
9
|
+
# https://www.courier-mta.org/courierdsn.html
|
10
|
+
Indicators = Sisimai::Lhost.INDICATORS
|
11
11
|
StartingOf = {
|
12
12
|
# courier/module.dsn/dsn*.txt
|
13
13
|
message: ['DELAYS IN DELIVERING YOUR MESSAGE', 'UNDELIVERABLE MAIL'],
|
@@ -25,7 +25,7 @@ module Sisimai::Bite::Email
|
|
25
25
|
}.freeze
|
26
26
|
|
27
27
|
def description; return 'Courier MTA'; end
|
28
|
-
def smtpagent; return Sisimai::
|
28
|
+
def smtpagent; return Sisimai::Lhost.smtpagent(self); end
|
29
29
|
def headerlist; return []; end
|
30
30
|
|
31
31
|
# Parse bounce messages from Courier MTA
|
@@ -39,7 +39,7 @@ module Sisimai::Bite::Email
|
|
39
39
|
# @return [Hash, Nil] Bounce data list and message/rfc822
|
40
40
|
# part or nil if it failed to parse or
|
41
41
|
# the arguments are missing
|
42
|
-
def
|
42
|
+
def make(mhead, mbody)
|
43
43
|
match = 0
|
44
44
|
match += 1 if mhead['from'].include?('Courier mail server at ')
|
45
45
|
match += 1 if mhead['subject'] =~ /(?:NOTICE: mail delivery status[.]|WARNING: delayed mail[.])/
|
@@ -53,7 +53,7 @@ module Sisimai::Bite::Email
|
|
53
53
|
fieldtable = Sisimai::RFC1894.FIELDTABLE
|
54
54
|
permessage = {} # (Hash) Store values of each Per-Message field
|
55
55
|
|
56
|
-
dscontents = [Sisimai::
|
56
|
+
dscontents = [Sisimai::Lhost.DELIVERYSTATUS]
|
57
57
|
hasdivided = mbody.split("\n")
|
58
58
|
havepassed = ['']
|
59
59
|
rfc822list = [] # (Array) Each line in message/rfc822 part string
|
@@ -109,7 +109,7 @@ module Sisimai::Bite::Email
|
|
109
109
|
# Final-Recipient: rfc822; kijitora@example.jp
|
110
110
|
if v['recipient']
|
111
111
|
# There are multiple recipient addresses in the message body.
|
112
|
-
dscontents << Sisimai::
|
112
|
+
dscontents << Sisimai::Lhost.DELIVERYSTATUS
|
113
113
|
v = dscontents[-1]
|
114
114
|
end
|
115
115
|
v['recipient'] = o[2]
|
@@ -1,12 +1,12 @@
|
|
1
|
-
module Sisimai::
|
2
|
-
# Sisimai::
|
1
|
+
module Sisimai::Lhost
|
2
|
+
# Sisimai::Lhost::Domino parses a bounce email which created by IBM
|
3
3
|
# Domino Server. Methods in the module are called from only Sisimai::Message.
|
4
4
|
module Domino
|
5
5
|
class << self
|
6
|
-
# Imported from p5-Sisimail/lib/Sisimai/
|
7
|
-
require 'sisimai/
|
6
|
+
# Imported from p5-Sisimail/lib/Sisimai/Lhost/Domino.pm
|
7
|
+
require 'sisimai/lhost'
|
8
8
|
|
9
|
-
Indicators = Sisimai::
|
9
|
+
Indicators = Sisimai::Lhost.INDICATORS
|
10
10
|
StartingOf = {
|
11
11
|
message: ['Your message'],
|
12
12
|
rfc822: ['Content-Type: message/delivery-status'],
|
@@ -22,7 +22,7 @@ module Sisimai::Bite::Email
|
|
22
22
|
}.freeze
|
23
23
|
|
24
24
|
def description; return 'IBM Domino Server'; end
|
25
|
-
def smtpagent; return Sisimai::
|
25
|
+
def smtpagent; return Sisimai::Lhost.smtpagent(self); end
|
26
26
|
def headerlist; return []; end
|
27
27
|
|
28
28
|
# Parse bounce messages from IBM Domino Server
|
@@ -36,10 +36,10 @@ module Sisimai::Bite::Email
|
|
36
36
|
# @return [Hash, Nil] Bounce data list and message/rfc822
|
37
37
|
# part or nil if it failed to parse or
|
38
38
|
# the arguments are missing
|
39
|
-
def
|
39
|
+
def make(mhead, mbody)
|
40
40
|
return nil unless mhead['subject'].start_with?('DELIVERY FAILURE:')
|
41
41
|
|
42
|
-
dscontents = [Sisimai::
|
42
|
+
dscontents = [Sisimai::Lhost.DELIVERYSTATUS]
|
43
43
|
hasdivided = mbody.split("\n")
|
44
44
|
rfc822list = [] # (Array) Each line in message/rfc822 part string
|
45
45
|
blanklines = 0 # (Integer) The number of blank lines
|
@@ -97,7 +97,7 @@ module Sisimai::Bite::Email
|
|
97
97
|
# was not delivered to:
|
98
98
|
if v['recipient']
|
99
99
|
# There are multiple recipient addresses in the message body.
|
100
|
-
dscontents << Sisimai::
|
100
|
+
dscontents << Sisimai::Lhost.DELIVERYSTATUS
|
101
101
|
v = dscontents[-1]
|
102
102
|
end
|
103
103
|
v['recipient'] ||= e
|
@@ -1,12 +1,12 @@
|
|
1
|
-
module Sisimai::
|
2
|
-
# Sisimai::
|
1
|
+
module Sisimai::Lhost
|
2
|
+
# Sisimai::Lhost::EinsUndEins parses a bounce email which created by
|
3
3
|
# 1&1. Methods in the module are called from only Sisimai::Message.
|
4
4
|
module EinsUndEins
|
5
5
|
class << self
|
6
|
-
# Imported from p5-Sisimail/lib/Sisimai/
|
7
|
-
require 'sisimai/
|
6
|
+
# Imported from p5-Sisimail/lib/Sisimai/Lhost/EinsUndEins.pm
|
7
|
+
require 'sisimai/lhost'
|
8
8
|
|
9
|
-
Indicators = Sisimai::
|
9
|
+
Indicators = Sisimai::Lhost.INDICATORS
|
10
10
|
StartingOf = {
|
11
11
|
message: ['This message was created automatically by mail delivery software'],
|
12
12
|
error: ['For the following reason:'],
|
@@ -14,8 +14,8 @@ module Sisimai::Bite::Email
|
|
14
14
|
}.freeze
|
15
15
|
MessagesOf = { 'mesgtoobig' => ['Mail size limit exceeded'] }.freeze
|
16
16
|
|
17
|
-
def description; return '1&1:
|
18
|
-
def smtpagent; return Sisimai::
|
17
|
+
def description; return '1&1: https://www.1und1.de'; end
|
18
|
+
def smtpagent; return Sisimai::Lhost.smtpagent(self); end
|
19
19
|
def headerlist; return []; end
|
20
20
|
|
21
21
|
# Parse bounce messages from 1&1
|
@@ -29,11 +29,11 @@ module Sisimai::Bite::Email
|
|
29
29
|
# @return [Hash, Nil] Bounce data list and message/rfc822
|
30
30
|
# part or nil if it failed to parse or
|
31
31
|
# the arguments are missing
|
32
|
-
def
|
32
|
+
def make(mhead, mbody)
|
33
33
|
return nil unless mhead['from'].start_with?('"Mail Delivery System"')
|
34
34
|
return nil unless mhead['subject'] == 'Mail delivery failed: returning message to sender'
|
35
35
|
|
36
|
-
dscontents = [Sisimai::
|
36
|
+
dscontents = [Sisimai::Lhost.DELIVERYSTATUS]
|
37
37
|
hasdivided = mbody.split("\n")
|
38
38
|
rfc822list = [] # (Array) Each line in message/rfc822 part string
|
39
39
|
blanklines = 0 # (Integer) The number of blank lines
|
@@ -85,7 +85,7 @@ module Sisimai::Bite::Email
|
|
85
85
|
# general@example.eu
|
86
86
|
if v['recipient']
|
87
87
|
# There are multiple recipient addresses in the message body.
|
88
|
-
dscontents << Sisimai::
|
88
|
+
dscontents << Sisimai::Lhost.DELIVERYSTATUS
|
89
89
|
v = dscontents[-1]
|
90
90
|
end
|
91
91
|
v['recipient'] = cv[1]
|
@@ -1,13 +1,13 @@
|
|
1
|
-
module Sisimai::
|
2
|
-
# Sisimai::
|
1
|
+
module Sisimai::Lhost
|
2
|
+
# Sisimai::Lhost::Exchange2003 parses a bounce email which created by
|
3
3
|
# Microsoft Exchange Server 2003.
|
4
4
|
# Methods in the module are called from only Sisimai::Message.
|
5
5
|
module Exchange2003
|
6
6
|
class << self
|
7
|
-
# Imported from p5-Sisimail/lib/Sisimai/
|
8
|
-
require 'sisimai/
|
7
|
+
# Imported from p5-Sisimail/lib/Sisimai/Lhost/Exchange2003.pm
|
8
|
+
require 'sisimai/lhost'
|
9
9
|
|
10
|
-
Indicators = Sisimai::
|
10
|
+
Indicators = Sisimai::Lhost.INDICATORS
|
11
11
|
StartingOf = {
|
12
12
|
message: ['Your message'],
|
13
13
|
error: ['did not reach the following recipient(s):'],
|
@@ -42,7 +42,7 @@ module Sisimai::Bite::Email
|
|
42
42
|
}.freeze
|
43
43
|
|
44
44
|
def description; return 'Microsoft Exchange Server 2003'; end
|
45
|
-
def smtpagent; return Sisimai::
|
45
|
+
def smtpagent; return Sisimai::Lhost.smtpagent(self); end
|
46
46
|
def headerlist; return %w[x-ms-embedded-report x-mimeole]; end
|
47
47
|
|
48
48
|
# Parse bounce messages from Microsoft Exchange Server 2003
|
@@ -56,7 +56,7 @@ module Sisimai::Bite::Email
|
|
56
56
|
# @return [Hash, Nil] Bounce data list and message/rfc822
|
57
57
|
# part or nil if it failed to parse or
|
58
58
|
# the arguments are missing
|
59
|
-
def
|
59
|
+
def make(mhead, mbody)
|
60
60
|
match = 0
|
61
61
|
tryto = []
|
62
62
|
|
@@ -91,7 +91,7 @@ module Sisimai::Bite::Email
|
|
91
91
|
end
|
92
92
|
return nil unless match > 0
|
93
93
|
|
94
|
-
dscontents = [Sisimai::
|
94
|
+
dscontents = [Sisimai::Lhost.DELIVERYSTATUS]
|
95
95
|
hasdivided = mbody.split("\n")
|
96
96
|
rfc822list = [] # (Array) Each line in message/rfc822 part string
|
97
97
|
blanklines = 0 # (Integer) The number of blank lines
|
@@ -157,7 +157,7 @@ module Sisimai::Bite::Email
|
|
157
157
|
# kijitora@example.com on 4/29/99 9:19:59 AM
|
158
158
|
if v['recipient']
|
159
159
|
# There are multiple recipient addresses in the message body.
|
160
|
-
dscontents << Sisimai::
|
160
|
+
dscontents << Sisimai::Lhost.DELIVERYSTATUS
|
161
161
|
v = dscontents[-1]
|
162
162
|
end
|
163
163
|
v['recipient'] = cv[1]
|