Module: Sisimai::Reason::BadReputation
- Defined in:
- lib/sisimai/reason/badreputation.rb
Overview
Sisimai::Reason::BadReputation checks the bounce reason is “badreputation” or not. This class is called only Sisimai::Reason class.
This is the error that an email rejected due to a reputation score of the sender IP address.
Action: failed
Status: 5.7.1
Remote-MTA: dns; gmail-smtp-in.l.google.com
Diagnostic-Code: smtp; 550-5.7.1 [192.0.2.22] Our system has detected that this message is
likely suspicious due to the very low reputation of the sending IP address.
To best protect our users from spam, the message has been blocked. Please
visit https://support.google.com/mail/answer/188131 for more information.
Constant Summary collapse
- Index =
[ "has been temporarily rate limited due to ip reputation", "ip/domain reputation problems", "likely suspicious due to the very low reputation", "none/bad reputation", # t-online.de "poor email reputation score", "sending mta's poor reputation", "temporarily deferred due to unexpected volume or user complaints", # Yahoo Inc. ].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
The bounce reason is “badreputation” or not.
Class Method Details
.description ⇒ Object
27 |
# File 'lib/sisimai/reason/badreputation.rb', line 27 def description; return 'Email rejected due to an IP address reputation'; end |
.match(argv1) ⇒ Boolean
Try to match that the given text and regular expressions
32 33 34 35 36 |
# File 'lib/sisimai/reason/badreputation.rb', line 32 def match(argv1) return false if argv1.nil? || argv1.empty? return true if Index.any? { |a| argv1.include?(a) } return false end |
.text ⇒ Object
26 |
# File 'lib/sisimai/reason/badreputation.rb', line 26 def text; return 'badreputation'; end |
.true(argvs) ⇒ Boolean
The bounce reason is “badreputation” or not
42 43 44 45 |
# File 'lib/sisimai/reason/badreputation.rb', line 42 def true(argvs) return true if argvs['reason'] == 'badreputation' return match(argvs['diagnosticcode'].downcase) end |