1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-04 10:24:42 +02:00

[Web] Restart Dovecot when changing global sieve filters, add a warning

This commit is contained in:
andryyy 2020-04-11 21:44:53 +02:00
parent 5e5642148c
commit ad536fd43a
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
3 changed files with 21 additions and 2 deletions

View File

@ -117,6 +117,21 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
fwrite($filter_handle, $script_data);
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) {
$_SESSION['return'][] = array(

View File

@ -138,6 +138,7 @@
"extra_acl_invalid_domain": "Externe Absenderadresse \"%s\" verwendet eine ungültige Domain"
},
"success": {
"dovecot_restart_success": "Dovecot wurde erfolgreich neu gestartet",
"pushover_settings_edited": "Pushover Konfiguration gespeichert, bitte den Zugang im Anschluss verifizieren.",
"global_filter_written": "Filterdatei wurde erfolreich geschrieben",
"learned_ham": "ID %s wurde erfolreich als Ham gelernt",
@ -217,6 +218,7 @@
"no_action": "Keine Aktion anwendbar"
},
"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",
"cannot_delete_self": "Kann derzeit eingeloggten Benutzer nicht entfernen",
"no_active_admin": "Kann letzten aktiven Administrator nicht deaktivieren",
@ -658,7 +660,7 @@
"last_run": "Letzte Ausführung",
"last_run_reset": "Als nächstes ausführen",
"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_y": "Alias in SOGo anzeigen",
"sogo_visible_n": "Alias in SOGo verbergen",

View File

@ -138,6 +138,7 @@
"extra_acl_invalid_domain": "External sender \"%s\" uses an invalid domain"
},
"success": {
"dovecot_restart_success": "Dovecot was restarted successfully",
"pushover_settings_edited": "Pushover settings successfully set, please verify credentials.",
"global_filter_written": "Filter was successfully written to file",
"learned_ham": "Successfully learned ID % as ham",
@ -217,6 +218,7 @@
"no_action": "No action applicable"
},
"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.",
"session_ua": "Form token invalid: User-Agent validation error",
"session_token": "Form token invalid: Token mismatch",
@ -659,7 +661,7 @@
"last_run": "Last run",
"excludes": "Excludes",
"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_y": "Show alias in SOGo",
"sogo_visible_n": "Hide alias in SOGo",