Feat: Benachrichtigungs-Einstellungen + sysmail.BASE_DOMAIN zurückgesetzt
- Absendername und Admin-E-Mail konfigurierbar in Einstellungen - MAIL_FROM_NAME wird automatisch in .env synchronisiert - Sysmail-Domain wieder sysmail.<BASE_DOMAIN> (nicht MTA-FQDN) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main v1.1.368
parent
496912f5ca
commit
c6d6798898
|
|
@ -29,6 +29,10 @@ class SettingsForm extends Component
|
|||
|
||||
private const SSL_STATE_DIR = '/var/lib/mailwolt/wizard';
|
||||
|
||||
// Benachrichtigungen
|
||||
public string $notify_sender_name = 'System Alert';
|
||||
public string $notify_admin_email = '';
|
||||
|
||||
// Sicherheit
|
||||
public int $rate_limit = 5;
|
||||
public int $password_min = 10;
|
||||
|
|
@ -52,8 +56,10 @@ class SettingsForm extends Component
|
|||
'locale' => 'required|string|max:10',
|
||||
'timezone' => 'required|string|max:64',
|
||||
'session_timeout' => 'required|integer|min:5|max:1440',
|
||||
'rate_limit' => 'required|integer|min:1|max:100',
|
||||
'password_min' => 'required|integer|min:6|max:128',
|
||||
'notify_sender_name' => 'nullable|string|max:80',
|
||||
'notify_admin_email' => 'nullable|email|max:190',
|
||||
'rate_limit' => 'required|integer|min:1|max:100',
|
||||
'password_min' => 'required|integer|min:6|max:128',
|
||||
'backup_enabled' => 'boolean',
|
||||
'backup_preset' => 'required|in:hourly,daily,weekly,monthly,custom',
|
||||
'backup_time' => 'required_unless:backup_preset,hourly,custom|regex:/^\d{1,2}:\d{2}$/',
|
||||
|
|
@ -129,8 +135,10 @@ class SettingsForm extends Component
|
|||
}
|
||||
|
||||
$this->loadSslStatus();
|
||||
$this->rate_limit = (int) Setting::get('rate_limit', $this->rate_limit);
|
||||
$this->password_min = (int) Setting::get('password_min', $this->password_min);
|
||||
$this->notify_sender_name = (string) Setting::get('notify_sender_name', $this->notify_sender_name);
|
||||
$this->notify_admin_email = (string) Setting::get('notify_admin_email', $this->notify_admin_email);
|
||||
$this->rate_limit = (int) Setting::get('rate_limit', $this->rate_limit);
|
||||
$this->password_min = (int) Setting::get('password_min', $this->password_min);
|
||||
|
||||
// Backup aus BackupPolicy laden
|
||||
$policy = BackupPolicy::first();
|
||||
|
|
@ -151,13 +159,20 @@ class SettingsForm extends Component
|
|||
$this->validate();
|
||||
|
||||
Setting::setMany([
|
||||
'locale' => $this->locale,
|
||||
'timezone' => $this->timezone,
|
||||
'session_timeout' => $this->session_timeout,
|
||||
'rate_limit' => $this->rate_limit,
|
||||
'password_min' => $this->password_min,
|
||||
'locale' => $this->locale,
|
||||
'timezone' => $this->timezone,
|
||||
'session_timeout' => $this->session_timeout,
|
||||
'notify_sender_name' => $this->notify_sender_name,
|
||||
'notify_admin_email' => $this->notify_admin_email,
|
||||
'rate_limit' => $this->rate_limit,
|
||||
'password_min' => $this->password_min,
|
||||
]);
|
||||
|
||||
// MAIL_FROM_NAME in .env synchronisieren
|
||||
if ($this->notify_sender_name) {
|
||||
$this->writeEnv(['MAIL_FROM_NAME' => $this->notify_sender_name]);
|
||||
}
|
||||
|
||||
// Backup-Policy speichern
|
||||
$cron = $this->buildCron();
|
||||
BackupPolicy::updateOrCreate([], [
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ class SystemDomainSeeder extends Seeder
|
|||
$mtaSub = strtolower(env('MTA_SUB', 'mx') ?: 'mx'); // z.B. mx
|
||||
$systemSub = strtolower(config('mailpool.platform_system_zone') ?: 'sysmail'); // z.B. sysmail
|
||||
|
||||
$serverFqdn = strtolower("{$mtaSub}.{$platformBase}"); // mx.nexlab.at
|
||||
$systemFqdn = strtolower("{$systemSub}.{$serverFqdn}"); // sysmail.mx.nexlab.at
|
||||
$serverFqdn = strtolower("{$mtaSub}.{$platformBase}"); // mx.nexlab.at
|
||||
$systemFqdn = strtolower("{$systemSub}.{$platformBase}"); // sysmail.nexlab.at
|
||||
|
||||
// =========================================================================
|
||||
// 1) MAILSERVER-DOMAIN zuerst (mx.<BASE_DOMAIN>), is_server = true
|
||||
|
|
|
|||
|
|
@ -208,6 +208,38 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Benachrichtigungen --}}
|
||||
<div class="mbx-section">
|
||||
<div class="mbx-domain-head">
|
||||
<div class="mbx-domain-info">
|
||||
<span class="mbx-badge-mute">Benachrichtigungen</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding:16px 18px;display:flex;flex-direction:column;gap:14px">
|
||||
<div class="mw-modal-grid2">
|
||||
<div>
|
||||
<label class="mw-modal-label">Absendername</label>
|
||||
<input type="text" wire:model.defer="notify_sender_name" class="mw-modal-input" placeholder="System Alert">
|
||||
<div class="mw-modal-hint">Wird als Absender in System-Mails angezeigt</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="mw-modal-label">Admin-E-Mail</label>
|
||||
<input type="email" wire:model.defer="notify_admin_email" class="mw-modal-input" placeholder="admin@example.com">
|
||||
<div class="mw-modal-hint">Empfänger für Update- & Systemmeldungen</div>
|
||||
</div>
|
||||
</div>
|
||||
@php
|
||||
$sysmailFqdn = \App\Models\Setting::get('notify_from_address')
|
||||
?: ('no-reply@' . config('mailpool.platform_system_zone','sysmail') . '.' . config('mailpool.platform_zone',''));
|
||||
@endphp
|
||||
<div style="display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:7px;background:var(--mw-bg3);border:1px solid var(--mw-b2)">
|
||||
<svg width="12" height="12" viewBox="0 0 14 14" fill="none" style="flex-shrink:0;color:var(--mw-t4)"><rect x=".5" y="2.5" width="13" height="9" rx="1.5" stroke="currentColor" stroke-width="1.2"/><path d="M.5 5l6.5 4 6.5-4" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/></svg>
|
||||
<span style="font-size:11px;color:var(--mw-t4)">Absenderadresse:</span>
|
||||
<span style="font-family:monospace;font-size:11px;color:var(--mw-t2)">{{ $sysmailFqdn }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Sicherheit --}}
|
||||
<div class="mbx-section">
|
||||
<div class="mbx-domain-head">
|
||||
|
|
|
|||
Loading…
Reference in New Issue