sisimai 5.5.0-java → 5.6.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog.md +21 -0
- data/LICENSE +1 -1
- data/README-JA.md +15 -12
- data/README.md +16 -13
- data/lib/sisimai/fact.rb +17 -2
- data/lib/sisimai/lhost/amazonses.rb +1 -1
- data/lib/sisimai/lhost/einsundeins.rb +1 -1
- data/lib/sisimai/lhost/exchange2007.rb +2 -2
- data/lib/sisimai/lhost/exim.rb +6 -8
- data/lib/sisimai/lhost/qmail.rb +5 -5
- data/lib/sisimai/message.rb +2 -0
- data/lib/sisimai/reason/authfailure.rb +9 -13
- data/lib/sisimai/reason/badreputation.rb +7 -7
- data/lib/sisimai/reason/blocked.rb +57 -83
- data/lib/sisimai/reason/contenterror.rb +14 -8
- data/lib/sisimai/reason/{mesgtoobig.rb → emailtoolarge.rb} +22 -25
- data/lib/sisimai/reason/expired.rb +16 -23
- data/lib/sisimai/reason/filtered.rb +13 -17
- data/lib/sisimai/reason/hasmoved.rb +2 -1
- data/lib/sisimai/reason/hostunknown.rb +16 -19
- data/lib/sisimai/reason/mailboxfull.rb +27 -49
- data/lib/sisimai/reason/networkerror.rb +16 -16
- data/lib/sisimai/reason/norelaying.rb +19 -19
- data/lib/sisimai/reason/notaccept.rb +6 -8
- data/lib/sisimai/reason/notcompliantrfc.rb +5 -9
- data/lib/sisimai/reason/policyviolation.rb +11 -25
- data/lib/sisimai/reason/ratelimited.rb +62 -0
- data/lib/sisimai/reason/rejected.rb +45 -59
- data/lib/sisimai/reason/requireptr.rb +13 -25
- data/lib/sisimai/reason/securityerror.rb +13 -19
- data/lib/sisimai/reason/spamdetected.rb +51 -101
- data/lib/sisimai/reason/suspend.rb +26 -24
- data/lib/sisimai/reason/systemerror.rb +19 -23
- data/lib/sisimai/reason/systemfull.rb +1 -1
- data/lib/sisimai/reason/userunknown.rb +79 -112
- data/lib/sisimai/reason/virusdetected.rb +6 -8
- data/lib/sisimai/reason.rb +14 -14
- data/lib/sisimai/rhost/apple.rb +5 -5
- data/lib/sisimai/rhost/cloudflare.rb +2 -0
- data/lib/sisimai/rhost/cox.rb +22 -20
- data/lib/sisimai/rhost/facebook.rb +16 -16
- data/lib/sisimai/rhost/franceptt.rb +8 -3
- data/lib/sisimai/rhost/godaddy.rb +33 -15
- data/lib/sisimai/rhost/google.rb +63 -64
- data/lib/sisimai/rhost/iua.rb +1 -1
- data/lib/sisimai/rhost/messagelabs.rb +12 -12
- data/lib/sisimai/rhost/microsoft.rb +82 -86
- data/lib/sisimai/rhost/mimecast.rb +34 -34
- data/lib/sisimai/rhost/nttdocomo.rb +2 -2
- data/lib/sisimai/rhost/spectrum.rb +7 -7
- data/lib/sisimai/rhost/tencent.rb +9 -11
- data/lib/sisimai/rhost/yahooinc.rb +7 -8
- data/lib/sisimai/smtp/command.rb +2 -0
- data/lib/sisimai/smtp/status.rb +50 -90
- data/lib/sisimai/string.rb +0 -15
- data/lib/sisimai/version.rb +1 -1
- metadata +4 -6
- data/lib/sisimai/reason/exceedlimit.rb +0 -47
- data/lib/sisimai/reason/speeding.rb +0 -47
- data/lib/sisimai/reason/toomanyconn.rb +0 -59
|
@@ -31,6 +31,13 @@ module Sisimai
|
|
|
31
31
|
# See https://postmaster.yahooinc.com/error-codes
|
|
32
32
|
'not accepted for policy reasons',
|
|
33
33
|
],
|
|
34
|
+
'ratelimited' => [
|
|
35
|
+
# - 421 Max message per connection reached, closing transmission channel
|
|
36
|
+
'max message per connection reached',
|
|
37
|
+
|
|
38
|
+
# - 450 User is receiving mail too quickly
|
|
39
|
+
'user is receiving mail too quickly',
|
|
40
|
+
],
|
|
34
41
|
'rejected' => [
|
|
35
42
|
# Observed the following error message since around March 2024:
|
|
36
43
|
#
|
|
@@ -53,10 +60,6 @@ module Sisimai
|
|
|
53
60
|
# Retrying will NOT succeed. See https://postmaster.yahooinc.com/error-codes
|
|
54
61
|
' will be permanently deferred',
|
|
55
62
|
],
|
|
56
|
-
'speeding' => [
|
|
57
|
-
# - 450 User is receiving mail too quickly
|
|
58
|
-
'user is receiving mail too quickly',
|
|
59
|
-
],
|
|
60
63
|
'suspend' => [
|
|
61
64
|
# - 554 delivery error: dd ****@yahoo.com is no longer valid.
|
|
62
65
|
# - 554 30 Sorry, your message to *****@aol.jp cannot be delivered.
|
|
@@ -68,10 +71,6 @@ module Sisimai
|
|
|
68
71
|
# - 501 Syntax error in parameters or arguments
|
|
69
72
|
'syntax error in parameters or arguments',
|
|
70
73
|
],
|
|
71
|
-
'toomanyconn' => [
|
|
72
|
-
# - 421 Max message per connection reached, closing transmission channel
|
|
73
|
-
'max message per connection reached',
|
|
74
|
-
],
|
|
75
74
|
'userunknown' => [
|
|
76
75
|
# - 554 delivery error: dd This user doesn't have a yahoo.com account (***@yahoo.com)
|
|
77
76
|
# - 552 1 Requested mail action aborted, mailbox not found (in reply to end of DATA command)
|
data/lib/sisimai/smtp/command.rb
CHANGED
|
@@ -2,6 +2,8 @@ module Sisimai
|
|
|
2
2
|
module SMTP
|
|
3
3
|
# Sisimai::SMTP::Transcript is an SMTP Command related utilities
|
|
4
4
|
module Command
|
|
5
|
+
ExceptDATA = ["CONN", "EHLO", "HELO", "MAIL", "RCPT"].freeze
|
|
6
|
+
BeforeRCPT = ["CONN", "EHLO", "EHLO", "MAIL", "AUTH", "STARTTLS"].freeze
|
|
5
7
|
class << self
|
|
6
8
|
Availables = [
|
|
7
9
|
"HELO", "EHLO", "MAIL", "RCPT", "DATA", "QUIT", "RSET", "NOOP", "VRFY", "ETRN", "EXPN",
|
data/lib/sisimai/smtp/status.rb
CHANGED
|
@@ -494,10 +494,10 @@ module Sisimai
|
|
|
494
494
|
'4.1.7' => 'rejected', # Bad sender's mailbox address syntax
|
|
495
495
|
'4.1.8' => 'rejected', # Bad sender's system address
|
|
496
496
|
'4.1.9' => 'systemerror', # Message relayed to non-compliant mailer
|
|
497
|
-
'4.2.1' => '
|
|
497
|
+
'4.2.1' => 'suspend', # Mailbox disabled, not accepting messages
|
|
498
498
|
'4.2.2' => 'mailboxfull', # Mailbox full
|
|
499
|
-
'4.2.3' => '
|
|
500
|
-
'4.2.4' => '
|
|
499
|
+
'4.2.3' => 'emailtoolarge', # Message length exceeds administrative limit
|
|
500
|
+
'4.2.4' => 'systemerror', # Mailing list expansion problem
|
|
501
501
|
# '4.3.0' => 'systemerror', # Other or undefined mail system status
|
|
502
502
|
'4.3.1' => 'systemfull', # Mail system full
|
|
503
503
|
'4.3.2' => 'notaccept', # System not accepting network messages
|
|
@@ -513,20 +513,20 @@ module Sisimai
|
|
|
513
513
|
'4.4.7' => 'expired', # Delivery time expired
|
|
514
514
|
'4.4.8' => 'networkerror', # Retry on IPv4
|
|
515
515
|
# '4.5.0' => 'networkerror', # Other or undefined protocol status
|
|
516
|
-
'4.5.3' => '
|
|
516
|
+
'4.5.3' => 'ratelimited', # Too many recipients
|
|
517
517
|
'4.5.5' => 'systemerror', # Wrong protocol version
|
|
518
518
|
'4.6.0' => 'contenterror', # Other or undefined media error
|
|
519
519
|
'4.6.2' => 'contenterror', # Conversion required and prohibited
|
|
520
520
|
'4.6.5' => 'contenterror', # Conversion Failed
|
|
521
521
|
# :'4.7.0' => 'securityerror', # Other or undefined security status
|
|
522
522
|
'4.7.1' => 'blocked', # Delivery not authorized, message refused
|
|
523
|
-
'4.7.2' => '
|
|
523
|
+
'4.7.2' => 'rejected', # Mailing list expansion prohibited
|
|
524
524
|
'4.7.5' => 'securityerror', # Cryptographic failure
|
|
525
525
|
'4.7.6' => 'securityerror', # Cryptographic algorithm not supported
|
|
526
526
|
'4.7.7' => 'securityerror', # Message integrity failure
|
|
527
527
|
'4.7.12' => 'securityerror', # A password transition is needed
|
|
528
528
|
'4.7.15' => 'securityerror', # Priority Level is too low
|
|
529
|
-
'4.7.16' => '
|
|
529
|
+
'4.7.16' => 'emailtoolarge', # Message is too big for the specified priority
|
|
530
530
|
'4.7.24' => 'authfailure ', # SPF validation error
|
|
531
531
|
'4.7.25' => 'requireptr', # Reverse DNS validation failed
|
|
532
532
|
# ---------------------------------------------------------------------------------------
|
|
@@ -543,19 +543,19 @@ module Sisimai
|
|
|
543
543
|
'5.2.0' => 'filtered', # Other or undefined mailbox status
|
|
544
544
|
'5.2.1' => 'filtered', # Mailbox disabled, not accepting messages
|
|
545
545
|
'5.2.2' => 'mailboxfull', # Mailbox full
|
|
546
|
-
'5.2.3' => '
|
|
547
|
-
'5.2.4' => '
|
|
546
|
+
'5.2.3' => 'emailtoolarge', # Message length exceeds administrative limit
|
|
547
|
+
'5.2.4' => 'systemerror', # Mailing list expansion problem
|
|
548
548
|
'5.3.0' => 'systemerror', # Other or undefined mail system status
|
|
549
549
|
'5.3.1' => 'systemfull', # Mail system full
|
|
550
550
|
'5.3.2' => 'notaccept', # System not accepting network messages
|
|
551
551
|
'5.3.3' => 'systemerror', # System not capable of selected features
|
|
552
|
-
'5.3.4' => '
|
|
552
|
+
'5.3.4' => 'emailtoolarge', # Message too big for system
|
|
553
553
|
'5.3.5' => 'systemerror', # System incorrectly configured
|
|
554
554
|
'5.4.0' => 'networkerror', # Other or undefined network or routing status
|
|
555
555
|
'5.4.3' => 'systemerror', # Directory server failure
|
|
556
556
|
'5.4.4' => 'hostunknown', # Unable to route
|
|
557
557
|
'5.5.2' => 'systemerror', # If the server cannot BASE64 decode any client response (AUTH)
|
|
558
|
-
'5.5.3' => '
|
|
558
|
+
'5.5.3' => 'ratelimited', # Too many recipients
|
|
559
559
|
'5.5.4' => 'systemerror', # Invalid command arguments
|
|
560
560
|
'5.5.5' => 'systemerror', # Wrong protocol version
|
|
561
561
|
'5.5.6' => 'syntaxerror', # Authentication Exchange line is too long
|
|
@@ -565,7 +565,7 @@ module Sisimai
|
|
|
565
565
|
'5.6.3' => 'contenterror', # Conversion required but not supported
|
|
566
566
|
'5.6.5' => 'contenterror', # Conversion Failed
|
|
567
567
|
'5.6.6' => 'contenterror', # Message content not available
|
|
568
|
-
'5.6.7' => '
|
|
568
|
+
'5.6.7' => 'rejected', # Non-ASCII addresses not permitted for that sender/recipient
|
|
569
569
|
'5.6.8' => 'contenterror', # UTF-8 string reply is required, but not permitted by the SMTP client
|
|
570
570
|
'5.6.9' => 'contenterror', # UTF-8 header message cannot be transferred to one or more recipients
|
|
571
571
|
'5.7.0' => 'securityerror', # Other or undefined security status
|
|
@@ -583,10 +583,10 @@ module Sisimai
|
|
|
583
583
|
'5.7.13' => 'suspend', # User Account Disabled
|
|
584
584
|
'5.7.14' => 'securityerror', # Trust relationship required
|
|
585
585
|
'5.7.15' => 'securityerror', # Priority Level is too low
|
|
586
|
-
'5.7.16' => '
|
|
586
|
+
'5.7.16' => 'emailtoolarge', # Message is too big for the specified priority
|
|
587
587
|
'5.7.17' => 'hasmoved', # Mailbox owner has changed
|
|
588
588
|
'5.7.18' => 'hasmoved', # Domain owner has changed
|
|
589
|
-
'5.7.19' => '
|
|
589
|
+
'5.7.19' => 'systemerror', # RRVS test cannot be completed
|
|
590
590
|
'5.7.20' => 'authfailure', # No passing DKIM signature found
|
|
591
591
|
'5.7.21' => 'authfailure', # No acceptable DKIM signature found
|
|
592
592
|
'5.7.22' => 'authfailure', # No valid author-matched DKIM signature found
|
|
@@ -601,76 +601,37 @@ module Sisimai
|
|
|
601
601
|
}.freeze
|
|
602
602
|
|
|
603
603
|
InternalCode = {
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
# 'userunknown' => '4.0.911',
|
|
636
|
-
'undefined' => '4.0.900',
|
|
637
|
-
'virusdetected' => '4.0.981',
|
|
638
|
-
},
|
|
639
|
-
:permanent => {
|
|
640
|
-
'authfailure' => '5.0.926',
|
|
641
|
-
'badreputation' => '5.0.975',
|
|
642
|
-
'blocked' => '5.0.971',
|
|
643
|
-
'contenterror' => '5.0.960',
|
|
644
|
-
'exceedlimit' => '5.0.923',
|
|
645
|
-
'expired' => '5.0.947',
|
|
646
|
-
'failedstarttls' => '5.0.976',
|
|
647
|
-
'filtered' => '5.0.910',
|
|
648
|
-
'hasmoved' => '5.0.916',
|
|
649
|
-
'hostunknown' => '5.0.912',
|
|
650
|
-
'mailboxfull' => '5.0.922',
|
|
651
|
-
'mailererror' => '5.0.939',
|
|
652
|
-
'mesgtoobig' => '5.0.934',
|
|
653
|
-
'networkerror' => '5.0.944',
|
|
654
|
-
'norelaying' => '5.0.909',
|
|
655
|
-
'notaccept' => '5.0.932',
|
|
656
|
-
'notcompliantrfc' => '5.0.974',
|
|
657
|
-
'onhold' => '5.0.901',
|
|
658
|
-
'policyviolation' => '5.0.972',
|
|
659
|
-
'rejected' => '5.0.918',
|
|
660
|
-
'requireptr' => '5.0.973',
|
|
661
|
-
'securityerror' => '5.0.970',
|
|
662
|
-
'spamdetected' => '5.0.980',
|
|
663
|
-
'speeding' => '5.0.946',
|
|
664
|
-
'suppressed' => '5.0.903',
|
|
665
|
-
'suspend' => '5.0.921',
|
|
666
|
-
'systemerror' => '5.0.930',
|
|
667
|
-
'systemfull' => '5.0.931',
|
|
668
|
-
'syntaxerror' => '5.0.902',
|
|
669
|
-
'toomanyconn' => '5.0.945',
|
|
670
|
-
'userunknown' => '5.0.911',
|
|
671
|
-
'undefined' => '5.0.900',
|
|
672
|
-
'virusdetected' => '5.0.981',
|
|
673
|
-
},
|
|
604
|
+
'authfailure' => ['5.9.130', '4.9.130'],
|
|
605
|
+
'badreputation' => ['5.9.132', '4.9.132'],
|
|
606
|
+
'blocked' => ['5.9.134', '4.9.134'],
|
|
607
|
+
'contenterror' => ['5.9.160', '4.9.160'],
|
|
608
|
+
'emailtoolarge' => ['5.9.161', '4.9.161'],
|
|
609
|
+
'expired' => ['5.9.340', '4.9.340'],
|
|
610
|
+
'failedstarttls' => ['5.9.350', '4.9.350'],
|
|
611
|
+
'filtered' => ['5.9.210', '4.9.210'],
|
|
612
|
+
'hasmoved' => ['5.9.211', ''],
|
|
613
|
+
'hostunknown' => ['5.9.212', ''],
|
|
614
|
+
'mailboxfull' => ['5.9.220', '4.9.220'],
|
|
615
|
+
'mailererror' => ['5.9.230', '4.9.230'],
|
|
616
|
+
'networkerror' => ['5.9.341', '4.9.341'],
|
|
617
|
+
'norelaying' => ['5.9.214', '4.9.214'],
|
|
618
|
+
'notaccept' => ['5.9.215', '4.9.215'],
|
|
619
|
+
'notcompliantrfc' => ['5.9.162', '4.9.162'],
|
|
620
|
+
'onhold' => ['5.9.301', '4.9.301'],
|
|
621
|
+
'policyviolation' => ['5.9.371', '4.9.371'],
|
|
622
|
+
'ratelimited' => ['5.9.131', '4.9.131'],
|
|
623
|
+
'rejected' => ['5.9.110', '4.9.110'],
|
|
624
|
+
'requireptr' => ['5.9.133', '4.9.133'],
|
|
625
|
+
'securityerror' => ['5.9.370', '4.9.370'],
|
|
626
|
+
'spamdetected' => ['5.9.164', '4.9.164'],
|
|
627
|
+
'suppressed' => ['5.9.310', '4.9.310'],
|
|
628
|
+
'suspend' => ['5.9.221', '4.9.221'],
|
|
629
|
+
'syntaxerror' => ['5.9.351', '4.9.351'],
|
|
630
|
+
'systemerror' => ['5.9.231', '4.9.231'],
|
|
631
|
+
'systemfull' => ['5.9.232', '4.9.232'],
|
|
632
|
+
'undefined' => ['5.9.300', '4.9.300'],
|
|
633
|
+
'userunknown' => ['5.9.213', ''],
|
|
634
|
+
'virusdetected' => ['5.9.165', '4.9.165'],
|
|
674
635
|
}.freeze
|
|
675
636
|
|
|
676
637
|
# Convert from the reason string to the internal status code
|
|
@@ -679,12 +640,11 @@ module Sisimai
|
|
|
679
640
|
# true: Temporary error
|
|
680
641
|
# @return [String] DSN or an empty string if the 1st argument is missing
|
|
681
642
|
# @see name
|
|
682
|
-
def code(argv1 =
|
|
683
|
-
return "" if argv1.
|
|
643
|
+
def code(argv1 = "", argv2 = false)
|
|
644
|
+
return "" if argv1.empty?
|
|
684
645
|
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
return code0
|
|
646
|
+
pairs = InternalCode[argv1]; return "" if pairs.nil?
|
|
647
|
+
return argv2 ? pairs[1] : pairs[0]
|
|
688
648
|
end
|
|
689
649
|
|
|
690
650
|
# Convert from the status code to the reason string
|
|
@@ -831,7 +791,7 @@ module Sisimai
|
|
|
831
791
|
return argv0 if argv1.nil?; return argv0 if argv1.size < 5
|
|
832
792
|
|
|
833
793
|
statuscode = argv0
|
|
834
|
-
codeinmesg = argv1
|
|
794
|
+
codeinmesg = argv1; return codeinmesg if statuscode.index(".9.") == 1
|
|
835
795
|
esmtpreply = argv2 || '000'
|
|
836
796
|
the1stchar = {
|
|
837
797
|
'field' => statuscode[0, 1].to_i,
|
|
@@ -888,7 +848,7 @@ module Sisimai
|
|
|
888
848
|
# @return bool false: The delivery status code is not explicit
|
|
889
849
|
def is_explicit(argv1 = '')
|
|
890
850
|
return false if argv1.nil? || argv1.empty?
|
|
891
|
-
return false if argv1.size == 7 && argv1.start_with?("5.
|
|
851
|
+
return false if argv1.size == 7 && argv1.start_with?("5.9.", "4.9.")
|
|
892
852
|
return true
|
|
893
853
|
end
|
|
894
854
|
|
data/lib/sisimai/string.rb
CHANGED
|
@@ -7,21 +7,6 @@ module Sisimai
|
|
|
7
7
|
body: %r|<head>.+</head>.*<body[ >].+</body>|im,
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
# Create message token from addresser and recipient
|
|
11
|
-
# @param [String] addr1 Sender address
|
|
12
|
-
# @param [String] addr2 Recipient address
|
|
13
|
-
# @param [Integer] epoch Machine time of the email bounce
|
|
14
|
-
# @return [String] Message token(MD5 hex digest) or blank(failed to create token)
|
|
15
|
-
# @see http://en.wikipedia.org/wiki/ASCII
|
|
16
|
-
def token(addr1, addr2, epoch)
|
|
17
|
-
return "" if addr1.is_a?(::String) == false || addr2.is_a?(::String) == false
|
|
18
|
-
return "" if addr1.empty? || addr2.empty? || epoch.is_a?(Integer) == false
|
|
19
|
-
|
|
20
|
-
# Format: STX(0x02) Sender-Address RS(0x1e) Recipient-Address ETX(0x03)
|
|
21
|
-
require 'digest/sha1'
|
|
22
|
-
return Digest::SHA1.hexdigest(sprintf("\x02%s\x1e%s\x1e%d\x03", addr1.downcase, addr2.downcase, epoch))
|
|
23
|
-
end
|
|
24
|
-
|
|
25
10
|
# The argument is 8-bit text or not
|
|
26
11
|
# @param [String] argvs Any string to be checked
|
|
27
12
|
# @return [Boolean] false: ASCII Characters only, true: Including 8-bit character
|
data/lib/sisimai/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sisimai
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.6.0
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- azumakuniyuki
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 2026-02-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: bundler
|
|
@@ -157,7 +157,7 @@ files:
|
|
|
157
157
|
- lib/sisimai/reason/blocked.rb
|
|
158
158
|
- lib/sisimai/reason/contenterror.rb
|
|
159
159
|
- lib/sisimai/reason/delivered.rb
|
|
160
|
-
- lib/sisimai/reason/
|
|
160
|
+
- lib/sisimai/reason/emailtoolarge.rb
|
|
161
161
|
- lib/sisimai/reason/expired.rb
|
|
162
162
|
- lib/sisimai/reason/failedstarttls.rb
|
|
163
163
|
- lib/sisimai/reason/feedback.rb
|
|
@@ -166,24 +166,22 @@ files:
|
|
|
166
166
|
- lib/sisimai/reason/hostunknown.rb
|
|
167
167
|
- lib/sisimai/reason/mailboxfull.rb
|
|
168
168
|
- lib/sisimai/reason/mailererror.rb
|
|
169
|
-
- lib/sisimai/reason/mesgtoobig.rb
|
|
170
169
|
- lib/sisimai/reason/networkerror.rb
|
|
171
170
|
- lib/sisimai/reason/norelaying.rb
|
|
172
171
|
- lib/sisimai/reason/notaccept.rb
|
|
173
172
|
- lib/sisimai/reason/notcompliantrfc.rb
|
|
174
173
|
- lib/sisimai/reason/onhold.rb
|
|
175
174
|
- lib/sisimai/reason/policyviolation.rb
|
|
175
|
+
- lib/sisimai/reason/ratelimited.rb
|
|
176
176
|
- lib/sisimai/reason/rejected.rb
|
|
177
177
|
- lib/sisimai/reason/requireptr.rb
|
|
178
178
|
- lib/sisimai/reason/securityerror.rb
|
|
179
179
|
- lib/sisimai/reason/spamdetected.rb
|
|
180
|
-
- lib/sisimai/reason/speeding.rb
|
|
181
180
|
- lib/sisimai/reason/suppressed.rb
|
|
182
181
|
- lib/sisimai/reason/suspend.rb
|
|
183
182
|
- lib/sisimai/reason/syntaxerror.rb
|
|
184
183
|
- lib/sisimai/reason/systemerror.rb
|
|
185
184
|
- lib/sisimai/reason/systemfull.rb
|
|
186
|
-
- lib/sisimai/reason/toomanyconn.rb
|
|
187
185
|
- lib/sisimai/reason/undefined.rb
|
|
188
186
|
- lib/sisimai/reason/userunknown.rb
|
|
189
187
|
- lib/sisimai/reason/vacation.rb
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
module Sisimai
|
|
2
|
-
module Reason
|
|
3
|
-
# Sisimai::Reason::ExceedLimit checks the bounce reason is "exceedlimit" or not. This class is
|
|
4
|
-
# called only Sisimai::Reason class.
|
|
5
|
-
#
|
|
6
|
-
# This is the error that a message was rejected due to an email exceeded the limit. The value
|
|
7
|
-
# of D.S.N. is 5.2.3. This reason is almost the same as "MesgTooBig", we think.
|
|
8
|
-
module ExceedLimit
|
|
9
|
-
class << self
|
|
10
|
-
Index = [
|
|
11
|
-
'message header size exceeds limit',
|
|
12
|
-
'message too large',
|
|
13
|
-
].freeze
|
|
14
|
-
|
|
15
|
-
def text; return 'exceedlimit'; end
|
|
16
|
-
def description; return 'Email rejected due to an email exceeded the limit'; end
|
|
17
|
-
|
|
18
|
-
# Try to match that the given text and regular expressions
|
|
19
|
-
# @param [String] argv1 String to be matched with regular expressions
|
|
20
|
-
# @return [Boolean] false: Did not match, true: Matched
|
|
21
|
-
def match(argv1)
|
|
22
|
-
return false if argv1.nil? || argv1.empty?
|
|
23
|
-
return true if Index.any? { |a| argv1.include?(a) }
|
|
24
|
-
return false
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
# Exceed limit or not
|
|
28
|
-
# @param [Sisimai::Fact] argvs Object to be detected the reason
|
|
29
|
-
# @return [Boolean] true: Exceeds the limit
|
|
30
|
-
# false: Did not exceed the limit
|
|
31
|
-
# @see http://www.ietf.org/rfc/rfc2822.txt
|
|
32
|
-
def true(argvs)
|
|
33
|
-
return false if argvs['deliverystatus'].empty?
|
|
34
|
-
return true if argvs['reason'] == 'exceedlimit'
|
|
35
|
-
|
|
36
|
-
# Delivery status code points exceedlimit.
|
|
37
|
-
# Status: 5.2.3
|
|
38
|
-
# Diagnostic-Code: SMTP; 552 5.2.3 Message size exceeds fixed maximum message size
|
|
39
|
-
return true if Sisimai::SMTP::Status.name(argvs['deliverystatus']) == 'exceedlimit'
|
|
40
|
-
return match(argvs['diagnosticcode'].downcase)
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
module Sisimai
|
|
2
|
-
module Reason
|
|
3
|
-
# Sisimai::Reason::Speeding checks the bounce reason is "speeding" or not. This class is called
|
|
4
|
-
# only Sisimai::Reason class. This is the error that a connection rejected due to exceeding a
|
|
5
|
-
# rate limit or sending too fast.
|
|
6
|
-
module Speeding
|
|
7
|
-
class << self
|
|
8
|
-
Index = [
|
|
9
|
-
'mail sent from your IP address has been temporarily rate limited',
|
|
10
|
-
'please try again slower',
|
|
11
|
-
'receiving mail at a rate that prevents additional messages from being delivered',
|
|
12
|
-
].freeze
|
|
13
|
-
|
|
14
|
-
def text; return 'speeding'; end
|
|
15
|
-
def description; return 'Rejected due to exceeding a rate limit or sending too fast'; end
|
|
16
|
-
|
|
17
|
-
# Try to match that the given text and regular expressions
|
|
18
|
-
# @param [String] argv1 String to be matched with regular expressions
|
|
19
|
-
# @return [Boolean] false: Did not match, true: Matched
|
|
20
|
-
def match(argv1)
|
|
21
|
-
return false if argv1.nil? || argv1.empty?
|
|
22
|
-
return true if Index.any? { |a| argv1.include?(a) }
|
|
23
|
-
return false
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# Speeding or not
|
|
27
|
-
# @param [Sisimai::Fact] argvs Object to be detected the reason
|
|
28
|
-
# @return [Boolean] true: is speeding
|
|
29
|
-
# false: is not speeding
|
|
30
|
-
# @see http://www.ietf.org/rfc/rfc2822.txt
|
|
31
|
-
def true(argvs)
|
|
32
|
-
return false if argvs['deliverystatus'].empty?
|
|
33
|
-
return true if argvs['reason'] == 'speeding'
|
|
34
|
-
|
|
35
|
-
# Action: failed
|
|
36
|
-
# Status: 4.7.1
|
|
37
|
-
# Remote-MTA: dns; smtp.example.jp
|
|
38
|
-
# Diagnostic-Code: smtp; 451 4.7.1 <mx.example.org[192.0.2.2]>: Client host rejected:
|
|
39
|
-
# Please try again slower
|
|
40
|
-
return match(argvs['diagnosticcode'].downcase)
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
module Sisimai
|
|
2
|
-
module Reason
|
|
3
|
-
# Sisimai::Reason::TooManyConn checks the bounce reason is "toomanyconn" or not. This class is
|
|
4
|
-
# called only Sisimai::Reason class.
|
|
5
|
-
#
|
|
6
|
-
# This is the error that SMTP connection was rejected temporarily due to too many concurrency
|
|
7
|
-
# connections to the remote server. This reason has added in Sisimai 4.1.26.
|
|
8
|
-
#
|
|
9
|
-
# <kijitora@example.ne.jp>: host mx02.example.ne.jp[192.0.1.20] said:
|
|
10
|
-
# 452 4.3.2 Connection rate limit exceeded. (in reply to MAIL FROM command)
|
|
11
|
-
module TooManyConn
|
|
12
|
-
class << self
|
|
13
|
-
Index = [
|
|
14
|
-
'all available ips are at maximum connection limit', # SendGrid
|
|
15
|
-
'connection rate limit exceeded',
|
|
16
|
-
'exceeds per-domain connection limit for',
|
|
17
|
-
'has exceeded the max emails per hour ',
|
|
18
|
-
'throttling failure: daily message quota exceeded',
|
|
19
|
-
'throttling failure: maximum sending rate exceeded',
|
|
20
|
-
'too many connections',
|
|
21
|
-
'too many connections from your host.', # Microsoft
|
|
22
|
-
'too many concurrent smtp connections', # Microsoft
|
|
23
|
-
'too many errors from your ip', # Free.fr
|
|
24
|
-
'too many recipients', # ntt docomo
|
|
25
|
-
'too many smtp sessions for this host', # Sendmail(daemon.c)
|
|
26
|
-
'trop de connexions, ',
|
|
27
|
-
'we have already made numerous attempts to deliver this message',
|
|
28
|
-
].freeze
|
|
29
|
-
|
|
30
|
-
def text; return 'toomanyconn'; end
|
|
31
|
-
def description; return 'SMTP connection rejected temporarily due to too many concurrency connections to the remote host'; end
|
|
32
|
-
|
|
33
|
-
# Try to match that the given text and regular expressions
|
|
34
|
-
# @param [String] argv1 String to be matched with regular expressions
|
|
35
|
-
# @return [Boolean] false: Did not match, true: Matched
|
|
36
|
-
def match(argv1)
|
|
37
|
-
return false if argv1.nil? || argv1.empty?
|
|
38
|
-
return true if Index.any? { |a| argv1.include?(a) }
|
|
39
|
-
return false
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
# Rejected by domain or address filter ?
|
|
43
|
-
# @param [Sisimai::Fact] argvs Object to be detected the reason
|
|
44
|
-
# @return [Boolean] true: is filtered
|
|
45
|
-
# false: is not filtered
|
|
46
|
-
# @see http://www.ietf.org/rfc/rfc2822.txt
|
|
47
|
-
def true(argvs)
|
|
48
|
-
return true if argvs['reason'] == 'toomanyconn'
|
|
49
|
-
return true if Sisimai::SMTP::Status.name(argvs['deliverystatus']) == 'toomanyconn'
|
|
50
|
-
return match(argvs['diagnosticcode'].downcase)
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|