This commit is contained in:
Bozhidar 2024-10-03 13:07:23 +03:00
parent 732606270a
commit 371619c6d3
3 changed files with 11 additions and 5 deletions

View file

@ -21,6 +21,7 @@ class DkimSetup extends Component
'secure' => $secure,
'verify' => $verify,
'mainDomain' => $mainDomain,
'serverIp' => $_SERVER['SERVER_ADDR'],
]);
}

View file

@ -11,9 +11,13 @@ class DkimDomainSetup
$dkimTextFile = '/etc/opendkim/keys/'.$domain.'/mail.txt';
if (is_file($dkimPrivateKeyFile)) {
$dkimText = file_get_contents($dkimTextFile);
$dkimText = str_replace("\r\n", "\n", $dkimText);
return [
'privateKey' => file_get_contents($dkimPrivateKeyFile),
'text' => file_get_contents($dkimTextFile),
'text' => $dkimText,
];
}
@ -25,6 +29,7 @@ class DkimDomainSetup
$dkimPrivateKey = file_get_contents($dkimPrivateKeyFile);
$dkimText = file_get_contents($dkimTextFile);
$dkimText = str_replace("\r\n", "\n", $dkimText);
return [
'privateKey' => $dkimPrivateKey,

View file

@ -39,15 +39,15 @@
@endif
<div>
You do not have a DMARC record, please add a TXT record to your domain _dmarc.{{$mainDomain}} with the following value:
Please add DMARC TXT record to your domain _dmarc.{{$mainDomain}} with the following value:
<br />
v=DMARC1; p=none
</div>
<div>
You do not have a SPF record, please add the following one to your domain {{$mainDomain}}:
Please add SPF record to your domain {{$mainDomain}}:
<br />
v=spf1 a mx ip4:91.107.217.103 ~all
v=spf1 a mx ip4:{{$serverIp}} ~all
</div>
<x-filament::button wire:click="verify">