Domain Create Modal anpassen Fehler auf Null
parent
dc9a5fdd48
commit
33abdc7c7f
|
|
@ -3,6 +3,7 @@
|
||||||
namespace App\Services;
|
namespace App\Services;
|
||||||
|
|
||||||
use App\Models\Domain;
|
use App\Models\Domain;
|
||||||
|
use Illuminate\Contracts\Console\Kernel;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
|
|
@ -77,34 +78,6 @@ class DkimService
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
// // Pfade
|
|
||||||
// $base = "dkim/{$domain->id}";
|
|
||||||
// Storage::disk('local')->makeDirectory($base);
|
|
||||||
//
|
|
||||||
// $privPath = storage_path("app/{$base}/{$selector}.key");
|
|
||||||
// $pubPath = storage_path("app/{$base}/{$selector}.pub");
|
|
||||||
//
|
|
||||||
// // openssl genrsa / rsa-privkey
|
|
||||||
// $cmd = sprintf('openssl genrsa %d > %s && openssl rsa -in %s -pubout -out %s',
|
|
||||||
// $bits, escapeshellarg($privPath), escapeshellarg($privPath), escapeshellarg($pubPath)
|
|
||||||
// );
|
|
||||||
// shell_exec($cmd);
|
|
||||||
//
|
|
||||||
// $pub = trim(file_get_contents($pubPath));
|
|
||||||
// // Public Key extrahieren → DKIM TXT
|
|
||||||
// $pub = preg_replace('/-----BEGIN PUBLIC KEY-----|-----END PUBLIC KEY-----|\s+/', '', $pub);
|
|
||||||
//
|
|
||||||
// $txt = "v=DKIM1; k=rsa; p={$pub}";
|
|
||||||
// // Domain kann hier auch den Pfad/Selector speichern:
|
|
||||||
// $domain->update([
|
|
||||||
// 'dkim_selector' => $selector,
|
|
||||||
// 'dkim_bits' => $bits,
|
|
||||||
// 'dkim_key_path' => $privPath,
|
|
||||||
// ]);
|
|
||||||
//
|
|
||||||
// return $txt;
|
|
||||||
// }
|
|
||||||
|
|
||||||
protected function safeKey($value, int $max = 64): string
|
protected function safeKey($value, int $max = 64): string
|
||||||
{
|
{
|
||||||
if (is_object($value)) {
|
if (is_object($value)) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
// config/mailpool.php
|
// config/mailpool.php
|
||||||
return [
|
return [
|
||||||
'platform_zone' => env('BASE_DOMAIN', 'example.com'),
|
'platform_zone' => env('BASE_DOMAIN', 'example.com'),
|
||||||
'platform_system_zone' => env('MAILPOOL_PLATFORM_SYSTEM_ZONE', 'sysmail'),
|
'platform_system_zone' => env('SYSMAIL_SUB', 'sysmail'),
|
||||||
|
|
||||||
'fixed_reserve_mb' => env('MAILPOOL_FIXED_RESERVE_MB', 2048), // 2 GB
|
'fixed_reserve_mb' => env('MAILPOOL_FIXED_RESERVE_MB', 2048), // 2 GB
|
||||||
'percent_reserve' => env('MAILPOOL_PERCENT_RESERVE', 15), // 15 %
|
'percent_reserve' => env('MAILPOOL_PERCENT_RESERVE', 15), // 15 %
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'base_domain' => env('BASE_DOMAIN', 'example.com'),
|
||||||
|
'sysmail_sub' => env('SYSMAIL_SUB', 'sysmail'),
|
||||||
|
'dkim_selector' => env('DKIM_SELECTOR', 'mwl1'),
|
||||||
|
];
|
||||||
|
|
@ -54,7 +54,8 @@ class SystemDomainSeeder extends Seeder
|
||||||
|
|
||||||
if (!$hasTlsa) {
|
if (!$hasTlsa) {
|
||||||
// TlsaService nutzt denselben Host aus ENV (mx.<base>) – passt zu serverFqdn.
|
// TlsaService nutzt denselben Host aus ENV (mx.<base>) – passt zu serverFqdn.
|
||||||
$tlsa = app(TlsaService::class)->refreshForServerDomain($serverDomain);
|
// $tlsa = app(TlsaService::class)->refreshForServerDomain($serverDomain);
|
||||||
|
$tlsa = app(TlsaService::class)->refreshForMx('_25._tcp');
|
||||||
if ($tlsa) {
|
if ($tlsa) {
|
||||||
$this->command->info("TLSA erstellt: _25._tcp.{$tlsa->host} 3 1 1 {$tlsa->hash}");
|
$this->command->info("TLSA erstellt: _25._tcp.{$tlsa->host} 3 1 1 {$tlsa->hash}");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue