Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
bobimicroweber committed Oct 3, 2024
1 parent 7326062 commit 371619c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions web/Modules/Email/App/Http/Livewire/DkimSetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public function render()
'secure' => $secure,
'verify' => $verify,
'mainDomain' => $mainDomain,
'serverIp' => $_SERVER['SERVER_ADDR'],
]);
}

Expand Down
7 changes: 6 additions & 1 deletion web/Modules/Email/DkimDomainSetup.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ public static function run($domain)
$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,
];
}

Expand All @@ -25,6 +29,7 @@ public static function run($domain)

$dkimPrivateKey = file_get_contents($dkimPrivateKeyFile);
$dkimText = file_get_contents($dkimTextFile);
$dkimText = str_replace("\r\n", "\n", $dkimText);

return [
'privateKey' => $dkimPrivateKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<div class="w-full mt-2">
<textarea rows="10" class="w-full p-4 rounded-md border-2 border-gray-100">
{{ $secure['text'] }}
{{ $secure['text'] }}
</textarea>
</div>

Expand Down Expand Up @@ -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">
Expand Down

0 comments on commit 371619c

Please sign in to comment.