Module: Sisimai::Reason::PolicyViolation
- Defined in:
- lib/sisimai/reason/policyviolation.rb
Overview
Sisimai::Reason::PolicyViolation checks the bounce reason is "PolicyViolation" or not. This class is called only Sisimai::Reason class.
This is the error that a policy violation was detected on a destination mail host. When a header content or a format of the original message violates security policies, or multiple addresses exist in the From: header, Sisimai will set "PolicyViolation".
Status: 5.7.0
Remote-MTA: DNS; gmail-smtp-in.l.google.com
Diagnostic-Code: SMTP; 552-5.7.0 Our system detected an illegal attachment on your message. Please
Last-Attempt-Date: Tue, 28 Apr 2009 11:02:45 +0900 (JST)
Constant Summary collapse
- Index =
[ "because the recipient is not accepting mail with ", # AOL Phoenix "closed mailing list", "delivery not authorized, message refused", "denied by policy", # http://kb.mimecast.com/Mimecast_Knowledge_Base/Administration_Console/Monitoring/Mimecast_SMTP_Error_Codes#554 "email rejected due to security policies", "for policy reasons", "local policy violation", "message bounced due to organizational settings", "message given low priority", "message was rejected by organization policy", "protocol violation", "support.google.com/a/answer/172179", "you're using a mass mailer", ].freeze
Class Method Summary collapse
- .description ⇒ Object
-
.match(argv1) ⇒ Boolean
Try to match that the given text and regular expressions.
- .text ⇒ Object
-
.true(argvs) ⇒ Boolean
The bounce reason is "PolicyViolation" or not.
Class Method Details
.description ⇒ Object
36 |
# File 'lib/sisimai/reason/policyviolation.rb', line 36 def description; return 'Email rejected due to policy violation on a destination host'; end |
.match(argv1) ⇒ Boolean
Try to match that the given text and regular expressions
42 43 44 45 46 |
# File 'lib/sisimai/reason/policyviolation.rb', line 42 def match(argv1) return false if argv1.nil? || argv1.empty? return true if Index.any? { |a| argv1.include?(a) } return false end |
.text ⇒ Object
35 |
# File 'lib/sisimai/reason/policyviolation.rb', line 35 def text; return Sisimai::Eb::ReWONT; end |
.true(argvs) ⇒ Boolean
The bounce reason is "PolicyViolation" or not
54 55 56 57 58 |
# File 'lib/sisimai/reason/policyviolation.rb', line 54 def true(argvs) return true if argvs['reason'] == Sisimai::Eb::ReWONT return false if argvs['command'] != '' && argvs['command'] != Sisimai::Eb::CeDATA return match(argvs['diagnosticcode'].downcase) end |