Module: Sisimai::Rhost::Aol

Defined in:
lib/sisimai/rhost/aol.rb

Overview

Sisimai::Rhost detects the bounce reason from the content of Sisimai::Fact object as an argument of find() method when the value of “rhost” of the object is “*.aol.com”. This class is called only from Sisimai::Fact class.

Constant Summary collapse

MessagesOf =
{
  "hostunknown" => ["Host or domain name not found"],
  "notaccept"   => ["type=MX: Malformed or unexpected name server reply"],
}.freeze

Class Method Summary collapse

Class Method Details

.find(argvs) ⇒ String

Detect bounce reason from Aol Mail: www.aol.com

Parameters:

Returns:

  • (String)

    The bounce reason for Aol

See Also:

Since:

  • v5.2.0



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/sisimai/rhost/aol.rb', line 20

def find(argvs)
  return "" if argvs["diagnosticcode"].empty?
  issuedcode = argvs["diagnosticcode"]
  reasontext = ""

  MessagesOf.each_key do |e|
    # Try to match the error message with message patterns defined in $MessagesOf
    next if MessagesOf[e].none? { |a| issuedcode.include?(a) }
    reasontext = e
    break
  end

  return reasontext
end