instance($run); if ($instance === null) { return StepResult::fail('instance_missing'); } $config = GuestMailConfig::for($instance); if (! $config->available()) { return StepResult::fail($config->problem() ?? 'mail_unavailable'); } $pve = $this->pve->forHost($instance->host); // Der Schluessel ist ein fester occ-Name aus GuestMailConfig::values(), // keine Benutzereingabe — genauso unmaskiert wie 'files default_quota' // in ApplyStorageQuota. Maskiert wird nur der WERT, siehe Kopfkommentar. foreach ($config->values() as $schluessel => $wert) { $this->guest($pve, $run, NextcloudOcc::command( 'config:system:set '.$schluessel.' --value='.escapeshellarg($wert) )); } // Das Passwort wie jeder andere Wert. Verstecken laesst es sich auf // dieser Maschine nicht — siehe Kopfkommentar. $this->guest($pve, $run, NextcloudOcc::command( 'config:system:set mail_smtppassword --value='.escapeshellarg($config->password()) )); return StepResult::advance(); } }