diff --git a/app/Services/DkimService.php b/app/Services/DkimService.php index 538374c..5c529a0 100644 --- a/app/Services/DkimService.php +++ b/app/Services/DkimService.php @@ -3,6 +3,7 @@ namespace App\Services; use App\Models\Domain; +use Illuminate\Contracts\Console\Kernel; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Storage; 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 { if (is_object($value)) { diff --git a/config/mailpool.php b/config/mailpool.php index 4bfbb6b..97314e0 100644 --- a/config/mailpool.php +++ b/config/mailpool.php @@ -2,7 +2,7 @@ // config/mailpool.php return [ '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 'percent_reserve' => env('MAILPOOL_PERCENT_RESERVE', 15), // 15 % diff --git a/config/mailwolt.php b/config/mailwolt.php new file mode 100644 index 0000000..a946d15 --- /dev/null +++ b/config/mailwolt.php @@ -0,0 +1,7 @@ + env('BASE_DOMAIN', 'example.com'), + 'sysmail_sub' => env('SYSMAIL_SUB', 'sysmail'), + 'dkim_selector' => env('DKIM_SELECTOR', 'mwl1'), +]; diff --git a/database/seeders/SystemDomainSeeder.php b/database/seeders/SystemDomainSeeder.php index b93ab58..aa76af9 100644 --- a/database/seeders/SystemDomainSeeder.php +++ b/database/seeders/SystemDomainSeeder.php @@ -54,7 +54,8 @@ class SystemDomainSeeder extends Seeder if (!$hasTlsa) { // TlsaService nutzt denselben Host aus ENV (mx.) – passt zu serverFqdn. - $tlsa = app(TlsaService::class)->refreshForServerDomain($serverDomain); +// $tlsa = app(TlsaService::class)->refreshForServerDomain($serverDomain); + $tlsa = app(TlsaService::class)->refreshForMx('_25._tcp'); if ($tlsa) { $this->command->info("TLSA erstellt: _25._tcp.{$tlsa->host} 3 1 1 {$tlsa->hash}"); } else {