mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-25 09:00:27 +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()
|
public function render()
|
||||||
{
|
{
|
||||||
$secure = $this->secure();
|
$secure = $this->secure();
|
||||||
|
$verify = $this->verify();
|
||||||
|
|
||||||
return view('email::livewire.dkim-setup', [
|
return view('email::livewire.dkim-setup', [
|
||||||
'secure' => $secure,
|
'secure' => $secure,
|
||||||
|
'verify' => $verify,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +39,8 @@ class DkimSetup extends Component
|
||||||
$checks[] = [
|
$checks[] = [
|
||||||
'check' => 'MX',
|
'check' => 'MX',
|
||||||
'pass' => $checkOnePass,
|
'pass' => $checkOnePass,
|
||||||
'result'=>$checkOne
|
'result'=>$checkOne,
|
||||||
|
'must'=>'10 '.$this->domain
|
||||||
];
|
];
|
||||||
|
|
||||||
$checkTwo = shell_exec('dig @1.1.1.1 +short A '.$this->domain);
|
$checkTwo = shell_exec('dig @1.1.1.1 +short A '.$this->domain);
|
||||||
|
@ -50,7 +53,8 @@ class DkimSetup extends Component
|
||||||
$checks[] = [
|
$checks[] = [
|
||||||
'check'=>'IP',
|
'check'=>'IP',
|
||||||
'pass'=>$checkTwoPass,
|
'pass'=>$checkTwoPass,
|
||||||
'result'=>$checkTwo
|
'result'=>$checkTwo,
|
||||||
|
'must'=>$getIpOfDomain
|
||||||
];
|
];
|
||||||
|
|
||||||
$checkThree = shell_exec('dig @1.1.1.1 +short -x ' . $getIpOfDomain);
|
$checkThree = shell_exec('dig @1.1.1.1 +short -x ' . $getIpOfDomain);
|
||||||
|
@ -62,10 +66,14 @@ class DkimSetup extends Component
|
||||||
$checks[] = [
|
$checks[] = [
|
||||||
'check'=>'Reverse DNS',
|
'check'=>'Reverse DNS',
|
||||||
'pass'=>$checkTreePass,
|
'pass'=>$checkTreePass,
|
||||||
'result'=>$checkThree
|
'result'=>$checkThree,
|
||||||
|
'must'=>$this->domain
|
||||||
];
|
];
|
||||||
|
|
||||||
return $checks;
|
return [
|
||||||
|
'checks' => $checks,
|
||||||
|
'pass' => $checkOnePass && $checkTwoPass && $checkTreePass,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function secure()
|
public function secure()
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<div>
|
||||||
<div>
|
<div>
|
||||||
@if(isset($secure['text']))
|
@if(isset($secure['text']))
|
||||||
|
|
||||||
|
@ -11,9 +12,36 @@
|
||||||
</textarea>
|
</textarea>
|
||||||
</div>
|
</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">
|
<x-filament::button wire:click="verify">
|
||||||
Check DNS Record
|
Check DNS Record
|
||||||
</x-filament::button>
|
</x-filament::button>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue