Module: Sisimai::Reason::MailerError

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

Overview

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

This is the error that a mailer program has not exited successfully or exited unexpectedly on a destination mail server.

X-Actual-Recipient: X-Unix; |/home/kijitora/mail/catch.php
Diagnostic-Code: X-Unix; 255

Constant Summary collapse

Index =
[
  ' || exit ',
  'procmail: ',
  'bin/procmail',
  'bin/maidrop',
  'command failed: ',
  'command died with status ',
  'command output:',
  'mailer error',
  'pipe to |/',
  'x-unix; ',
].freeze

Class Method Summary collapse

Class Method Details

.descriptionObject



27
# File 'lib/sisimai/reason/mailererror.rb', line 27

def description; return 'Email returned due to a mailer program has not exited successfully'; 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



32
33
34
35
36
# File 'lib/sisimai/reason/mailererror.rb', line 32

def match(argv1)
  return false if argv1.nil? || argv1.empty?
  return true  if Index.any? { |a| argv1.include?(a) }
  return false
end

.textObject



26
# File 'lib/sisimai/reason/mailererror.rb', line 26

def text; return 'mailererror'; end

.true(_argvs) ⇒ Boolean

The bounce reason is mailer error or not

Parameters:

Returns:

  • (Boolean)

    true: is mailer error false: is not mailer error

See Also:



43
# File 'lib/sisimai/reason/mailererror.rb', line 43

def true(_argvs); return false; end