module Sisimai::Reason::SpamDetected
Sisimai::Reason::SpamDetected
checks the bounce reason is “spamdetected” due to Spam content in the message or not. This class is called only Sisimai::Reason
class.
This is the error that the message you sent was rejected by “spam filter” which is running on the remote host. This reason has added in Sisimai
4.1.25 and does not exist in any version of bounceHammer.
Action: failed Status: 5.7.1 Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, UBE, id=00000-00-000 Last-Attempt-Date: Thu, 9 Apr 2008 23:34:45 +0900 (JST)
Constants
- Regex
Public Class Methods
description()
click to toggle source
# File lib/sisimai/reason/spamdetected.rb, line 147 def description; return 'Email rejected by spam filter running on the remote host'; 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/spamdetected.rb, line 153 def match(argv1) return nil unless argv1 return true if argv1 =~ Regex return false end
text()
click to toggle source
# File lib/sisimai/reason/spamdetected.rb, line 146 def text; return 'spamdetected'; end
true(argvs)
click to toggle source
Rejected
due to spam content in the message @param [Sisimai::Data] argvs Object to be detected the reason @return [True,False] true: rejected due to spam
false: is not rejected due to spam
@see www.ietf.org/rfc/rfc2822.txt
# File lib/sisimai/reason/spamdetected.rb, line 164 def true(argvs) return nil if argvs.deliverystatus.empty? return true if argvs.reason == 'spamdetected' return true if Sisimai::SMTP::Status.name(argvs.deliverystatus).to_s == 'spamdetected' return true if match(argvs.diagnosticcode.downcase) return false end