Module: Sisimai::Reason::SystemError

Defined in:
lib/sisimai/reason/systemerror.rb

Overview

Sisimai::Reason::SystemError checks the bounce reason is "SystemError" or not. This class is called only Sisimai::Reason class. This is the error that an email has bounced due to system error on the remote host such as LDAP connection failure or other internal system error.

<kijitora@example.net>:
Unable to contact LDAP server. (#4.4.3)I'm not going to try again; this
message has been in the queue too long.

Constant Summary collapse

Index =
[
  "aliasing/forwarding loop broken",
  "automatic homedir creator crashed", # qmail-ldap-1.03-20040101.patch:19817 - 19866
  "can't create user output file",
  "cannot send e-mail to yourself",
  "could not load ",
  "delivery to file forbidden", # Exim/deliver.c:5614
  "delivery to pipe forbidden", # Exim/deliver.c:5624
  "input/output error",
  "interrupted system call",
  "it encountered an error while being processed",
  "it would create a mail loop",
  "ldap attribute",        # qmail-ldap-1.03-20040101.patch:19817 - 19866
  "ldap lookup",           # qmail-ldap-1.03-20040101.patch:19817 - 19866
  "ldap server",           # qmail-ldap-1.03-20040101.patch:19817 - 19866
  "lmtp error after ",     # Exim/transports/lmtp.c:186
  "local delivery failed", # Exim/transports/pipe.c:1156
  "loop back warning:",    # FML
  "loop was found in the mail exchanger",
  "loops back to myself",
  "mail transport unavailable",
  "may cause mail loop",   # FML
  "no such file or directory",
  "error while executing qmail-forward", # qmail-ldap-1.03-20040101.patch:19817 - 19866
  "queue file write error",
  "recipient deferred because there is no mdb",
  "remote server is misconfigured",
  "service currently unavailable",
  "several matches found in domino directory", # Donimo
  "temporary local problem",
  "timeout waiting for input",
  "too many results returned but needs to be unique", # qmail-ldap-1.03-20040101.patch:19817 - 19866
  "transaction failed ",
].freeze
Pairs =
[
  ["config", " error"],
  ["fml ", "has detected a loop condition so that"], # FML
  ["internal ", "error"],
  ["local ", "error"],
  ["proxy", "broken pipe"],
  ["unable to connect ", "daemon"],
].freeze

Class Method Summary collapse

Class Method Details

.descriptionObject



57
# File 'lib/sisimai/reason/systemerror.rb', line 57

def description; return 'Email returned due to system error on the remote host'; end

.match(argv1) ⇒ Boolean

Try to match that the given text and regular expressions

Parameters:

  • argv1 (String)

    String to be matched with regular expressions

Returns:

  • (Boolean)

    false: Did not match, true: Matched



62
63
64
65
66
67
# File 'lib/sisimai/reason/systemerror.rb', line 62

def match(argv1)
  return false if argv1.nil? || argv1.empty?
  return true  if Index.any? { |a| argv1.include?(a) }
  return true  if Pairs.any? { |a| Sisimai::String.aligned(argv1, a) }
  return false
end

.textObject



56
# File 'lib/sisimai/reason/systemerror.rb', line 56

def text; return Sisimai::Eb::RePROC; end

.true(_argvs) ⇒ Boolean

The bounce reason is system error or not

Parameters:

Returns:

  • (Boolean)

    true: is system error false: is not system error

See Also:



74
# File 'lib/sisimai/reason/systemerror.rb', line 74

def true(_argvs); return false; end