diff --git a/app/Livewire/Ui/Domain/Modal/DomainDnsModal.php b/app/Livewire/Ui/Domain/Modal/DomainDnsModal.php index fea3170..722be57 100644 --- a/app/Livewire/Ui/Domain/Modal/DomainDnsModal.php +++ b/app/Livewire/Ui/Domain/Modal/DomainDnsModal.php @@ -62,9 +62,13 @@ class DomainDnsModal extends ModalComponent $ipv6 = $ips['ipv6']; $this->zone = $this->extractZone($d->domain); - $mta_sub = env('MTA_SUB'); - $base = env('BASE_DOMAIN'); - $mailServerFqdn = "{$mta_sub}.{$base}"; + + // Setting::get('mail_domain') liefert den vollen MTA-FQDN (z.B. mail.example.com) + // Fallback auf config-Werte, die env() sicher kapseln + $mailDomainSetting = strtolower(trim((string) \App\Models\Setting::get('mail_domain', ''))); + $mta_sub = config('mailpool.mta_sub', 'mail'); + $base = config('mailpool.platform_zone', 'example.com'); + $mailServerFqdn = $mailDomainSetting ?: "{$mta_sub}.{$base}"; // --- Infrastruktur (global) --- $this->static = [ @@ -167,7 +171,7 @@ class DomainDnsModal extends ModalComponent // --- Komfort / Web --- [ 'type' => 'CNAME', - 'name' => env('WEBMAIL_SUB') . ".{$this->domainName}", + 'name' => (config('mailwolt.domain.webmail') ?: env('WEBMAIL_SUB', 'webmail')) . ".{$this->domainName}", 'value' => "{$mailServerFqdn}.", 'helpLabel' => 'Webmail Alias', 'helpUrl' => 'https://en.wikipedia.org/wiki/CNAME_record', diff --git a/config/mailpool.php b/config/mailpool.php index 384d613..628710a 100644 --- a/config/mailpool.php +++ b/config/mailpool.php @@ -3,6 +3,7 @@ return [ 'platform_zone' => env('BASE_DOMAIN', 'example.com'), 'platform_system_zone' => env('SYSMAIL_SUB', 'sysmail'), + 'mta_sub' => env('MTA_SUB', 'mail'), 'fixed_reserve_mb' => env('MAILPOOL_FIXED_RESERVE_MB', 2048), // 2 GB 'percent_reserve' => env('MAILPOOL_PERCENT_RESERVE', 10), // 10 %