| 1 | package Sisimai::Reason::SecurityError; | ||||||||||||
| 2 | 34 | ▶ | use v5.26; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 34 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 34 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 34 | ▶ | use Sisimai::Eb; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | 34 | ▶ | use Sisimai::String; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | |||||||||||||
| 8 | 1 | ▶ | sub text { $Sisimai::Eb::ReSAFE } | ||||||||||
|
Subroutine
text: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||
| 9 | 4 | ▶ | sub description { 'Email rejected due to security violation was detected on a destination host' } | ||||||||||
|
Subroutine
description: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 10 | 454 | ▶ | sub match { | ||||||||||
|
Subroutine
match: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||||
| 11 | # Try to match that the given text and regular expressions | ||||||||||||
| 12 | # @param [String] argv1 String to be matched with regular expressions | ||||||||||||
| 13 | # @return [Integer] 0: Did not match | ||||||||||||
| 14 | # 1: Matched | ||||||||||||
| 15 | # @since v4.0.0 | ||||||||||||
| 16 | 454 | my $class = shift; | |||||||||||
| 17 | 454 | ▶ | my $argv1 = shift // return 0; | ||||||||||
|
Condition100%2/2
shift() // (return 0)
MC/DC100%1/1
shift() // (return 0)
shift()
Truth table100%2/2
A
A= shift()
| |||||||||||||
| 18 | |||||||||||||
| 19 | 453 | state $index = [ | |||||||||||
| 20 | "account not subscribed to ses", | ||||||||||||
| 21 | "authentication credentials invalid", | ||||||||||||
| 22 | "authentication failure", | ||||||||||||
| 23 | "authentication required", | ||||||||||||
| 24 | "authentication turned on in your email client", | ||||||||||||
| 25 | "could not retrieve credentials", # OpenSMTPD/smtpd/mta.c | ||||||||||||
| 26 | "unauthenticated senders not allowed", | ||||||||||||
| 27 | "verification failure", | ||||||||||||
| 28 | "you are not authorized to send mail, authentication is required", | ||||||||||||
| 29 | "you don't authenticate or the domain isn't in my list of allowed rcpthosts", | ||||||||||||
| 30 | ]; | ||||||||||||
| 31 | 453 | state $pairs = [ | |||||||||||
| 32 | ["authentication failed; server ", " said: "], # Postfix | ||||||||||||
| 33 | ["authentification invalide", "305"], | ||||||||||||
| 34 | ["authentification requise", "402"], | ||||||||||||
| 35 | ["user ", " is not authorized to perform ses:sendrawemail on resource"], | ||||||||||||
| 36 | ]; | ||||||||||||
| 37 | |||||||||||||
| 38 | 453 | ▶ | return 1 if grep { rindex($argv1, $_) > -1 } @$index; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 39 | 441 | ▶ | return 1 if grep { Sisimai::String->aligned(\$argv1, $_) } @$pairs; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 40 | 441 | return 0; | |||||||||||
| 41 | } | ||||||||||||
| 42 | |||||||||||||
| 43 | 2 | ▶ | sub true { | ||||||||||
|
Subroutine
true: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 44 | # The bounce reason is security error or not | ||||||||||||
| 45 | # @param [Sisimai::Fact] argvs Object to be detected the reason | ||||||||||||
| 46 | # @return [Integer] 1: is security error | ||||||||||||
| 47 | # 0: is not security error | ||||||||||||
| 48 | # @see http://www.ietf.org/rfc/rfc2822.txt | ||||||||||||
| 49 | 2 | return 0; | |||||||||||
| 50 | } | ||||||||||||
| 51 | |||||||||||||
| 52 | 34 | 1; | |||||||||||
| 53 | __END__ | ||||||||||||