1
0
mirror of https://github.com/sismics/docs.git synced 2025-12-15 10:46:26 +00:00

Add support for STARTTLS for Inbox Scanning (#682)

This commit is contained in:
Mario Voigt
2023-04-25 18:27:46 +02:00
committed by GitHub
parent dd36e08d7d
commit bd0cde7e87
9 changed files with 22 additions and 2 deletions

View File

@@ -1,3 +1,3 @@
api.current_version=${project.version}
api.min_version=1.0
db.version=27
db.version=28

View File

@@ -334,6 +334,7 @@ public class AppResource extends BaseResource {
Boolean deleteImported = ConfigUtil.getConfigBooleanValue(ConfigType.INBOX_DELETE_IMPORTED);
Config hostnameConfig = configDao.getById(ConfigType.INBOX_HOSTNAME);
Config portConfig = configDao.getById(ConfigType.INBOX_PORT);
Boolean starttls = ConfigUtil.getConfigBooleanValue(ConfigType.INBOX_STARTTLS);
Config usernameConfig = configDao.getById(ConfigType.INBOX_USERNAME);
Config passwordConfig = configDao.getById(ConfigType.INBOX_PASSWORD);
Config folderConfig = configDao.getById(ConfigType.INBOX_FOLDER);
@@ -353,6 +354,7 @@ public class AppResource extends BaseResource {
} else {
response.add("port", Integer.valueOf(portConfig.getValue()));
}
response.add("starttls", starttls);
if (usernameConfig == null) {
response.addNull("username");
} else {
@@ -425,6 +427,7 @@ public class AppResource extends BaseResource {
@FormParam("deleteImported") Boolean deleteImported,
@FormParam("hostname") String hostname,
@FormParam("port") String portStr,
@FormParam("starttls") Boolean starttls,
@FormParam("username") String username,
@FormParam("password") String password,
@FormParam("folder") String folder,
@@ -439,6 +442,7 @@ public class AppResource extends BaseResource {
if (!Strings.isNullOrEmpty(portStr)) {
ValidationUtil.validateInteger(portStr, "port");
}
ValidationUtil.validateRequired(starttls, "starttls");
// Just update the changed configuration
ConfigDao configDao = new ConfigDao();
@@ -451,6 +455,7 @@ public class AppResource extends BaseResource {
if (!Strings.isNullOrEmpty(portStr)) {
configDao.update(ConfigType.INBOX_PORT, portStr);
}
configDao.update(ConfigType.INBOX_STARTTLS, starttls.toString());
if (!Strings.isNullOrEmpty(username)) {
configDao.update(ConfigType.INBOX_USERNAME, username);
}

View File

@@ -440,6 +440,7 @@
"enabled": "Durchsuchen des Posteingangs aktivieren",
"hostname": "IMAP-Server",
"port": "IMAP-Port (143 oder 993)",
"starttls": "Verwende STARTTLS",
"username": "IMAP-Benutzername",
"password": "IMAP-Passwort",
"folder": "IMAP-Ordner",
@@ -449,6 +450,8 @@
"test_success": "Die Verbindung zum Posteingang war erfolgreich ({{ count }} <strong>ungelesene</strong> {{ count > 1 ? 'Nachrichten' : 'Nachricht' }})",
"test_fail": "Beim Verbinden mit dem Posteingang ist ein Fehler aufgetreten, bitte überprüfen Sie die Einstellungen",
"saved": "IMAP-Konfiguration erfolgreich gespeichert"
"autoTagsEnabled": "Automatisches Hinzufügen von Tags aus der mit # markierten Betreffzeile",
"deleteImported": "Importierte Nachrichten aus Mailbox löschen"
},
"monitoring": {
"background_tasks": "Hintergrundaufgaben",

View File

@@ -440,6 +440,7 @@
"enabled": "Enable inbox scanning",
"hostname": "IMAP hostname",
"port": "IMAP port (143 or 993)",
"starttls": "Enable STARTTLS",
"username": "IMAP username",
"password": "IMAP password",
"folder": "IMAP folder",

View File

@@ -45,6 +45,13 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="inboxStarttls">{{ 'settings.inbox.starttls' | translate }}</label>
<div class="col-sm-7">
<input name="starttls" type="checkbox" id="inboxStarttls" ng-model="inbox.starttls" />
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label" for="inboxUsername">{{ 'settings.inbox.username' | translate }}</label>
<div class="col-sm-7">