module Sisimai::Reason::SyntaxError

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

This is the error that a destination mail server could not recognize SMTP command which is sent from a sender's MTA. Sisimai will set “syntaxerror” to the reason if the value of “replycode” begins with “50” such as 502, or 503.

Action: failed
Status: 5.5.0
Diagnostic-Code: SMTP; 503 Improper sequence of commands

Public Class Methods

description() click to toggle source
# File lib/sisimai/reason/syntaxerror.rb, line 18
def description; return 'Email rejected due to syntax error at sent commands in SMTP session'; end
match(*) click to toggle source
# File lib/sisimai/reason/syntaxerror.rb, line 19
def match(*); return nil; end
text() click to toggle source
# File lib/sisimai/reason/syntaxerror.rb, line 17
def text; return 'syntaxerror'; end
true(argvs) click to toggle source

Connection rejected due to syntax error or not @param [Sisimai::Data] argvs Object to be detected the reason @return [True,False] true: Connection rejected due to

      syntax error
false: is not syntax error

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

# File lib/sisimai/reason/syntaxerror.rb, line 28
def true(argvs)
  return true if argvs.reason == 'syntaxerror'
  return true if argvs.replycode =~ /\A[45]0[0-7]\z/
  return false
end