module Sisimai::Reason::Blocked
Sisimai::Reason::Blocked
checks the bounce reason is “blocked” or not. This class is called only Sisimai::Reason
class.
This is the error that SMTP
connection was rejected due to a client IP address or a hostname, or the parameter of “HELO/EHLO” command. This reason has added in Sisimai
4.0.0 and does not exist in any version of bounceHammer.
Constants
- Regex
Public Class Methods
description()
click to toggle source
# File lib/sisimai/reason/blocked.rb, line 164 def description; return 'Email rejected due to client IP address or a hostname'; end
match(argv1)
click to toggle source
Try to match that the given text and regular expressions @param [String] argv1 String
to be matched with regular expressions @return [True,False] false: Did not match
true: Matched
# File lib/sisimai/reason/blocked.rb, line 170 def match(argv1) return nil unless argv1 return true if argv1 =~ Regex return false end
text()
click to toggle source
# File lib/sisimai/reason/blocked.rb, line 163 def text; return 'blocked'; end
true(argvs)
click to toggle source
Blocked
due to client IP address or hostname @param [Sisimai::Data] argvs Object to be detected the reason @return [True,False] true: is blocked
false: is not blocked by the client
@see www.ietf.org/rfc/rfc2822.txt
# File lib/sisimai/reason/blocked.rb, line 181 def true(argvs) return true if argvs.reason == 'blocked' return true if Sisimai::SMTP::Status.name(argvs.deliverystatus).to_s == 'blocked' return true if match(argvs.diagnosticcode.downcase) return false end