mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
update
This commit is contained in:
parent
55b8d6e356
commit
e9ec04b654
2 changed files with 40 additions and 4 deletions
|
@ -12,9 +12,11 @@ class DkimSetup extends Component
|
|||
public function render()
|
||||
{
|
||||
$secure = $this->secure();
|
||||
$verify = $this->verify();
|
||||
|
||||
return view('email::livewire.dkim-setup', [
|
||||
'secure' => $secure,
|
||||
'verify' => $verify,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -37,7 +39,8 @@ class DkimSetup extends Component
|
|||
$checks[] = [
|
||||
'check' => 'MX',
|
||||
'pass' => $checkOnePass,
|
||||
'result'=>$checkOne
|
||||
'result'=>$checkOne,
|
||||
'must'=>'10 '.$this->domain
|
||||
];
|
||||
|
||||
$checkTwo = shell_exec('dig @1.1.1.1 +short A '.$this->domain);
|
||||
|
@ -50,7 +53,8 @@ class DkimSetup extends Component
|
|||
$checks[] = [
|
||||
'check'=>'IP',
|
||||
'pass'=>$checkTwoPass,
|
||||
'result'=>$checkTwo
|
||||
'result'=>$checkTwo,
|
||||
'must'=>$getIpOfDomain
|
||||
];
|
||||
|
||||
$checkThree = shell_exec('dig @1.1.1.1 +short -x ' . $getIpOfDomain);
|
||||
|
@ -62,10 +66,14 @@ class DkimSetup extends Component
|
|||
$checks[] = [
|
||||
'check'=>'Reverse DNS',
|
||||
'pass'=>$checkTreePass,
|
||||
'result'=>$checkThree
|
||||
'result'=>$checkThree,
|
||||
'must'=>$this->domain
|
||||
];
|
||||
|
||||
return $checks;
|
||||
return [
|
||||
'checks' => $checks,
|
||||
'pass' => $checkOnePass && $checkTwoPass && $checkTreePass,
|
||||
];
|
||||
}
|
||||
|
||||
public function secure()
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<div>
|
||||
<div>
|
||||
@if(isset($secure['text']))
|
||||
|
||||
|
@ -11,9 +12,36 @@
|
|||
</textarea>
|
||||
</div>
|
||||
|
||||
@if($verify && !empty($verify))
|
||||
<div>
|
||||
<div class="w-full p-2">
|
||||
Verification Results:
|
||||
@if ($verify['pass'])
|
||||
<span class="text-green">Pass</span>
|
||||
@else
|
||||
<span class="text-red">Fail</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@foreach($verify['checks'] as $v)
|
||||
@php
|
||||
if ($v['pass']) {
|
||||
continue;
|
||||
}
|
||||
@endphp
|
||||
<div class="w-full p-2">
|
||||
Check: {{ $v['check'] }} <br />
|
||||
Pass: {{ $v['pass'] ? 'Yes' : 'No' }} <br />
|
||||
Result: {{ $v['result'] }} <br />
|
||||
Return result must be: {{ $v['must'] }}
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
<x-filament::button wire:click="verify">
|
||||
Check DNS Record
|
||||
</x-filament::button>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue