[Web] Restart Dovecot when changing global sieve filters, add a warning
parent
5e5642148c
commit
ad536fd43a
|
@ -117,6 +117,21 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
|
||||||
fwrite($filter_handle, $script_data);
|
fwrite($filter_handle, $script_data);
|
||||||
fclose($filter_handle);
|
fclose($filter_handle);
|
||||||
}
|
}
|
||||||
|
$restart_reponse = json_decode(docker('post', 'dovecot-mailcow', 'restart'), true);
|
||||||
|
if ($restart_reponse['type'] == "success") {
|
||||||
|
$_SESSION['return'][] = array(
|
||||||
|
'type' => 'success',
|
||||||
|
'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
||||||
|
'msg' => 'dovecot_restart_success'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$_SESSION['return'][] = array(
|
||||||
|
'type' => 'warning',
|
||||||
|
'log' => array(__FUNCTION__, $_action, $_type, $_data_log, $_attr),
|
||||||
|
'msg' => 'dovecot_restart_failed'
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
$_SESSION['return'][] = array(
|
$_SESSION['return'][] = array(
|
||||||
|
|
|
@ -138,6 +138,7 @@
|
||||||
"extra_acl_invalid_domain": "Externe Absenderadresse \"%s\" verwendet eine ungültige Domain"
|
"extra_acl_invalid_domain": "Externe Absenderadresse \"%s\" verwendet eine ungültige Domain"
|
||||||
},
|
},
|
||||||
"success": {
|
"success": {
|
||||||
|
"dovecot_restart_success": "Dovecot wurde erfolgreich neu gestartet",
|
||||||
"pushover_settings_edited": "Pushover Konfiguration gespeichert, bitte den Zugang im Anschluss verifizieren.",
|
"pushover_settings_edited": "Pushover Konfiguration gespeichert, bitte den Zugang im Anschluss verifizieren.",
|
||||||
"global_filter_written": "Filterdatei wurde erfolreich geschrieben",
|
"global_filter_written": "Filterdatei wurde erfolreich geschrieben",
|
||||||
"learned_ham": "ID %s wurde erfolreich als Ham gelernt",
|
"learned_ham": "ID %s wurde erfolreich als Ham gelernt",
|
||||||
|
@ -217,6 +218,7 @@
|
||||||
"no_action": "Keine Aktion anwendbar"
|
"no_action": "Keine Aktion anwendbar"
|
||||||
},
|
},
|
||||||
"warning": {
|
"warning": {
|
||||||
|
"dovecot_restart_failed": "Dovecot wurde nicht erfolgreich neu gestartet, bitte prüfen Sie die Logs.",
|
||||||
"domain_added_sogo_failed": "Domain wurde hinzugefügt, aber SOGo konnte nicht neugestartet werden",
|
"domain_added_sogo_failed": "Domain wurde hinzugefügt, aber SOGo konnte nicht neugestartet werden",
|
||||||
"cannot_delete_self": "Kann derzeit eingeloggten Benutzer nicht entfernen",
|
"cannot_delete_self": "Kann derzeit eingeloggten Benutzer nicht entfernen",
|
||||||
"no_active_admin": "Kann letzten aktiven Administrator nicht deaktivieren",
|
"no_active_admin": "Kann letzten aktiven Administrator nicht deaktivieren",
|
||||||
|
@ -658,7 +660,7 @@
|
||||||
"last_run": "Letzte Ausführung",
|
"last_run": "Letzte Ausführung",
|
||||||
"last_run_reset": "Als nächstes ausführen",
|
"last_run_reset": "Als nächstes ausführen",
|
||||||
"excludes": "Ausschlüsse",
|
"excludes": "Ausschlüsse",
|
||||||
"sieve_info": "Es können mehrere Filter pro Benutzer existieren, aber nur ein Filter eines Typs (Pre-/Postfilter) kann gleichzeitig aktiv sein.<br>\r\nDie Ausführung erfolgt in nachstehender Reihenfolge. Ein fehlgeschlagenes Script sowie der Befehl \"keep;\" stoppen die weitere Verarbeitung <b>nicht</b>.<br><br>Global sieve prefilter → Prefilter → User scripts → Postfilter → Global sieve postfilter",
|
"sieve_info": "Es können mehrere Filter pro Benutzer existieren, aber nur ein Filter eines Typs (Pre-/Postfilter) kann gleichzeitig aktiv sein.<br>\r\nDie Ausführung erfolgt in nachstehender Reihenfolge. Ein fehlgeschlagenes Script sowie der Befehl \"keep;\" stoppen die weitere Verarbeitung <b>nicht</b>. Änderungen an globalen Sieve-Filtern bewirken einen Neustart von Dovecot.<br><br>Global sieve prefilter → Prefilter → User scripts → Postfilter → Global sieve postfilter",
|
||||||
"sogo_visible": "Alias Sichtbarkeit in SOGo",
|
"sogo_visible": "Alias Sichtbarkeit in SOGo",
|
||||||
"sogo_visible_y": "Alias in SOGo anzeigen",
|
"sogo_visible_y": "Alias in SOGo anzeigen",
|
||||||
"sogo_visible_n": "Alias in SOGo verbergen",
|
"sogo_visible_n": "Alias in SOGo verbergen",
|
||||||
|
|
|
@ -138,6 +138,7 @@
|
||||||
"extra_acl_invalid_domain": "External sender \"%s\" uses an invalid domain"
|
"extra_acl_invalid_domain": "External sender \"%s\" uses an invalid domain"
|
||||||
},
|
},
|
||||||
"success": {
|
"success": {
|
||||||
|
"dovecot_restart_success": "Dovecot was restarted successfully",
|
||||||
"pushover_settings_edited": "Pushover settings successfully set, please verify credentials.",
|
"pushover_settings_edited": "Pushover settings successfully set, please verify credentials.",
|
||||||
"global_filter_written": "Filter was successfully written to file",
|
"global_filter_written": "Filter was successfully written to file",
|
||||||
"learned_ham": "Successfully learned ID % as ham",
|
"learned_ham": "Successfully learned ID % as ham",
|
||||||
|
@ -217,6 +218,7 @@
|
||||||
"no_action": "No action applicable"
|
"no_action": "No action applicable"
|
||||||
},
|
},
|
||||||
"warning": {
|
"warning": {
|
||||||
|
"dovecot_restart_failed": "Dovecot failed to restart, please check the logs",
|
||||||
"domain_added_sogo_failed": "Added domain but failed to restart SOGo, please check your server logs.",
|
"domain_added_sogo_failed": "Added domain but failed to restart SOGo, please check your server logs.",
|
||||||
"session_ua": "Form token invalid: User-Agent validation error",
|
"session_ua": "Form token invalid: User-Agent validation error",
|
||||||
"session_token": "Form token invalid: Token mismatch",
|
"session_token": "Form token invalid: Token mismatch",
|
||||||
|
@ -659,7 +661,7 @@
|
||||||
"last_run": "Last run",
|
"last_run": "Last run",
|
||||||
"excludes": "Excludes",
|
"excludes": "Excludes",
|
||||||
"last_run_reset": "Schedule next",
|
"last_run_reset": "Schedule next",
|
||||||
"sieve_info": "You can store multiple filters per user, but only one prefilter and one postfilter can be active at the same time.<br>\r\nEach filter will be processed in the described order. Neither a failed script nor an issued \"keep;\" will stop processing of further scripts.<br><br>Global sieve prefilter → Prefilter → User scripts → Postfilter → Global sieve postfilter",
|
"sieve_info": "You can store multiple filters per user, but only one prefilter and one postfilter can be active at the same time.<br>\r\nEach filter will be processed in the described order. Neither a failed script nor an issued \"keep;\" will stop processing of further scripts. Changes to global sieve scripts will trigger a restart of Dovecot.<br><br>Global sieve prefilter → Prefilter → User scripts → Postfilter → Global sieve postfilter",
|
||||||
"sogo_visible": "Alias is visible in SOGo",
|
"sogo_visible": "Alias is visible in SOGo",
|
||||||
"sogo_visible_y": "Show alias in SOGo",
|
"sogo_visible_y": "Show alias in SOGo",
|
||||||
"sogo_visible_n": "Hide alias in SOGo",
|
"sogo_visible_n": "Hide alias in SOGo",
|
||||||
|
|
Loading…
Reference in New Issue