Fix: SystemDomainSeeder läuft beim Installer-Abschluss, nicht in den Settings

sysmail.<MTA_FQDN> wird jetzt automatisch beim Ende einer erfolgreichen Installation
angelegt – nicht nachträglich beim Speichern der Domain-Einstellungen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main v1.1.366
boban 2026-04-26 23:27:52 +02:00
parent eb17d056b7
commit 2c82555235
2 changed files with 1 additions and 19 deletions

View File

@ -106,6 +106,7 @@ class InstallerPage extends Component
if ($this->rc === 0 && !$this->postActionsDone) {
@shell_exec('nohup php /var/www/mailwolt/artisan health:collect >/dev/null 2>&1 &');
@shell_exec('nohup php /var/www/mailwolt/artisan db:seed --class="Database\\\\Seeders\\\\SystemDomainSeeder" --force >/dev/null 2>&1 &');
$this->postActionsDone = true;
$this->dispatch('toast', type: 'done', badge: 'Installer',

View File

@ -199,25 +199,6 @@ class SettingsForm extends Component
$this->applyDomains(false);
}
// System-Domain (sysmail.<MAIL_DOMAIN>) provisionieren, falls noch nicht vorhanden
$platformBase = config('mailpool.platform_zone', env('BASE_DOMAIN', ''));
if ($platformBase && $platformBase !== 'example.com') {
$mtaSub = strtolower(env('MTA_SUB', 'mx') ?: 'mx');
$systemSub = strtolower(config('mailpool.platform_system_zone', 'sysmail'));
$serverFqdn = strtolower("{$mtaSub}.{$platformBase}");
$systemFqdn = strtolower("{$systemSub}.{$serverFqdn}");
if (!\App\Models\Domain::where('domain', $systemFqdn)->exists()) {
try {
Artisan::call('db:seed', [
'--class' => 'Database\\Seeders\\SystemDomainSeeder',
'--force' => true,
]);
} catch (\Throwable $e) {
\Illuminate\Support\Facades\Log::error('SystemDomainSeeder failed', ['error' => $e->getMessage()]);
}
}
}
$this->loadSslStatus();
$this->dispatch('toast', type: 'done', badge: 'Domains',