Module: Sisimai::Reason::NotCompliantRFC
- Defined in:
- lib/sisimai/reason/notcompliantrfc.rb
Overview
Sisimai::Reason::NotCompliantRFC checks the bounce reason is “notcompliantrfc” or not. This class is called only from Sisimai::Reason class.
This is the error that an email is not compliant RFC 5322 or other email related RFCs. For example, there are multiple “Subject” headers in the email.
Constant Summary collapse
- Index =
[ "duplicate header", "duplicated message-id", "message is not rfc 5322 compliant", "multiple addresses in from: header are not accepted", "rfc 1035 violation", "https://support.google.com/mail/?p=rfcmessagenoncompliant", ].freeze
Class Method Summary collapse
- .description ⇒ Object
-
.match(argv1) ⇒ Boolean
Try to match that the given text and regular expressions.
- .text ⇒ Object
-
.true(argvs) ⇒ Boolean
Whether the email is RFC compliant or not.
Class Method Details
.description ⇒ Object
20 |
# File 'lib/sisimai/reason/notcompliantrfc.rb', line 20 def description; return 'Email rejected due to non-compliance with RFC'; end |
.match(argv1) ⇒ Boolean
Try to match that the given text and regular expressions
25 26 27 28 29 |
# File 'lib/sisimai/reason/notcompliantrfc.rb', line 25 def match(argv1) return false if argv1.nil? || argv1.empty? return true if Index.any? { |a| argv1.include?(a) } return false end |
.text ⇒ Object
19 |
# File 'lib/sisimai/reason/notcompliantrfc.rb', line 19 def text; return 'notcompliantrfc'; end |
.true(argvs) ⇒ Boolean
Whether the email is RFC compliant or not
36 37 38 39 |
# File 'lib/sisimai/reason/notcompliantrfc.rb', line 36 def true(argvs) return true if argvs['reason'] == 'notcompliantrfc' return match(argvs['diagnosticcode'].downcase) end |