Domain Create Modal anpassen Fehler auf Null

main
boban 2025-10-17 21:10:49 +02:00
parent dc9a5fdd48
commit 33abdc7c7f
4 changed files with 11 additions and 30 deletions

View File

@ -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)) {

View File

@ -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 %

7
config/mailwolt.php Normal file
View File

@ -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'),
];

View File

@ -54,7 +54,8 @@ class SystemDomainSeeder extends Seeder
if (!$hasTlsa) {
// 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) {
$this->command->info("TLSA erstellt: _25._tcp.{$tlsa->host} 3 1 1 {$tlsa->hash}");
} else {