File tree Expand file tree Collapse file tree 2 files changed +40
-4
lines changed Expand file tree Collapse file tree 2 files changed +40
-4
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,11 @@ class DkimSetup extends Component
12
12
public function render ()
13
13
{
14
14
$ secure = $ this ->secure ();
15
+ $ verify = $ this ->verify ();
15
16
16
17
return view ('email::livewire.dkim-setup ' , [
17
18
'secure ' => $ secure ,
19
+ 'verify ' => $ verify ,
18
20
]);
19
21
}
20
22
@@ -37,7 +39,8 @@ public function verify()
37
39
$ checks [] = [
38
40
'check ' => 'MX ' ,
39
41
'pass ' => $ checkOnePass ,
40
- 'result ' =>$ checkOne
42
+ 'result ' =>$ checkOne ,
43
+ 'must ' =>'10 ' .$ this ->domain
41
44
];
42
45
43
46
$ checkTwo = shell_exec ('dig @1.1.1.1 +short A ' .$ this ->domain );
@@ -50,7 +53,8 @@ public function verify()
50
53
$ checks [] = [
51
54
'check ' =>'IP ' ,
52
55
'pass ' =>$ checkTwoPass ,
53
- 'result ' =>$ checkTwo
56
+ 'result ' =>$ checkTwo ,
57
+ 'must ' =>$ getIpOfDomain
54
58
];
55
59
56
60
$ checkThree = shell_exec ('dig @1.1.1.1 +short -x ' . $ getIpOfDomain );
@@ -62,10 +66,14 @@ public function verify()
62
66
$ checks [] = [
63
67
'check ' =>'Reverse DNS ' ,
64
68
'pass ' =>$ checkTreePass ,
65
- 'result ' =>$ checkThree
69
+ 'result ' =>$ checkThree ,
70
+ 'must ' =>$ this ->domain
66
71
];
67
72
68
- return $ checks ;
73
+ return [
74
+ 'checks ' => $ checks ,
75
+ 'pass ' => $ checkOnePass && $ checkTwoPass && $ checkTreePass ,
76
+ ];
69
77
}
70
78
71
79
public function secure ()
Original file line number Diff line number Diff line change
1
+ <div >
1
2
<div >
2
3
@if (isset ($secure [' text' ]) )
3
4
11
12
</textarea >
12
13
</div >
13
14
15
+ @if ($verify && ! empty ($verify ) )
16
+ <div >
17
+ <div class =" w-full p-2" >
18
+ Verification Results:
19
+ @if ($verify [' pass' ] )
20
+ <span class =" text-green" >Pass</span >
21
+ @else
22
+ <span class =" text-red" >Fail</span >
23
+ @endif
24
+ </div >
25
+ </div >
26
+ @foreach ($verify [' checks' ] as $v )
27
+ @php
28
+ if ($v [' pass' ]) {
29
+ continue ;
30
+ }
31
+ @endphp
32
+ <div class =" w-full p-2" >
33
+ Check: {{ $v [' check' ] } } <br />
34
+ Pass: {{ $v [' pass' ] ? ' Yes' : ' No' } } <br />
35
+ Result: {{ $v [' result' ] } } <br />
36
+ Return result must be: {{ $v [' must' ] } }
37
+ </div >
38
+ @endforeach
39
+ @endif
40
+
14
41
<x-filament::button wire:click =" verify" >
15
42
Check DNS Record
16
43
</x-filament::button >
17
44
18
45
@endif
19
46
</div >
47
+ </div >
You can’t perform that action at this time.
0 commit comments