module Sisimai::Reason::NotAccept

Sisimai::Reason::NotAccept checks the bounce reason is “notaccept” or not. This class is called only Sisimai::Reason class.

This is the error that a destination mail server does ( or can ) not accept any email. In many case, the server is high load or under the maintenance. Sisimai will set “notaccept” to the reason of email bounce if the value of Status: field in a bounce email is “5.3.2” or the value of SMTP reply code is 556.

Constants

Index

Destination mail server does not accept any message

Public Class Methods

description() click to toggle source
# File lib/sisimai/reason/notaccept.rb, line 25
def description; return 'Delivery failed due to a destination mail server does not accept any email'; 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/notaccept.rb, line 31
def match(argv1)
  return nil unless argv1
  return true if Index.any? { |a| argv1.include?(a) }
  return false
end
text() click to toggle source
# File lib/sisimai/reason/notaccept.rb, line 24
def text; return 'notaccept'; end
true(argvs) click to toggle source

Remote host does not accept any message @param [Sisimai::Data] argvs Object to be detected the reason @return [True,False] true: Not accept

false: Accept

@see www.ietf.org/rfc/rfc2822.txt

# File lib/sisimai/reason/notaccept.rb, line 42
def true(argvs)
  return true if argvs.reason == 'notaccept'

  # SMTP Reply Code is 554 or 556
  return true if [521, 554, 556].index(argvs.replycode.to_i)
  return false if argvs.smtpcommand == 'MAIL'
  return true if match(argvs.diagnosticcode.downcase)
  return false
end