sisimai 5.6.0-java → 5.7.1-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/.github/workflows/rake-test.yml +0 -4
- data/ChangeLog.md +47 -0
- data/README-JA.md +19 -16
- data/README.md +23 -21
- data/lib/sisimai/address.rb +8 -31
- data/lib/sisimai/arf.rb +5 -6
- data/lib/sisimai/eb.rb +116 -0
- data/lib/sisimai/fact.rb +33 -51
- data/lib/sisimai/lda.rb +20 -18
- data/lib/sisimai/lhost/activehunter.rb +0 -2
- data/lib/sisimai/lhost/amazonses.rb +17 -18
- data/lib/sisimai/lhost/apachejames.rb +0 -1
- data/lib/sisimai/lhost/biglobe.rb +0 -16
- data/lib/sisimai/lhost/courier.rb +9 -7
- data/lib/sisimai/lhost/deutschetelekom.rb +120 -0
- data/lib/sisimai/lhost/domino.rb +2 -4
- data/lib/sisimai/lhost/dragonfly.rb +0 -27
- data/lib/sisimai/lhost/einsundeins.rb +4 -12
- data/lib/sisimai/lhost/exchange2003.rb +12 -11
- data/lib/sisimai/lhost/exchange2007.rb +17 -17
- data/lib/sisimai/lhost/exim.rb +34 -81
- data/lib/sisimai/lhost/ezweb.rb +15 -51
- data/lib/sisimai/lhost/fml.rb +8 -32
- data/lib/sisimai/lhost/gmail.rb +10 -32
- data/lib/sisimai/lhost/gmx.rb +7 -24
- data/lib/sisimai/lhost/googlegroups.rb +6 -5
- data/lib/sisimai/lhost/googleworkspace.rb +2 -5
- data/lib/sisimai/lhost/imailserver.rb +4 -9
- data/lib/sisimai/lhost/kddi.rb +8 -21
- data/lib/sisimai/lhost/mailfoundry.rb +0 -2
- data/lib/sisimai/lhost/mailmarshal.rb +1 -3
- data/lib/sisimai/lhost/messagingserver.rb +4 -15
- data/lib/sisimai/lhost/mfilter.rb +0 -1
- data/lib/sisimai/lhost/mimecast.rb +0 -1
- data/lib/sisimai/lhost/notes.rb +3 -3
- data/lib/sisimai/lhost/opensmtpd.rb +0 -40
- data/lib/sisimai/lhost/postfix.rb +14 -14
- data/lib/sisimai/lhost/qmail.rb +23 -89
- data/lib/sisimai/lhost/sendmail.rb +8 -7
- data/lib/sisimai/lhost/trendmicro.rb +5 -4
- data/lib/sisimai/lhost/v5sendmail.rb +2 -2
- data/lib/sisimai/lhost/verizon.rb +4 -4
- data/lib/sisimai/lhost/x1.rb +1 -2
- data/lib/sisimai/lhost/x2.rb +0 -2
- data/lib/sisimai/lhost/x3.rb +4 -9
- data/lib/sisimai/lhost/x6.rb +0 -1
- data/lib/sisimai/lhost/zoho.rb +0 -12
- data/lib/sisimai/lhost.rb +38 -19
- data/lib/sisimai/message.rb +1 -1
- data/lib/sisimai/order.rb +4 -1
- data/lib/sisimai/reason/authfailure.rb +8 -7
- data/lib/sisimai/reason/badreputation.rb +5 -4
- data/lib/sisimai/reason/blocked.rb +6 -5
- data/lib/sisimai/reason/contenterror.rb +8 -5
- data/lib/sisimai/reason/delivered.rb +3 -2
- data/lib/sisimai/reason/emailtoolarge.rb +7 -6
- data/lib/sisimai/reason/expired.rb +16 -4
- data/lib/sisimai/reason/failedstarttls.rb +5 -3
- data/lib/sisimai/reason/feedback.rb +2 -1
- data/lib/sisimai/reason/filtered.rb +9 -8
- data/lib/sisimai/reason/hasmoved.rb +5 -4
- data/lib/sisimai/reason/hostunknown.rb +14 -4
- data/lib/sisimai/reason/mailboxfull.rb +10 -8
- data/lib/sisimai/reason/mailererror.rb +3 -2
- data/lib/sisimai/reason/networkerror.rb +16 -3
- data/lib/sisimai/reason/norelaying.rb +8 -6
- data/lib/sisimai/reason/notaccept.rb +15 -7
- data/lib/sisimai/reason/notcompliantrfc.rb +5 -3
- data/lib/sisimai/reason/onhold.rb +8 -7
- data/lib/sisimai/reason/policyviolation.rb +11 -5
- data/lib/sisimai/reason/ratelimited.rb +5 -4
- data/lib/sisimai/reason/rejected.rb +24 -14
- data/lib/sisimai/reason/requireptr.rb +5 -4
- data/lib/sisimai/reason/securityerror.rb +5 -3
- data/lib/sisimai/reason/spamdetected.rb +6 -5
- data/lib/sisimai/reason/suppressed.rb +4 -3
- data/lib/sisimai/reason/suspend.rb +8 -3
- data/lib/sisimai/reason/syntaxerror.rb +5 -11
- data/lib/sisimai/reason/systemerror.rb +21 -2
- data/lib/sisimai/reason/systemfull.rb +4 -3
- data/lib/sisimai/reason/undefined.rb +2 -1
- data/lib/sisimai/reason/userunknown.rb +15 -9
- data/lib/sisimai/reason/vacation.rb +2 -1
- data/lib/sisimai/reason/virusdetected.rb +6 -5
- data/lib/sisimai/reason.rb +47 -42
- data/lib/sisimai/rfc1123.rb +1 -1
- data/lib/sisimai/rfc1894.rb +15 -8
- data/lib/sisimai/rfc2045.rb +8 -5
- data/lib/sisimai/rfc3464/thirdparty.rb +11 -10
- data/lib/sisimai/rfc3464.rb +10 -14
- data/lib/sisimai/rfc3834.rb +6 -5
- data/lib/sisimai/rfc791.rb +3 -38
- data/lib/sisimai/rhost/aol.rb +3 -2
- data/lib/sisimai/rhost/apple.rb +12 -11
- data/lib/sisimai/rhost/cloudflare.rb +3 -2
- data/lib/sisimai/rhost/cox.rb +38 -37
- data/lib/sisimai/rhost/facebook.rb +17 -16
- data/lib/sisimai/rhost/franceptt.rb +39 -38
- data/lib/sisimai/rhost/godaddy.rb +35 -34
- data/lib/sisimai/rhost/google.rb +22 -21
- data/lib/sisimai/rhost/gsuite.rb +8 -7
- data/lib/sisimai/rhost/iua.rb +11 -10
- data/lib/sisimai/rhost/kddi.rb +3 -2
- data/lib/sisimai/rhost/messagelabs.rb +13 -12
- data/lib/sisimai/rhost/microsoft.rb +37 -32
- data/lib/sisimai/rhost/mimecast.rb +18 -17
- data/lib/sisimai/rhost/nttdocomo.rb +10 -9
- data/lib/sisimai/rhost/outlook.rb +3 -2
- data/lib/sisimai/rhost/spectrum.rb +19 -18
- data/lib/sisimai/rhost/tencent.rb +10 -9
- data/lib/sisimai/rhost/yahooinc.rb +11 -10
- data/lib/sisimai/rhost/zoho.rb +8 -7
- data/lib/sisimai/rhost.rb +1 -1
- data/lib/sisimai/smtp/command.rb +13 -8
- data/lib/sisimai/smtp/failure.rb +9 -8
- data/lib/sisimai/smtp/reply.rb +23 -22
- data/lib/sisimai/smtp/status.rb +164 -159
- data/lib/sisimai/smtp/transcript.rb +3 -2
- data/lib/sisimai/string.rb +0 -12
- data/lib/sisimai/version.rb +1 -1
- data/lib/sisimai.rb +2 -1
- data/set-of-emails/maildir/bsd/lhost-deutschetelekom-01.eml +66 -0
- data/set-of-emails/maildir/bsd/lhost-deutschetelekom-02.eml +68 -0
- data/set-of-emails/maildir/bsd/lhost-deutschetelekom-03.eml +50 -0
- data/set-of-emails/maildir/bsd/lhost-postfix-81.eml +130 -0
- data/set-of-emails/should-not-crash/go-423-deeply-nested-mime-parts.eml +20050 -0
- data/set-of-emails/should-not-crash/p5-664-iomart-mail-filter.eml +258 -0
- data/set-of-emails/to-be-debugged-because/sisimai-cannot-parse-yet/.gitkeep +0 -0
- metadata +11 -2
data/lib/sisimai/smtp/status.rb
CHANGED
|
@@ -155,6 +155,12 @@
|
|
|
155
155
|
# X.3.5 --- System incorrectly configured:(RFC 3463)
|
|
156
156
|
# The system is not configured in a manner that will permit it to accept this
|
|
157
157
|
# message.
|
|
158
|
+
#
|
|
159
|
+
# X.3.6 250 Requested priority was changed:(RFC 6710)
|
|
160
|
+
# 251 The message was accepted for relay/delivery, but the requested priority (possibly
|
|
161
|
+
# the implied default) was not honored. The human readable text after the status
|
|
162
|
+
# code contains the new priority, followed by SP (space) and explanatory human
|
|
163
|
+
# readable text.
|
|
158
164
|
# -------------------------------------------------------------------------------------------------
|
|
159
165
|
# X.4.0 --- Other or undefined network or routing status:(RFC 3463)
|
|
160
166
|
# Something went wrong with the networking, but it is not clear what the problem is,
|
|
@@ -391,7 +397,7 @@
|
|
|
391
397
|
# 5xx temporary, for example the server is operating in a mode where only higher
|
|
392
398
|
# priority messages below certain size are accepted for transfer and delivery.
|
|
393
399
|
#
|
|
394
|
-
# X.7.17 5xx Mailbox owner has changed:(RFC
|
|
400
|
+
# X.7.17 5xx Mailbox owner has changed:(RFC 7293)
|
|
395
401
|
# This status code is returned when a message is received with a
|
|
396
402
|
# Require-Recipient-Valid-Since field or RRVS extension and the receiving system is
|
|
397
403
|
# able to determine that the intended recipient mailbox has not been under
|
|
@@ -479,6 +485,7 @@ module Sisimai
|
|
|
479
485
|
# reason from D.S.N. value, and getting D.S.N. from the text including D.S.N.
|
|
480
486
|
module Status
|
|
481
487
|
class << self
|
|
488
|
+
require "sisimai/eb"
|
|
482
489
|
require "sisimai/rfc791"
|
|
483
490
|
|
|
484
491
|
CodePatterns = [
|
|
@@ -488,150 +495,150 @@ module Sisimai
|
|
|
488
495
|
%r/\b(2[.][0-7][.][0-7])\b/, # 2.1.5
|
|
489
496
|
]
|
|
490
497
|
StandardCode = {
|
|
491
|
-
'2.1.5' =>
|
|
498
|
+
'2.1.5' => Sisimai::Eb::ReSENT, # Successfully delivered
|
|
492
499
|
# ---------------------------------------------------------------------------------------
|
|
493
|
-
'4.1.6' =>
|
|
494
|
-
'4.1.7' =>
|
|
495
|
-
'4.1.8' =>
|
|
496
|
-
'4.1.9' =>
|
|
497
|
-
'4.2.1' =>
|
|
498
|
-
'4.2.2' =>
|
|
499
|
-
'4.2.3' =>
|
|
500
|
-
'4.2.4' =>
|
|
501
|
-
#
|
|
502
|
-
'4.3.1' =>
|
|
503
|
-
'4.3.2' =>
|
|
504
|
-
'4.3.3' =>
|
|
505
|
-
'4.3.5' =>
|
|
506
|
-
#
|
|
507
|
-
'4.4.1' =>
|
|
508
|
-
'4.4.2' =>
|
|
509
|
-
'4.4.3' =>
|
|
510
|
-
'4.4.4' =>
|
|
511
|
-
'4.4.5' =>
|
|
512
|
-
'4.4.6' =>
|
|
513
|
-
'4.4.7' =>
|
|
514
|
-
'4.4.8' =>
|
|
515
|
-
#
|
|
516
|
-
'4.5.3' =>
|
|
517
|
-
'4.5.5' =>
|
|
518
|
-
'4.6.0' =>
|
|
519
|
-
'4.6.2' =>
|
|
520
|
-
'4.6.5' =>
|
|
521
|
-
#
|
|
522
|
-
'4.7.1' =>
|
|
523
|
-
'4.7.2' =>
|
|
524
|
-
'4.7.5' =>
|
|
525
|
-
'4.7.6' =>
|
|
526
|
-
'4.7.7' =>
|
|
527
|
-
'4.7.12' =>
|
|
528
|
-
'4.7.15' =>
|
|
529
|
-
'4.7.16' =>
|
|
530
|
-
'4.7.24' =>
|
|
531
|
-
'4.7.25' =>
|
|
500
|
+
'4.1.6' => Sisimai::Eb::ReMOVE, # Destination mailbox has moved, No forwarding address
|
|
501
|
+
'4.1.7' => Sisimai::Eb::ReFROM, # Bad sender's mailbox address syntax
|
|
502
|
+
'4.1.8' => Sisimai::Eb::ReFROM, # Bad sender's system address
|
|
503
|
+
'4.1.9' => Sisimai::Eb::RePROC, # Message relayed to non-compliant mailer
|
|
504
|
+
'4.2.1' => Sisimai::Eb::ReQUIT, # Mailbox disabled, not accepting messages
|
|
505
|
+
'4.2.2' => Sisimai::Eb::ReFULL, # Mailbox full
|
|
506
|
+
'4.2.3' => Sisimai::Eb::ReSIZE, # Message length exceeds administrative limit
|
|
507
|
+
'4.2.4' => Sisimai::Eb::RePROC, # Mailing list expansion problem
|
|
508
|
+
#'4.3.0' => Sisimai::Eb::ReSAFE, # Other or undefined mail system status
|
|
509
|
+
'4.3.1' => Sisimai::Eb::ReDISK, # Mail system full
|
|
510
|
+
'4.3.2' => Sisimai::Eb::Re00MX, # System not accepting network messages
|
|
511
|
+
'4.3.3' => Sisimai::Eb::RePROC, # System not capable of selected features
|
|
512
|
+
'4.3.5' => Sisimai::Eb::RePROC, # System incorrectly configured
|
|
513
|
+
#'4.4.0' => Sisimai::Eb::ReINET, # Other or undefined network or routing status
|
|
514
|
+
'4.4.1' => Sisimai::Eb::ReTIME, # No answer from host
|
|
515
|
+
'4.4.2' => Sisimai::Eb::ReINET, # Bad connection
|
|
516
|
+
'4.4.3' => Sisimai::Eb::RePROC, # Directory server failure
|
|
517
|
+
'4.4.4' => Sisimai::Eb::ReINET, # Unable to route
|
|
518
|
+
'4.4.5' => Sisimai::Eb::ReDISK, # Mail system congestion
|
|
519
|
+
'4.4.6' => Sisimai::Eb::ReINET, # Routing loop detected
|
|
520
|
+
'4.4.7' => Sisimai::Eb::ReTIME, # Delivery time expired
|
|
521
|
+
'4.4.8' => Sisimai::Eb::ReINET, # Retry on IPv4
|
|
522
|
+
#'4.5.0' => Sisimai::Eb::ReINET, # Other or undefined protocol status
|
|
523
|
+
'4.5.3' => Sisimai::Eb::ReRATE, # Too many recipients
|
|
524
|
+
'4.5.5' => Sisimai::Eb::RePROC, # Wrong protocol version
|
|
525
|
+
'4.6.0' => Sisimai::Eb::ReBODY, # Other or undefined media error
|
|
526
|
+
'4.6.2' => Sisimai::Eb::ReBODY, # Conversion required and prohibited
|
|
527
|
+
'4.6.5' => Sisimai::Eb::ReBODY, # Conversion Failed
|
|
528
|
+
#'4.7.0' => Sisimai::Eb::ReSAFE, # Other or undefined security status
|
|
529
|
+
'4.7.1' => Sisimai::Eb::ReBLOC, # Delivery not authorized, message refused
|
|
530
|
+
'4.7.2' => Sisimai::Eb::ReFROM, # Mailing list expansion prohibited
|
|
531
|
+
'4.7.5' => Sisimai::Eb::ReSAFE, # Cryptographic failure
|
|
532
|
+
'4.7.6' => Sisimai::Eb::ReSAFE, # Cryptographic algorithm not supported
|
|
533
|
+
'4.7.7' => Sisimai::Eb::ReSAFE, # Message integrity failure
|
|
534
|
+
'4.7.12' => Sisimai::Eb::ReSAFE, # A password transition is needed
|
|
535
|
+
'4.7.15' => Sisimai::Eb::ReSAFE, # Priority Level is too low
|
|
536
|
+
'4.7.16' => Sisimai::Eb::ReSIZE, # Message is too big for the specified priority
|
|
537
|
+
'4.7.24' => Sisimai::Eb::ReAUTH, # SPF validation error
|
|
538
|
+
'4.7.25' => Sisimai::Eb::ReQPTR, # Reverse DNS validation failed
|
|
532
539
|
# ---------------------------------------------------------------------------------------
|
|
533
|
-
'5.1.0' =>
|
|
534
|
-
'5.1.1' =>
|
|
535
|
-
'5.1.2' =>
|
|
536
|
-
'5.1.3' =>
|
|
537
|
-
'5.1.4' =>
|
|
538
|
-
'5.1.6' =>
|
|
539
|
-
'5.1.7' =>
|
|
540
|
-
'5.1.8' =>
|
|
541
|
-
'5.1.9' =>
|
|
542
|
-
'5.1.10' =>
|
|
543
|
-
'5.2.0' =>
|
|
544
|
-
'5.2.1' =>
|
|
545
|
-
'5.2.2' =>
|
|
546
|
-
'5.2.3' =>
|
|
547
|
-
'5.2.4' =>
|
|
548
|
-
'5.3.0' =>
|
|
549
|
-
'5.3.1' =>
|
|
550
|
-
'5.3.2' =>
|
|
551
|
-
'5.3.3' =>
|
|
552
|
-
'5.3.4' =>
|
|
553
|
-
'5.3.5' =>
|
|
554
|
-
'5.4.0' =>
|
|
555
|
-
'5.4.3' =>
|
|
556
|
-
'5.4.4' =>
|
|
557
|
-
'5.5.2' =>
|
|
558
|
-
'5.5.3' =>
|
|
559
|
-
'5.5.4' =>
|
|
560
|
-
'5.5.5' =>
|
|
561
|
-
'5.5.6' =>
|
|
562
|
-
'5.6.0' =>
|
|
563
|
-
'5.6.1' =>
|
|
564
|
-
'5.6.2' =>
|
|
565
|
-
'5.6.3' =>
|
|
566
|
-
'5.6.5' =>
|
|
567
|
-
'5.6.6' =>
|
|
568
|
-
'5.6.7' =>
|
|
569
|
-
'5.6.8' =>
|
|
570
|
-
'5.6.9' =>
|
|
571
|
-
'5.7.0' =>
|
|
572
|
-
'5.7.1' =>
|
|
573
|
-
'5.7.2' =>
|
|
574
|
-
'5.7.3' =>
|
|
575
|
-
'5.7.4' =>
|
|
576
|
-
'5.7.5' =>
|
|
577
|
-
'5.7.6' =>
|
|
578
|
-
'5.7.7' =>
|
|
579
|
-
'5.7.8' =>
|
|
580
|
-
'5.7.9' =>
|
|
581
|
-
'5.7.10' =>
|
|
582
|
-
'5.7.11' =>
|
|
583
|
-
'5.7.13' =>
|
|
584
|
-
'5.7.14' =>
|
|
585
|
-
'5.7.15' =>
|
|
586
|
-
'5.7.16' =>
|
|
587
|
-
'5.7.17' =>
|
|
588
|
-
'5.7.18' =>
|
|
589
|
-
'5.7.19' =>
|
|
590
|
-
'5.7.20' =>
|
|
591
|
-
'5.7.21' =>
|
|
592
|
-
'5.7.22' =>
|
|
593
|
-
'5.7.23' =>
|
|
594
|
-
'5.7.24' =>
|
|
595
|
-
'5.7.25' =>
|
|
596
|
-
'5.7.26' =>
|
|
597
|
-
'5.7.27' =>
|
|
598
|
-
'5.7.28' =>
|
|
599
|
-
'5.7.29' =>
|
|
600
|
-
'5.7.30' =>
|
|
540
|
+
'5.1.0' => Sisimai::Eb::ReUSER, # Other address status
|
|
541
|
+
'5.1.1' => Sisimai::Eb::ReUSER, # Bad destination mailbox address
|
|
542
|
+
'5.1.2' => Sisimai::Eb::ReHOST, # Bad destination system address
|
|
543
|
+
'5.1.3' => Sisimai::Eb::ReUSER, # Bad destination mailbox address syntax
|
|
544
|
+
'5.1.4' => Sisimai::Eb::ReFILT, # Destination mailbox address ambiguous
|
|
545
|
+
'5.1.6' => Sisimai::Eb::ReMOVE, # Destination mailbox has moved, No forwarding address
|
|
546
|
+
'5.1.7' => Sisimai::Eb::ReFROM, # Bad sender's mailbox address syntax
|
|
547
|
+
'5.1.8' => Sisimai::Eb::ReFROM, # Bad sender's system address
|
|
548
|
+
'5.1.9' => Sisimai::Eb::RePROC, # Message relayed to non-compliant mailer
|
|
549
|
+
'5.1.10' => Sisimai::Eb::Re00MX, # Recipient address has null MX
|
|
550
|
+
'5.2.0' => Sisimai::Eb::ReFILT, # Other or undefined mailbox status
|
|
551
|
+
'5.2.1' => Sisimai::Eb::ReFILT, # Mailbox disabled, not accepting messages
|
|
552
|
+
'5.2.2' => Sisimai::Eb::ReFULL, # Mailbox full
|
|
553
|
+
'5.2.3' => Sisimai::Eb::ReSIZE, # Message length exceeds administrative limit
|
|
554
|
+
'5.2.4' => Sisimai::Eb::RePROC, # Mailing list expansion problem
|
|
555
|
+
'5.3.0' => Sisimai::Eb::RePROC, # Other or undefined mail system status
|
|
556
|
+
'5.3.1' => Sisimai::Eb::ReDISK, # Mail system full
|
|
557
|
+
'5.3.2' => Sisimai::Eb::Re00MX, # System not accepting network messages
|
|
558
|
+
'5.3.3' => Sisimai::Eb::RePROC, # System not capable of selected features
|
|
559
|
+
'5.3.4' => Sisimai::Eb::ReSIZE, # Message too big for system
|
|
560
|
+
'5.3.5' => Sisimai::Eb::RePROC, # System incorrectly configured
|
|
561
|
+
'5.4.0' => Sisimai::Eb::ReINET, # Other or undefined network or routing status
|
|
562
|
+
'5.4.3' => Sisimai::Eb::RePROC, # Directory server failure
|
|
563
|
+
'5.4.4' => Sisimai::Eb::ReHOST, # Unable to route
|
|
564
|
+
'5.5.2' => Sisimai::Eb::RePROC, # If the server cannot BASE64 decode any client response (AUTH)
|
|
565
|
+
'5.5.3' => Sisimai::Eb::ReRATE, # Too many recipients
|
|
566
|
+
'5.5.4' => Sisimai::Eb::RePROC, # Invalid command arguments
|
|
567
|
+
'5.5.5' => Sisimai::Eb::RePROC, # Wrong protocol version
|
|
568
|
+
'5.5.6' => Sisimai::Eb::ReCOMM, # Authentication Exchange line is too long
|
|
569
|
+
'5.6.0' => Sisimai::Eb::ReBODY, # Other or undefined media error
|
|
570
|
+
'5.6.1' => Sisimai::Eb::ReBODY, # Media not supported
|
|
571
|
+
'5.6.2' => Sisimai::Eb::ReBODY, # Conversion required and prohibited
|
|
572
|
+
'5.6.3' => Sisimai::Eb::ReBODY, # Conversion required but not supported
|
|
573
|
+
'5.6.5' => Sisimai::Eb::ReBODY, # Conversion Failed
|
|
574
|
+
'5.6.6' => Sisimai::Eb::ReBODY, # Message content not available
|
|
575
|
+
'5.6.7' => Sisimai::Eb::ReFROM, # Non-ASCII addresses not permitted for that sender/recipient
|
|
576
|
+
'5.6.8' => Sisimai::Eb::ReBODY, # UTF-8 string reply is required, but not permitted by the SMTP client
|
|
577
|
+
'5.6.9' => Sisimai::Eb::ReBODY, # UTF-8 header message cannot be transferred to one or more recipients
|
|
578
|
+
'5.7.0' => Sisimai::Eb::ReSAFE, # Other or undefined security status
|
|
579
|
+
'5.7.1' => Sisimai::Eb::ReSAFE, # Delivery not authorized, message refused
|
|
580
|
+
'5.7.2' => Sisimai::Eb::ReSAFE, # Mailing list expansion prohibited
|
|
581
|
+
'5.7.3' => Sisimai::Eb::ReSAFE, # Security conversion required but not possible
|
|
582
|
+
'5.7.4' => Sisimai::Eb::ReSAFE, # Security features not supported
|
|
583
|
+
'5.7.5' => Sisimai::Eb::ReSAFE, # Cryptographic failure
|
|
584
|
+
'5.7.6' => Sisimai::Eb::ReSAFE, # Cryptographic algorithm not supported
|
|
585
|
+
'5.7.7' => Sisimai::Eb::ReSAFE, # Message integrity failure
|
|
586
|
+
'5.7.8' => Sisimai::Eb::ReSAFE, # Authentication credentials invalid
|
|
587
|
+
'5.7.9' => Sisimai::Eb::ReSAFE, # Authentication mechanism is too weak
|
|
588
|
+
'5.7.10' => Sisimai::Eb::ReSAFE, # Encryption Needed
|
|
589
|
+
'5.7.11' => Sisimai::Eb::ReSAFE, # Encryption required for requested authentication mechanism
|
|
590
|
+
'5.7.13' => Sisimai::Eb::ReQUIT, # User Account Disabled
|
|
591
|
+
'5.7.14' => Sisimai::Eb::ReSAFE, # Trust relationship required
|
|
592
|
+
'5.7.15' => Sisimai::Eb::ReSAFE, # Priority Level is too low
|
|
593
|
+
'5.7.16' => Sisimai::Eb::ReSIZE, # Message is too big for the specified priority
|
|
594
|
+
'5.7.17' => Sisimai::Eb::ReMOVE, # Mailbox owner has changed
|
|
595
|
+
'5.7.18' => Sisimai::Eb::ReMOVE, # Domain owner has changed
|
|
596
|
+
'5.7.19' => Sisimai::Eb::RePROC, # RRVS test cannot be completed
|
|
597
|
+
'5.7.20' => Sisimai::Eb::ReAUTH, # No passing DKIM signature found
|
|
598
|
+
'5.7.21' => Sisimai::Eb::ReAUTH, # No acceptable DKIM signature found
|
|
599
|
+
'5.7.22' => Sisimai::Eb::ReAUTH, # No valid author-matched DKIM signature found
|
|
600
|
+
'5.7.23' => Sisimai::Eb::ReAUTH, # SPF validation failed
|
|
601
|
+
'5.7.24' => Sisimai::Eb::ReAUTH, # SPF validation error
|
|
602
|
+
'5.7.25' => Sisimai::Eb::ReQPTR, # Reverse DNS validation failed
|
|
603
|
+
'5.7.26' => Sisimai::Eb::ReAUTH, # Multiple authentication checks failed
|
|
604
|
+
'5.7.27' => Sisimai::Eb::Re00MX, # MX resource record of a destination host is Null MX: RFC7505
|
|
605
|
+
'5.7.28' => Sisimai::Eb::ReSPAM, # The message appears to be part of a mail flood of similar abusive messages.
|
|
606
|
+
'5.7.29' => Sisimai::Eb::ReAUTH, # This status code may be returned when a message fails ARC validation.
|
|
607
|
+
'5.7.30' => Sisimai::Eb::ReTTLS, # REQUIRETLS support required
|
|
601
608
|
}.freeze
|
|
602
609
|
|
|
603
610
|
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
|
-
|
|
611
|
+
Sisimai::Eb::ReAUTH => ['5.9.130', '4.9.130'],
|
|
612
|
+
Sisimai::Eb::ReFAMA => ['5.9.132', '4.9.132'],
|
|
613
|
+
Sisimai::Eb::ReBLOC => ['5.9.134', '4.9.134'],
|
|
614
|
+
Sisimai::Eb::ReBODY => ['5.9.160', '4.9.160'],
|
|
615
|
+
Sisimai::Eb::ReSIZE => ['5.9.161', '4.9.161'],
|
|
616
|
+
Sisimai::Eb::ReTIME => ['5.9.340', '4.9.340'],
|
|
617
|
+
Sisimai::Eb::ReTTLS => ['5.9.350', '4.9.350'],
|
|
618
|
+
Sisimai::Eb::ReFILT => ['5.9.210', '4.9.210'],
|
|
619
|
+
Sisimai::Eb::ReMOVE => ['5.9.211', ''],
|
|
620
|
+
Sisimai::Eb::ReHOST => ['5.9.212', ''],
|
|
621
|
+
Sisimai::Eb::ReFULL => ['5.9.220', '4.9.220'],
|
|
622
|
+
Sisimai::Eb::ReUNIX => ['5.9.230', '4.9.230'],
|
|
623
|
+
Sisimai::Eb::ReINET => ['5.9.341', '4.9.341'],
|
|
624
|
+
Sisimai::Eb::RePASS => ['5.9.214', '4.9.214'],
|
|
625
|
+
Sisimai::Eb::Re00MX => ['5.9.215', '4.9.215'],
|
|
626
|
+
Sisimai::Eb::ReNRFC => ['5.9.162', '4.9.162'],
|
|
627
|
+
Sisimai::Eb::Re___1 => ['5.9.301', '4.9.301'],
|
|
628
|
+
Sisimai::Eb::ReWONT => ['5.9.371', '4.9.371'],
|
|
629
|
+
Sisimai::Eb::ReRATE => ['5.9.131', '4.9.131'],
|
|
630
|
+
Sisimai::Eb::ReFROM => ['5.9.110', '4.9.110'],
|
|
631
|
+
Sisimai::Eb::ReQPTR => ['5.9.133', '4.9.133'],
|
|
632
|
+
Sisimai::Eb::ReSAFE => ['5.9.370', '4.9.370'],
|
|
633
|
+
Sisimai::Eb::ReSPAM => ['5.9.164', '4.9.164'],
|
|
634
|
+
Sisimai::Eb::ReSTOP => ['5.9.310', '4.9.310'],
|
|
635
|
+
Sisimai::Eb::ReQUIT => ['5.9.221', '4.9.221'],
|
|
636
|
+
Sisimai::Eb::ReCOMM => ['5.9.351', '4.9.351'],
|
|
637
|
+
Sisimai::Eb::RePROC => ['5.9.231', '4.9.231'],
|
|
638
|
+
Sisimai::Eb::ReDISK => ['5.9.232', '4.9.232'],
|
|
639
|
+
Sisimai::Eb::Re___0 => ['5.9.300', '4.9.300'],
|
|
640
|
+
Sisimai::Eb::ReUSER => ['5.9.213', ''],
|
|
641
|
+
Sisimai::Eb::ReEXEC => ['5.9.165', '4.9.165'],
|
|
635
642
|
}.freeze
|
|
636
643
|
|
|
637
644
|
# Convert from the reason string to the internal status code
|
|
@@ -680,12 +687,10 @@ module Sisimai
|
|
|
680
687
|
def find(argv1 = nil, argv2 = '0')
|
|
681
688
|
return "" if argv1.to_s.empty? || argv1.size < 7
|
|
682
689
|
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
['5.', '4.', '2.']
|
|
688
|
-
end
|
|
690
|
+
case argv2[0, 1]
|
|
691
|
+
when '2', '4', '5' then eestatuses = [argv2[0, 1] + '.']
|
|
692
|
+
else eestatuses = ['5.', '4.', '2.']
|
|
693
|
+
end
|
|
689
694
|
esmtperror = ' ' + argv1 + ' ' # Why 3 space characters? see https://github.com/sisimai/p5-sisimai/issues/574
|
|
690
695
|
lookingfor = []
|
|
691
696
|
|
|
@@ -822,22 +827,22 @@ module Sisimai
|
|
|
822
827
|
end
|
|
823
828
|
|
|
824
829
|
return statuscode if zeroindex2['error'] > 0 # An SMTP status code is "X.0.0"
|
|
825
|
-
return codeinmesg if statuscode == '4.4.7' # "4.4.7" is an ambiguous code
|
|
826
|
-
return codeinmesg if statuscode == '4.7.0' # "4.7.0" indicates "too many errors"
|
|
827
830
|
return codeinmesg if statuscode.start_with?('5.3.') # "5.3.Z" is an error of a system
|
|
828
|
-
return codeinmesg if statuscode.end_with?('.5.1'
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
# "5.
|
|
831
|
+
return codeinmesg if statuscode.end_with?('.5.1', '.5.2', '.5.4', '.5.5')
|
|
832
|
+
|
|
833
|
+
case statuscode
|
|
834
|
+
# - "4.4.7" is an ambigous code
|
|
835
|
+
# - "4.7.0" indicates "too many errors"
|
|
836
|
+
# - "X.5.1" indicates an invalid command
|
|
837
|
+
# - "X.5.2" indicates a syntax error
|
|
838
|
+
# - "X.5.4" indicates an invalid command argument
|
|
839
|
+
# - "X.5.5" indicates a wrong protocol version
|
|
840
|
+
when "4.4.7", "4.7.0" then return codeinmesg
|
|
841
|
+
when "5.1.3" then return codeinmesg if codeinmesg.start_with?('5.7.')
|
|
842
|
+
when "5.1.1"
|
|
843
|
+
# "5.1.1" is a code of "UserUnknown"
|
|
835
844
|
return statuscode if codeinmesg.start_with?('5.5.') || zeroindex1['error'] > 0
|
|
836
845
|
return codeinmesg
|
|
837
|
-
|
|
838
|
-
elsif statuscode == '5.1.3'
|
|
839
|
-
# "5.1.3"
|
|
840
|
-
return codeinmesg if codeinmesg.start_with?('5.7.')
|
|
841
846
|
end
|
|
842
847
|
|
|
843
848
|
return statuscode
|
|
@@ -3,6 +3,7 @@ module Sisimai
|
|
|
3
3
|
# Sisimai::SMTP::Transcript is a decoder for the transcript logs of the SMTP session
|
|
4
4
|
module Transcript
|
|
5
5
|
class << self
|
|
6
|
+
require 'sisimai/eb'
|
|
6
7
|
require 'sisimai/smtp/reply'
|
|
7
8
|
require 'sisimai/smtp/status'
|
|
8
9
|
|
|
@@ -43,7 +44,7 @@ module Sisimai
|
|
|
43
44
|
# An SMTP server response starting with '<<<' is the first
|
|
44
45
|
esmtp << table.call
|
|
45
46
|
cx = esmtp[-1]
|
|
46
|
-
cx['command'] =
|
|
47
|
+
cx['command'] = Sisimai::Eb::CeCONN
|
|
47
48
|
argv0 = argv0[p2, argv0.size] if p2 > -1
|
|
48
49
|
else
|
|
49
50
|
# An SMTP command starting with '>>>' is the first
|
|
@@ -68,7 +69,7 @@ module Sisimai
|
|
|
68
69
|
cx = esmtp[-1]
|
|
69
70
|
cx['command'] = thecommand.upcase
|
|
70
71
|
|
|
71
|
-
if thecommand
|
|
72
|
+
if thecommand == Sisimai::Eb::CeMAIL || thecommand == Sisimai::Eb::CeRCPT || thecommand == Sisimai::Eb::CeXFWD
|
|
72
73
|
# MAIL or RCPT
|
|
73
74
|
if cv = commandarg.match(/\A(?:FROM|TO):[ ]*<(.+[@].+)>[ ]*(.*)\z/)
|
|
74
75
|
# >>> MAIL FROM: <neko@example.com> SIZE=65535
|
data/lib/sisimai/string.rb
CHANGED
|
@@ -17,18 +17,6 @@ module Sisimai
|
|
|
17
17
|
return false
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
# Clean the string out
|
|
21
|
-
# @param [String] argv1 String to be cleaned
|
|
22
|
-
# @return [String] Cleaned out string
|
|
23
|
-
# @example Clean up text
|
|
24
|
-
# sweep(' neko ') #=> 'neko'
|
|
25
|
-
def sweep(argv1)
|
|
26
|
-
return argv1 if argv1.is_a?(::String) == false
|
|
27
|
-
argv1 = argv1.chomp.squeeze(' ').strip
|
|
28
|
-
argv1 = argv1.sub(/ [-]{2,}[^ ].+\z/, '')
|
|
29
|
-
return argv1
|
|
30
|
-
end
|
|
31
|
-
|
|
32
20
|
# Check if each element of the 2nd argument is aligned in the 1st argument or not
|
|
33
21
|
# @param [String] argv1 String to be checked
|
|
34
22
|
# @param [Array] argv2 List including the ordered strings
|
data/lib/sisimai/version.rb
CHANGED
data/lib/sisimai.rb
CHANGED
|
@@ -104,12 +104,13 @@ module Sisimai
|
|
|
104
104
|
# Reason list Sisimai can detect
|
|
105
105
|
# @return [Hash] Reason list table
|
|
106
106
|
def reason
|
|
107
|
+
require 'sisimai/eb'
|
|
107
108
|
require 'sisimai/reason'
|
|
108
109
|
table = {}
|
|
109
110
|
names = Sisimai::Reason.index
|
|
110
111
|
|
|
111
112
|
# These reasons are not included in the results of Sisimai::Reason.index
|
|
112
|
-
names +=
|
|
113
|
+
names += [Sisimai::Eb::ReSENT, Sisimai::Eb::ReFEED, Sisimai::Eb::Re___0, Sisimai::Eb::ReAWAY]
|
|
113
114
|
while e = names.shift do
|
|
114
115
|
# Call .description() method of Sisimai::Reason::*
|
|
115
116
|
r = "Sisimai::Reason::#{e}"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
Received-SPF: None (no SPF record) identity=helo; client-ip=192.0.2.1; helo=mailout11.t-online.de; envelope-from=<>; receiver=mail.example.com
|
|
2
|
+
Received: from mailout11.t-online.de (mailout11.t-online.de [192.0.2.1])
|
|
3
|
+
by mail.example.com (Postfix) with ESMTPS id 2A29623F0
|
|
4
|
+
for <returnpath@mail.example.com>; Wed, 03 Jun 2026 17:30:52 +0000 (UTC)
|
|
5
|
+
Received: from mailin42.aul.t-online.de (mailin42.aul.t-online.de [192.51.100.1])
|
|
6
|
+
by mailout11.t-online.de (Postfix) with SMTP id 05E5A1CAC0
|
|
7
|
+
for <returnpath@mail.example.com>; Wed, 3 Jun 2026 19:23:42 +0200 (CEST)
|
|
8
|
+
X-Failed-Recipients: example@t-online.de
|
|
9
|
+
From: Mail Delivery System <Mailer-Daemon@t-online.de>
|
|
10
|
+
To: returnpath@mail.example.com
|
|
11
|
+
Subject: Mail delivery failed: returning message to sender
|
|
12
|
+
Message-Id: <xxxyyyzzzaaabbccc.aul.t-online.de>
|
|
13
|
+
Date: Wed, 3 Jun 2026 19:23:17 +0200
|
|
14
|
+
X-TOI-MSGID: c9412855-531f-497b-b007-5ffc033877a0
|
|
15
|
+
Authentication-Results: mailin42.aul.t-online.de; dkim=none;
|
|
16
|
+
dkim-atps=neutral
|
|
17
|
+
|
|
18
|
+
|------------------------- Failed addresses follow: ---------------------|
|
|
19
|
+
<example@t-online.de>
|
|
20
|
+
552 5.2.2 <example@t-online.de> Quota exceeded (mailbox for user is full)
|
|
21
|
+
|
|
22
|
+
|------------------------- Message header follows: ----------------------|
|
|
23
|
+
Received: from mail.example.com ([152.53.207.210]) by mailin42.t-online.de
|
|
24
|
+
with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted)
|
|
25
|
+
esmtp id 1wUpJD-0ZWsnR0; Wed, 3 Jun 2026 19:23:15 +0200
|
|
26
|
+
Received: by mail.example.com (Postfix)
|
|
27
|
+
id AD20B29490; Tue, 02 Jun 2026 20:17:41 +0000 (UTC)
|
|
28
|
+
Date: Tue, 02 Jun 2026 20:17:41 +0000
|
|
29
|
+
From: some corp <somecorp@example.com>
|
|
30
|
+
Reply-To: some corp <somecorp@example.com>
|
|
31
|
+
To: example@t-online.de
|
|
32
|
+
Message-ID: <outgoingmessageid>
|
|
33
|
+
Subject: Subject omitted for privacy
|
|
34
|
+
Mime-Version: 1.0
|
|
35
|
+
Content-Type: multipart/mixed;
|
|
36
|
+
boundary="--==_mimepart_6a1f3a659c89f_79afe920227275f";
|
|
37
|
+
charset=UTF-8
|
|
38
|
+
Content-Transfer-Encoding: 7bit
|
|
39
|
+
|
|
40
|
+
|----------- Message text follows: (body too large, truncated) ----------|
|
|
41
|
+
|
|
42
|
+
----==_mimepart_6a1f3a659c89f_79afe920227275f
|
|
43
|
+
Content-Type: text/html;
|
|
44
|
+
charset=UTF-8
|
|
45
|
+
Content-Transfer-Encoding: quoted-printable
|
|
46
|
+
|
|
47
|
+
<!DOCTYPE html>
|
|
48
|
+
<html>
|
|
49
|
+
<head>
|
|
50
|
+
<meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type">=
|
|
51
|
+
|
|
52
|
+
<style>
|
|
53
|
+
#footer {
|
|
54
|
+
font-size: 11px;
|
|
55
|
+
border-top: 1px solid #666;
|
|
56
|
+
color: #333;
|
|
57
|
+
margin-top: 1em;
|
|
58
|
+
padding-top: 1em;
|
|
59
|
+
}
|
|
60
|
+
</style>
|
|
61
|
+
|
|
62
|
+
</head>
|
|
63
|
+
<body>
|
|
64
|
+
<p>Hello there, fellow some corp user!</p><p>I would like to inform you a=
|
|
65
|
+
about the upcoming team event next we
|
|
66
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
Received-SPF: None (no SPF record) identity=helo; client-ip=192.0.2.1; helo=mailout11.t-online.de; envelope-from=<>; receiver=mail.example.com
|
|
2
|
+
Received: from mailout11.t-online.de (mailout11.t-online.de [192.0.2.1])
|
|
3
|
+
by mail.example.com (Postfix) with ESMTPS id 2A29623F0
|
|
4
|
+
for <returnpath@mail.example.com>; Wed, 03 Jun 2026 17:30:52 +0000 (UTC)
|
|
5
|
+
Received: from mailin42.aul.t-online.de (mailin42.aul.t-online.de [192.51.100.1])
|
|
6
|
+
by mailout11.t-online.de (Postfix) with SMTP id 05E5A1CAC0
|
|
7
|
+
for <returnpath@mail.example.com>; Wed, 3 Jun 2026 19:23:42 +0200 (CEST)
|
|
8
|
+
X-Failed-Recipients: example@t-online.de
|
|
9
|
+
From: Mail Delivery System <Mailer-Daemon@t-online.de>
|
|
10
|
+
To: returnpath@mail.example.com
|
|
11
|
+
Subject: Mail delivery failed: returning message to sender
|
|
12
|
+
Message-Id: <xxxyyyzzzaaabbccc.aul.t-online.de>
|
|
13
|
+
Date: Wed, 3 Jun 2026 19:23:17 +0200
|
|
14
|
+
X-TOI-MSGID: c9412855-531f-497b-b007-5ffc033877a0
|
|
15
|
+
Authentication-Results: mailin42.aul.t-online.de; dkim=none;
|
|
16
|
+
dkim-atps=neutral
|
|
17
|
+
|
|
18
|
+
|------------------------- Failed addresses follow: ---------------------|
|
|
19
|
+
<example1@t-online.de>
|
|
20
|
+
552 5.2.2 <example1@t-online.de> Quota exceeded (mailbox for user is full)
|
|
21
|
+
<example2@t-online.de>
|
|
22
|
+
550 5.1.1 <example2@t-online.de> unknown user
|
|
23
|
+
|
|
24
|
+
|------------------------- Message header follows: ----------------------|
|
|
25
|
+
Received: from mail.example.com ([152.53.207.210]) by mailin42.t-online.de
|
|
26
|
+
with (TLSv1.3:TLS_AES_256_GCM_SHA384 encrypted)
|
|
27
|
+
esmtp id 1wUpJD-0ZWsnR0; Wed, 3 Jun 2026 19:23:15 +0200
|
|
28
|
+
Received: by mail.example.com (Postfix)
|
|
29
|
+
id AD20B29490; Tue, 02 Jun 2026 20:17:41 +0000 (UTC)
|
|
30
|
+
Date: Tue, 02 Jun 2026 20:17:41 +0000
|
|
31
|
+
From: some corp <somecorp@example.com>
|
|
32
|
+
Reply-To: some corp <somecorp@example.com>
|
|
33
|
+
To: <example1@t-online.de>, <example2@t-online.de>
|
|
34
|
+
Message-ID: <outgoingmessageid>
|
|
35
|
+
Subject: Subject omitted for privacy
|
|
36
|
+
Mime-Version: 1.0
|
|
37
|
+
Content-Type: multipart/mixed;
|
|
38
|
+
boundary="--==_mimepart_6a1f3a659c89f_79afe920227275f";
|
|
39
|
+
charset=UTF-8
|
|
40
|
+
Content-Transfer-Encoding: 7bit
|
|
41
|
+
|
|
42
|
+
|----------- Message text follows: (body too large, truncated) ----------|
|
|
43
|
+
|
|
44
|
+
----==_mimepart_6a1f3a659c89f_79afe920227275f
|
|
45
|
+
Content-Type: text/html;
|
|
46
|
+
charset=UTF-8
|
|
47
|
+
Content-Transfer-Encoding: quoted-printable
|
|
48
|
+
|
|
49
|
+
<!DOCTYPE html>
|
|
50
|
+
<html>
|
|
51
|
+
<head>
|
|
52
|
+
<meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type">=
|
|
53
|
+
|
|
54
|
+
<style>
|
|
55
|
+
#footer {
|
|
56
|
+
font-size: 11px;
|
|
57
|
+
border-top: 1px solid #666;
|
|
58
|
+
color: #333;
|
|
59
|
+
margin-top: 1em;
|
|
60
|
+
padding-top: 1em;
|
|
61
|
+
}
|
|
62
|
+
</style>
|
|
63
|
+
|
|
64
|
+
</head>
|
|
65
|
+
<body>
|
|
66
|
+
<p>Hello there, fellow some corp user!</p><p>I would like to inform you a=
|
|
67
|
+
about the upcoming team event next we
|
|
68
|
+
|