| 1 | package Sisimai::Reason::AuthFailure; | ||||||||||||||||||||
| 2 | 67 | ▶ | use v5.26; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 67 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 67 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 67 | ▶ | use Sisimai::Eb; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | 67 | ▶ | use Sisimai::String; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 43 | ▶ | sub text { $Sisimai::Eb::ReAUTH } | ||||||||||||||||||
|
Subroutine
text: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 9 | 4 | ▶ | sub description { 'Email rejected due to SPF, DKIM, DMARC failure' } | ||||||||||||||||||
|
Subroutine
description: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 10 | 2137 | ▶ | 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 v5.0.0 | ||||||||||||||||||||
| 16 | 2137 | my $class = shift; | |||||||||||||||||||
| 17 | 2137 | ▶ | 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 | 2136 | state $index = [ | |||||||||||||||||||
| 20 | "//spf.pobox.com", | ||||||||||||||||||||
| 21 | "5322.From address doesn't meet the authentication requirements", | ||||||||||||||||||||
| 22 | "bad spf records for", | ||||||||||||||||||||
| 23 | "dmarc policy", | ||||||||||||||||||||
| 24 | "doesn't meet the required authentication level", | ||||||||||||||||||||
| 25 | "please inspect your spf settings", | ||||||||||||||||||||
| 26 | "rejected due to dmarc", # comcast.net | ||||||||||||||||||||
| 27 | "sender policy framework", | ||||||||||||||||||||
| 28 | "spf check: fail", | ||||||||||||||||||||
| 29 | ]; | ||||||||||||||||||||
| 30 | 2136 | state $pairs = [ | |||||||||||||||||||
| 31 | ["spf: ", " is not allowed to send "], | ||||||||||||||||||||
| 32 | ["is not allowed to send ", " spf "], | ||||||||||||||||||||
| 33 | ]; | ||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | 2136 | ▶ | return 1 if grep { rindex($argv1, $_) > -1 } @$index; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 36 | 2111 | ▶ | return 1 if grep { Sisimai::String->aligned(\$argv1, $_) } @$pairs; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 37 | 2109 | return 0; | |||||||||||||||||||
| 38 | } | ||||||||||||||||||||
| 39 | |||||||||||||||||||||
| 40 | 2079 | ▶ | sub true { | ||||||||||||||||||
|
Subroutine
true: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||||||||||
| 41 | # The bounce reason is "AuthFailure" or not | ||||||||||||||||||||
| 42 | # @param [Sisimai::Fact] argvs Object to be detected the reason | ||||||||||||||||||||
| 43 | # @return [Integer] 1: is AuthFailure | ||||||||||||||||||||
| 44 | # 0: is not AuthFailure | ||||||||||||||||||||
| 45 | # @see http://www.ietf.org/rfc/rfc2822.txt | ||||||||||||||||||||
| 46 | # @since v5.0.0 | ||||||||||||||||||||
| 47 | 2079 | my $class = shift; | |||||||||||||||||||
| 48 | 2079 | ▶ | my $argvs = shift // return 0; | ||||||||||||||||||
|
Condition100%2/2
shift() // (return 0)
MC/DC100%1/1
shift() // (return 0)
shift()
Truth table100%2/2
A
A= shift()
| |||||||||||||||||||||
| 49 | |||||||||||||||||||||
| 50 | 2078 | ▶ | return 1 if $argvs->{'reason'} eq $Sisimai::Eb::ReAUTH; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 51 | 2077 | ▶ | return 1 if (Sisimai::SMTP::Status->name($argvs->{'deliverystatus'}) || '') eq $Sisimai::Eb::ReAUTH; | ||||||||||||||||||
|
Branch: 1 branch
Condition100%2/2
'Sisimai::SMTP::Status'->name($argvs->{'deliverystatus'}) || ''
MC/DC100%1/1
'Sisimai::SMTP::Status'->name($argvs->{'deliverystatus'}) || ''
'Sisimai::SMTP::Status'->name($argvs->{'deliverystatus'})
Truth table100%2/2
A
A= 'Sisimai::SMTP::Status'->name($argvs->{'deliverystatus'})
| |||||||||||||||||||||
| 52 | 2057 | return __PACKAGE__->match(lc $argvs->{'diagnosticcode'}); | |||||||||||||||||||
| 53 | } | ||||||||||||||||||||
| 54 | |||||||||||||||||||||
| 55 | 67 | 1; | |||||||||||||||||||
| 56 | __END__ | ||||||||||||||||||||