Module: Sisimai::Reason::HasMoved
- Defined in:
- lib/sisimai/reason/hasmoved.rb
Overview
Sisimai::Reason::HasMoved checks the bounce reason is "HasMoved" or not. This class is called only Sisimai::Reason class.
This is the error that a user's mailbox has moved (and is not forwarded automatically). Sisimai will set "HasMoved" to the reason of email bounce if the value of Status: field in a bounce email is "5.1.6".
Constant Summary collapse
- Index =
[' has been replaced by '].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 address has moved or not.
Class Method Details
.description ⇒ Object
15 |
# File 'lib/sisimai/reason/hasmoved.rb', line 15 def description; return "Email rejected due to user's mailbox has moved and is not forwarded automatically"; end |
.match(argv1) ⇒ Boolean
Try to match that the given text and regular expressions
20 21 22 23 24 |
# File 'lib/sisimai/reason/hasmoved.rb', line 20 def match(argv1) return false if argv1.nil? || argv1.empty? return true if Index.any? { |a| argv1.include?(a) } return false end |
.text ⇒ Object
14 |
# File 'lib/sisimai/reason/hasmoved.rb', line 14 def text; return Sisimai::Eb::ReMOVE; end |
.true(argvs) ⇒ Boolean
Whether the address has moved or not
31 32 33 34 35 |
# File 'lib/sisimai/reason/hasmoved.rb', line 31 def true(argvs) return true if argvs['reason'] == Sisimai::Eb::ReMOVE return false if Sisimai::SMTP::Command::BeforeRCPT.include?(argvs['command']) return match(argvs['diagnosticcode'].downcase) end |