diff --git a/ident_switch-form.js b/ident_switch-form.js index e1492d1..b5e44dc 100644 --- a/ident_switch-form.js +++ b/ident_switch-form.js @@ -2,6 +2,7 @@ * ident_switch - Identity settings form handler. * * Copyright (C) 2018 Boris Gulay + * Copyright (C) 2026 Gecka * * Original code licensed under GPL-3.0+. * New contributions licensed under AGPL-3.0+. @@ -9,35 +10,123 @@ * @url https://github.com/Gecka-apps/ident_switch */ +/** + * Default ports per protocol and security type. + */ +var ident_switch_portDefaults = { + imap: { '': 143, tls: 143, ssl: 993 }, + smtp: { '': 25, tls: 587, ssl: 465 }, + sieve: { '': 4190, tls: 4190, ssl: 4190 } +}; + $(function() { $("INPUT[name='_ident_switch.form.common.enabled']").change(); plugin_switchIdent_processPreconfig(); + + // Bind security change handlers + $.each(['imap', 'smtp', 'sieve'], function(i, proto) { + var secSel = "SELECT[name='_ident_switch.form." + proto + ".security']"; + $(secSel).on('change', function() { + plugin_switchIdent_onSecurityChange(proto, $(this).val()); + }); + }); + + // Bind blur handlers for smart placeholder clearing + $.each(['imap', 'smtp', 'sieve'], function(i, proto) { + var portFld = $("INPUT[name='_ident_switch.form." + proto + ".port']"); + portFld.on('blur', function() { + plugin_switchIdent_clearIfDefault($(this)); + }); + var hostFld = $("INPUT[name='_ident_switch.form." + proto + ".host']"); + hostFld.on('blur', function() { + plugin_switchIdent_clearIfDefault($(this)); + }); + }); + + // Delimiter blur handler + $("INPUT[name='_ident_switch.form.imap.delimiter']").on('blur', function() { + plugin_switchIdent_clearIfDefault($(this)); + }); }); +/** + * Handle security dropdown change: update port placeholder and show/hide warning. + * @param {string} proto - Protocol name (imap, smtp, sieve). + * @param {string} security - Selected security value ('', 'tls', 'ssl'). + */ +function plugin_switchIdent_onSecurityChange(proto, security) { + var portFld = $("INPUT[name='_ident_switch.form." + proto + ".port']"); + var defaults = ident_switch_portDefaults[proto]; + // Check if port value matches any known default for this protocol + var portVal = portFld.val(); + var isDefault = !portVal; + if (portVal) { + $.each(defaults, function(_, v) { + if (parseInt(portVal) === v) { + isDefault = true; + return false; + } + }); + } + + // Update placeholder to new default + var newDefault = defaults[security] || defaults['']; + portFld.attr('placeholder', newDefault); + + // If port was empty or matched a known default, clear it + if (isDefault) { + portFld.val(''); + } + + // Show/hide security warning + var warningId = '#ident-switch-security-warning-' + proto; + if (security === '') { + $(warningId).show(); + } else { + $(warningId).hide(); + } +} + +/** + * On blur: clear field if value matches its placeholder. + * @param {jQuery} $field - The input field. + */ +function plugin_switchIdent_clearIfDefault($field) { + var val = $.trim($field.val()); + var placeholder = $field.attr('placeholder') || ''; + if (val !== '' && val === String(placeholder)) { + $field.val(''); + } +} + function plugin_switchIdent_processPreconfig() { - var disFld = $("INPUT[name='_ident_switch.form.common.readonly']"); - disFld.parentsUntil("TABLE", "TR").hide(); + var disFld = $("INPUT[name='_ident_switch.form.common.readonly']"); + disFld.parentsUntil("TABLE", "TR").hide(); - var disVal = disFld.val(); - if (disVal > 0) { - $("INPUT[name='_ident_switch.form.imap.host']").prop("disabled", true); - $("INPUT[name='_ident_switch.form.imap.tls']").prop("disabled", true); - $("INPUT[name='_ident_switch.form.imap.port']").prop("disabled", true); + var disVal = disFld.val(); + if (disVal > 0) { + $("INPUT[name='_ident_switch.form.imap.host']").prop("disabled", true); + $("SELECT[name='_ident_switch.form.imap.security']").prop("disabled", true); + $("INPUT[name='_ident_switch.form.imap.port']").prop("disabled", true); - $("INPUT[name='_ident_switch.form.smtp.host']").prop("disabled", true); - $("INPUT[name='_ident_switch.form.smtp.port']").prop("disabled", true); - - $("INPUT[name='_ident_switch.form.sieve.host']").prop("disabled", true); - $("INPUT[name='_ident_switch.form.sieve.port']").prop("disabled", true); - } - if (2 == disVal) { - $("INPUT[name='_ident_switch.form.imap.username']").prop("disabled", true); - } + $("INPUT[name='_ident_switch.form.smtp.host']").prop("disabled", true); + $("SELECT[name='_ident_switch.form.smtp.security']").prop("disabled", true); + $("INPUT[name='_ident_switch.form.smtp.port']").prop("disabled", true); + $("INPUT[name='_ident_switch.form.sieve.host']").prop("disabled", true); + $("SELECT[name='_ident_switch.form.sieve.security']").prop("disabled", true); + $("INPUT[name='_ident_switch.form.sieve.port']").prop("disabled", true); + } + if (2 == disVal) { + $("INPUT[name='_ident_switch.form.imap.username']").prop("disabled", true); + } } function plugin_switchIdent_enabled_onChange(e) { - var $enFld = $("INPUT[name='_ident_switch.form.common.enabled'], INPUT[name='_ident_switch.form.imap.host'], INPUT[name='_ident_switch.form.smtp.host']"); - $("INPUT[name!='_ident_switch.form.common.enabled']", $enFld.parents("FIELDSET")).prop("disabled", !$enFld.is(":checked")); - plugin_switchIdent_processPreconfig(); -} \ No newline at end of file + var $enFld = $("INPUT[name='_ident_switch.form.common.enabled'], INPUT[name='_ident_switch.form.imap.host'], INPUT[name='_ident_switch.form.smtp.host']"); + var $fieldset = $enFld.parents("FIELDSET"); + var isEnabled = $enFld.is(":checked"); + $("INPUT[name!='_ident_switch.form.common.enabled']", $fieldset).prop("disabled", !isEnabled); + $("SELECT", $fieldset).prop("disabled", !isEnabled); + plugin_switchIdent_processPreconfig(); +} diff --git a/lib/IdentSwitchForm.php b/lib/IdentSwitchForm.php index 5369dc2..4e1d45b 100644 --- a/lib/IdentSwitchForm.php +++ b/lib/IdentSwitchForm.php @@ -43,15 +43,15 @@ class IdentSwitchForm * Build the IMAP form fields for identity settings. * * @param array $record Identity record data used for placeholders. - * @return array Form field definitions for IMAP host, port, TLS, username, password, delimiter. + * @return array Form field definitions for IMAP host, port, security, username, password, delimiter. */ - public static function get_imap_fields(array &$record): array + public function get_imap_fields(array &$record): array { $prefix = 'ident_switch.form.imap.'; return [ $prefix . 'host' => ['type' => 'text', 'size' => 64, 'placeholder' => 'localhost'], - $prefix . 'port' => ['type' => 'text', 'size' => 5, 'placeholder' => 143], - $prefix . 'tls' => ['type' => 'checkbox'], + $prefix . 'security' => ['value' => $this->build_security_select($prefix, $record, 'ssl')], + $prefix . 'port' => ['type' => 'text', 'size' => 5, 'placeholder' => 993], $prefix . 'username' => ['type' => 'text', 'size' => 64, 'placeholder' => $record['email'] ?? ''], $prefix . 'password' => ['type' => 'password', 'size' => 64], $prefix . 'delimiter' => ['type' => 'text', 'size' => 1, 'placeholder' => 'Auto'], @@ -74,6 +74,7 @@ class IdentSwitchForm return [ $prefix . 'host' => ['type' => 'text', 'size' => 64, 'placeholder' => 'localhost'], + $prefix . 'security' => ['value' => $this->build_security_select($prefix, $record, 'tls')], $prefix . 'port' => ['type' => 'text', 'size' => 5, 'placeholder' => 587], $prefix . 'auth' => ['value' => $authType->show([$record['ident_switch.form.smtp.auth'] ?? null])], ]; @@ -95,6 +96,7 @@ class IdentSwitchForm return [ $prefix . 'host' => ['type' => 'text', 'size' => 64, 'placeholder' => 'localhost'], + $prefix . 'security' => ['value' => $this->build_security_select($prefix, $record, 'tls')], $prefix . 'port' => ['type' => 'text', 'size' => 5, 'placeholder' => 4190], $prefix . 'auth' => ['value' => $authType->show([$record['ident_switch.form.sieve.auth'] ?? null])], ]; @@ -142,6 +144,67 @@ class IdentSwitchForm ]; } + /** + * Build a security dropdown select for a protocol section. + * + * @param string $prefix Form field prefix (e.g. 'ident_switch.form.imap.'). + * @param array $record Identity record data. + * @param string $default Default security value ('', 'tls', 'ssl'). + * @return string Rendered HTML select element. + */ + private function build_security_select(string $prefix, array &$record, string $default): string + { + $select = new html_select(['name' => "_{$prefix}security"]); + $select->add($this->plugin->gettext('form.security.none'), ''); + $select->add($this->plugin->gettext('form.security.starttls'), 'tls'); + $select->add($this->plugin->gettext('form.security.ssl'), 'ssl'); + + $current = $record[$prefix . 'security'] ?? $default; + $proto = str_replace('ident_switch.form.', '', rtrim($prefix, '.')); + $hidden = $current !== '' ? ' style="display:none"' : ''; + $warning = '
' + . rcube::Q($this->plugin->gettext('form.security.none_warning')) + . '
'; + + return $select->show($current) . $warning; + } + + /** + * Parse scheme prefix from a host string. + * + * @param string $host Host string, optionally prefixed with ssl:// or tls://. + * @return array{scheme: string, host: string} Parsed scheme and bare host. + */ + private static function parse_host_scheme(string $host): array + { + $lower = strtolower($host); + if (str_starts_with($lower, 'ssl://')) { + return ['scheme' => 'ssl', 'host' => substr($host, 6)]; + } + if (str_starts_with($lower, 'tls://')) { + return ['scheme' => 'tls', 'host' => substr($host, 6)]; + } + return ['scheme' => '', 'host' => $host]; + } + + /** + * Compose a host string with scheme prefix. + * + * @param string|null $host Bare host name. + * @param string|null $security Security type ('', 'tls', 'ssl'). + * @return string|null Host with scheme prefix, or null if host is empty. + */ + private static function compose_host_scheme(?string $host, ?string $security): ?string + { + if ($host === null || $host === '') { + return $host; + } + if ($security === 'ssl' || $security === 'tls') { + return $security . '://' . $host; + } + return $host; + } + /** * Handle identity_form hook: add plugin-specific fields to the identity editor. * @@ -205,7 +268,22 @@ class IdentSwitchForm // Parse flags $record['ident_switch.form.common.enabled'] = (bool)($row['flags'] & ident_switch::DB_ENABLED); - $record['ident_switch.form.imap.tls'] = (bool)($row['flags'] & ident_switch::DB_SECURE_IMAP_TLS); + + // Parse host schemes into separate security fields + foreach (['imap', 'smtp', 'sieve'] as $proto) { + $key = "ident_switch.form.{$proto}.host"; + $hostVal = $record[$key] ?? ''; + if ($hostVal !== '') { + $parsed = self::parse_host_scheme($hostVal); + $record[$key] = $parsed['host']; + $record["ident_switch.form.{$proto}.security"] = $parsed['scheme']; + } + } + + // Backward compat: if IMAP host had no scheme but TLS flag was set + if (empty($record['ident_switch.form.imap.security']) && ($row['flags'] & ident_switch::DB_SECURE_IMAP_TLS)) { + $record['ident_switch.form.imap.security'] = 'tls'; + } // Set readonly if needed $cfg = $preconfig->get($record['email']); @@ -225,7 +303,7 @@ class IdentSwitchForm ]; $args['form']['ident_switch.imap'] = [ 'name' => $this->plugin->gettext('form.imap.caption'), - 'content' => self::get_imap_fields($record), + 'content' => $this->get_imap_fields($record), ]; $args['form']['ident_switch.smtp'] = [ 'name' => $this->plugin->gettext('form.smtp.caption'), @@ -414,11 +492,6 @@ class IdentSwitchForm $data[$dataKey] = $record[$recordKey]; } } - - // Handle TLS flag from preconfig - if (!empty($record['ident_switch.form.imap.tls'])) { - $data['flags'] |= ident_switch::DB_SECURE_IMAP_TLS; - } } /** @@ -439,7 +512,10 @@ class IdentSwitchForm return $retVal; } + // Validate and compose IMAP host with security scheme $retVal['imap.host'] = self::get_field_value('imap', 'host'); + $imapSecurity = self::get_field_value('imap', 'security') ?? ''; + $retVal['imap.host'] = self::compose_host_scheme($retVal['imap.host'], $imapSecurity); if (strlen($retVal['imap.host'] ?? '') > 64) { $retVal['err'] = 'host.long'; return $retVal; @@ -467,7 +543,10 @@ class IdentSwitchForm return $retVal; } + // Validate and compose SMTP host with security scheme $retVal['smtp.host'] = self::get_field_value('smtp', 'host'); + $smtpSecurity = self::get_field_value('smtp', 'security') ?? ''; + $retVal['smtp.host'] = self::compose_host_scheme($retVal['smtp.host'], $smtpSecurity); if (strlen($retVal['smtp.host'] ?? '') > 64) { $retVal['err'] = 'host.long'; return $retVal; @@ -489,7 +568,10 @@ class IdentSwitchForm return $retVal; } + // Validate and compose Sieve host with security scheme $retVal['sieve.host'] = self::get_field_value('sieve', 'host'); + $sieveSecurity = self::get_field_value('sieve', 'security') ?? ''; + $retVal['sieve.host'] = self::compose_host_scheme($retVal['sieve.host'], $sieveSecurity); if (strlen($retVal['sieve.host'] ?? '') > 64) { $retVal['err'] = 'host.long'; return $retVal; @@ -526,14 +608,9 @@ class IdentSwitchForm // Get also password $retVal['imap.pass'] = self::get_field_value('imap', 'password', false, true); - // Parse secure settings + // Flags: only enabled, security is now in host field scheme $retVal['flags'] = ident_switch::DB_ENABLED; - $tls = self::get_field_value('imap', 'tls', false); - if ($tls) { - $retVal['flags'] |= ident_switch::DB_SECURE_IMAP_TLS; - } - return $retVal; } diff --git a/lib/IdentSwitchPreconfig.php b/lib/IdentSwitchPreconfig.php index cf439f9..860dd0e 100644 --- a/lib/IdentSwitchPreconfig.php +++ b/lib/IdentSwitchPreconfig.php @@ -73,57 +73,24 @@ class IdentSwitchPreconfig if (is_array($cfg)) { ident_switch::write_log("Applying predefined configuration for '{$email}'."); - // IMAP: use imap_host, fallback to host - $imapUrl = $cfg['imap_host'] ?? $cfg['host'] ?? ''; - if (!empty($imapUrl)) { - $urlArr = parse_url($imapUrl); + // Parse each protocol URL into host, security, and port + $protocols = [ + 'imap' => $cfg['imap_host'] ?? $cfg['host'] ?? '', + 'smtp' => $cfg['smtp_host'] ?? $cfg['host'] ?? '', + 'sieve' => $cfg['sieve_host'] ?? '', + ]; + + foreach ($protocols as $proto => $url) { + if (empty($url)) { + continue; + } + $urlArr = parse_url($url); $host = !empty($urlArr['host']) ? rcube::Q($urlArr['host'], 'url') : ''; $scheme = strtolower($urlArr['scheme'] ?? ''); - if ($scheme === 'ssl') { - $record['ident_switch.form.imap.host'] = 'ssl://' . $host; - $record['ident_switch.form.imap.tls'] = false; - } elseif ($scheme === 'tls') { - $record['ident_switch.form.imap.host'] = $host; - $record['ident_switch.form.imap.tls'] = true; - } else { - $record['ident_switch.form.imap.host'] = $host; - $record['ident_switch.form.imap.tls'] = false; - } - - $record['ident_switch.form.imap.port'] = !empty($urlArr['port']) ? intval($urlArr['port']) : ''; - } - - // SMTP: use smtp_host, fallback to host - $smtpUrl = $cfg['smtp_host'] ?? $cfg['host'] ?? ''; - if (!empty($smtpUrl)) { - $urlArr = parse_url($smtpUrl); - $host = !empty($urlArr['host']) ? rcube::Q($urlArr['host'], 'url') : ''; - $scheme = strtolower($urlArr['scheme'] ?? ''); - - if ($scheme === 'tls' || $scheme === 'ssl') { - $record['ident_switch.form.smtp.host'] = $scheme . '://' . $host; - } else { - $record['ident_switch.form.smtp.host'] = $host; - } - - $record['ident_switch.form.smtp.port'] = !empty($urlArr['port']) ? intval($urlArr['port']) : ''; - } - - // Sieve: use sieve_host only (no fallback — sieve is optional) - $sieveUrl = $cfg['sieve_host'] ?? ''; - if (!empty($sieveUrl)) { - $urlArr = parse_url($sieveUrl); - $host = !empty($urlArr['host']) ? rcube::Q($urlArr['host'], 'url') : ''; - $scheme = strtolower($urlArr['scheme'] ?? ''); - - if ($scheme === 'tls' || $scheme === 'ssl') { - $record['ident_switch.form.sieve.host'] = $scheme . '://' . $host; - } else { - $record['ident_switch.form.sieve.host'] = $host; - } - - $record['ident_switch.form.sieve.port'] = !empty($urlArr['port']) ? intval($urlArr['port']) : ''; + $record["ident_switch.form.{$proto}.host"] = $host; + $record["ident_switch.form.{$proto}.security"] = in_array($scheme, ['ssl', 'tls']) ? $scheme : ''; + $record["ident_switch.form.{$proto}.port"] = !empty($urlArr['port']) ? intval($urlArr['port']) : ''; } $loginSet = false; diff --git a/lib/IdentSwitchSwitcher.php b/lib/IdentSwitchSwitcher.php index a18aeac..199e485 100644 --- a/lib/IdentSwitchSwitcher.php +++ b/lib/IdentSwitchSwitcher.php @@ -95,18 +95,24 @@ class IdentSwitchSwitcher } } - $def_port = 143; - $ssl = null; - if ($r['flags'] & ident_switch::DB_SECURE_IMAP_TLS) { - $ssl = 'tls'; - } - $port = $r['imap_port'] ?: $def_port; - $host = $r['imap_host'] ?: 'localhost'; - if ($ssl && !str_starts_with(strtolower($host), "{$ssl}://")) { - $host = "{$ssl}://" . $host; + $ssl = null; + + // Parse scheme from host field + $hostLower = strtolower($host); + if (str_starts_with($hostLower, 'ssl://')) { + $ssl = 'ssl'; + } elseif (str_starts_with($hostLower, 'tls://')) { + $ssl = 'tls'; + } elseif ($r['flags'] & ident_switch::DB_SECURE_IMAP_TLS) { + // Backward compat: old records without scheme in host + $ssl = 'tls'; + $host = 'tls://' . $host; } + $def_port = ($ssl === 'ssl') ? 993 : 143; + $port = $r['imap_port'] ?: $def_port; + $delimiter = $r['imap_delimiter'] ?: null; $_SESSION['storage_host'] = $host; @@ -164,7 +170,7 @@ class IdentSwitchSwitcher $rc = rcmail::get_instance(); - $sql = 'SELECT smtp_host, flags, smtp_port, username, smtp_auth, password FROM ' . $rc->db->table_name(ident_switch::TABLE) . ' WHERE iid = ? AND user_id = ?'; + $sql = 'SELECT smtp_host, smtp_port, username, smtp_auth, password FROM ' . $rc->db->table_name(ident_switch::TABLE) . ' WHERE iid = ? AND user_id = ?'; $q = $rc->db->query($sql, $iid, $rc->user->ID); $r = $rc->db->fetch_assoc($q); if (is_array($r)) { @@ -179,17 +185,8 @@ class IdentSwitchSwitcher $args['smtp_user'] = $r['username']; $args['smtp_pass'] = $r['smtp_auth'] == ident_switch::SMTP_AUTH_IMAP ? $rc->decrypt($r['password']) : ''; - // In RC 1.6+ smtp_server was renamed to smtp_host and includes port + // Host already contains scheme (ssl:// or tls://) from form $smtpHost = $r['smtp_host'] ?: 'localhost'; - - if ($r['flags'] & ident_switch::DB_SECURE_IMAP_TLS) { - if (str_contains($smtpHost, ':')) { - ident_switch::write_log('SMTP server already contains protocol, ignoring TLS flag.'); - } else { - $smtpHost = 'tls://' . $smtpHost; - } - } - $smtpPort = $r['smtp_port'] ?: 587; $args['smtp_host'] = $smtpHost . ':' . $smtpPort; } diff --git a/localization/de_DE.inc b/localization/de_DE.inc index dc50d73..517d11e 100644 --- a/localization/de_DE.inc +++ b/localization/de_DE.inc @@ -23,8 +23,8 @@ $labels['form.imap.caption'] = 'IMAP'; // Server host name $labels['form.imap.host'] = 'Servername'; -// Secure connection (TLS) -$labels['form.imap.tls'] = 'Sichere Verbindung (TLS)'; +// Security +$labels['form.imap.security'] = 'Sicherheit'; // Port $labels['form.imap.port'] = 'Port'; @@ -48,8 +48,8 @@ $labels['form.smtp.caption'] = 'SMTP'; // Server host name $labels['form.smtp.host'] = 'Servername'; -// Secure connection (TLS) -$labels['form.smtp.tls'] = 'Sichere Verbindung (TLS)'; +// Security +$labels['form.smtp.security'] = 'Sicherheit'; // Port $labels['form.smtp.port'] = 'Port'; @@ -70,6 +70,9 @@ $labels['form.sieve.caption'] = 'Sieve'; // Server host name $labels['form.sieve.host'] = 'Servername'; +// Security +$labels['form.sieve.security'] = 'Sicherheit'; + // Port $labels['form.sieve.port'] = 'Port'; @@ -111,6 +114,20 @@ $labels['form.notify.off'] = 'Aus'; $labels['form.notify.requires_newmail_notifier'] = 'Benachrichtigungen erfordern das Plugin newmail_notifier. Bitte aktivieren Sie es oder kontaktieren Sie Ihren Administrator.'; +// Security options +// None +$labels['form.security.none'] = 'Keine'; + +// STARTTLS +$labels['form.security.starttls'] = 'STARTTLS'; + +// SSL/TLS +$labels['form.security.ssl'] = 'SSL/TLS'; + +// None warning +$labels['form.security.none_warning'] = 'Unverschlüsselte Verbindungen sind unsicher. Ihre Anmeldedaten und E-Mails können abgefangen werden. Verwenden Sie nach Möglichkeit SSL/TLS oder STARTTLS.'; + + // Errors // Value in \'Server host name\' field is too long (64 chars max). diff --git a/localization/en_US.inc b/localization/en_US.inc index 55445a2..14bfcaf 100644 --- a/localization/en_US.inc +++ b/localization/en_US.inc @@ -23,8 +23,8 @@ $labels['form.imap.caption'] = 'IMAP'; // Server host name $labels['form.imap.host'] = 'Server host name'; -// Secure connection (TLS) -$labels['form.imap.tls'] = 'Secure connection (TLS)'; +// Security +$labels['form.imap.security'] = 'Security'; // Port $labels['form.imap.port'] = 'Port'; @@ -48,8 +48,8 @@ $labels['form.smtp.caption'] = 'SMTP'; // Server host name $labels['form.smtp.host'] = 'Server host name'; -// Secure connection (TLS) -$labels['form.smtp.tls'] = 'Secure connection (TLS)'; +// Security +$labels['form.smtp.security'] = 'Security'; // Port $labels['form.smtp.port'] = 'Port'; @@ -70,6 +70,9 @@ $labels['form.sieve.caption'] = 'Sieve'; // Server host name $labels['form.sieve.host'] = 'Server host name'; +// Security +$labels['form.sieve.security'] = 'Security'; + // Port $labels['form.sieve.port'] = 'Port'; @@ -112,6 +115,13 @@ $labels['form.notify.off'] = 'Off'; $labels['form.notify.requires_newmail_notifier'] = 'Notifications require the newmail_notifier plugin. Please enable it or contact your administrator.'; +// Security options +$labels['form.security.none'] = 'None'; +$labels['form.security.starttls'] = 'STARTTLS'; +$labels['form.security.ssl'] = 'SSL/TLS'; +$labels['form.security.none_warning'] = 'Unencrypted connections are insecure. Your credentials and emails may be intercepted. Use SSL/TLS or STARTTLS whenever possible.'; + + // Errors // Value in \'Server host name\' field is too long (64 chars max). diff --git a/localization/fr_FR.inc b/localization/fr_FR.inc index c01b4c6..57ffc6b 100644 --- a/localization/fr_FR.inc +++ b/localization/fr_FR.inc @@ -23,8 +23,8 @@ $labels['form.imap.caption'] = 'IMAP'; // Server host name $labels['form.imap.host'] = 'Serveur'; -// Secure connection (TLS) -$labels['form.imap.tls'] = 'Connexion sécurisée (TLS)'; +// Security +$labels['form.imap.security'] = 'Sécurité'; // Port $labels['form.imap.port'] = 'Port'; @@ -48,8 +48,8 @@ $labels['form.smtp.caption'] = 'SMTP'; // Server host name $labels['form.smtp.host'] = 'Serveur'; -// Secure connection (TLS) -$labels['form.smtp.tls'] = 'Connexion sécurisée (TLS)'; +// Security +$labels['form.smtp.security'] = 'Sécurité'; // Port $labels['form.smtp.port'] = 'Port'; @@ -70,6 +70,9 @@ $labels['form.sieve.caption'] = 'Sieve'; // Server host name $labels['form.sieve.host'] = 'Serveur'; +// Security +$labels['form.sieve.security'] = 'Sécurité'; + // Port $labels['form.sieve.port'] = 'Port'; @@ -111,6 +114,13 @@ $labels['form.notify.off'] = 'Désactivé'; $labels['form.notify.requires_newmail_notifier'] = 'Les notifications nécessitent le plugin newmail_notifier. Veuillez l\'activer ou contacter votre administrateur.'; +// Security options +$labels['form.security.none'] = 'Aucune'; +$labels['form.security.starttls'] = 'STARTTLS'; +$labels['form.security.ssl'] = 'SSL/TLS'; +$labels['form.security.none_warning'] = 'Les connexions non chiffrées sont vulnérables. Vos identifiants et emails peuvent être interceptés. Utilisez SSL/TLS ou STARTTLS autant que possible.'; + + // Errors // Value in \'Server host name\' field is too long (64 chars max). diff --git a/localization/it_IT.inc b/localization/it_IT.inc index 830eb87..856b384 100644 --- a/localization/it_IT.inc +++ b/localization/it_IT.inc @@ -23,8 +23,8 @@ $labels['form.imap.caption'] = 'IMAP'; // Server host name $labels['form.imap.host'] = 'Nome del server'; -// Secure connection (TLS) -$labels['form.imap.tls'] = 'Connessione sicura (TLS)'; +// Security +$labels['form.imap.security'] = 'Sicurezza'; // Port $labels['form.imap.port'] = 'Porta'; @@ -48,8 +48,8 @@ $labels['form.smtp.caption'] = 'SMTP'; // Server host name $labels['form.smtp.host'] = 'Nome del server'; -// Secure connection (TLS) -$labels['form.smtp.tls'] = 'Connessione sicura (TLS)'; +// Security +$labels['form.smtp.security'] = 'Sicurezza'; // Port $labels['form.smtp.port'] = 'Porta'; @@ -70,6 +70,9 @@ $labels['form.sieve.caption'] = 'Sieve'; // Server host name $labels['form.sieve.host'] = 'Nome del server'; +// Security +$labels['form.sieve.security'] = 'Sicurezza'; + // Port $labels['form.sieve.port'] = 'Porta'; @@ -111,6 +114,20 @@ $labels['form.notify.off'] = 'Disattivo'; $labels['form.notify.requires_newmail_notifier'] = 'Le notifiche richiedono il plugin newmail_notifier. Abilitarlo o contattare l\'amministratore.'; +// Security options +// None +$labels['form.security.none'] = 'Nessuna'; + +// STARTTLS +$labels['form.security.starttls'] = 'STARTTLS'; + +// SSL/TLS +$labels['form.security.ssl'] = 'SSL/TLS'; + +// None warning +$labels['form.security.none_warning'] = 'Le connessioni non crittografate non sono sicure. Le credenziali e le email possono essere intercettate. Utilizzare SSL/TLS o STARTTLS quando possibile.'; + + // Errors // Value in \'Server host name\' field is too long (64 chars max). diff --git a/localization/nl_NL.inc b/localization/nl_NL.inc index 99ebf7d..9eacbae 100644 --- a/localization/nl_NL.inc +++ b/localization/nl_NL.inc @@ -23,8 +23,8 @@ $labels['form.imap.caption'] = 'IMAP'; // Server host name $labels['form.imap.host'] = 'Servernaam'; -// Secure connection (TLS) -$labels['form.imap.tls'] = 'Beveiligde verbinding (TLS)'; +// Security +$labels['form.imap.security'] = 'Beveiliging'; // Port $labels['form.imap.port'] = 'Poortnummer'; @@ -48,8 +48,8 @@ $labels['form.smtp.caption'] = 'SMTP'; // Server host name $labels['form.smtp.host'] = 'Servernaam'; -// Secure connection (TLS) -$labels['form.smtp.tls'] = 'Beveiligde verbinding (TLS)'; +// Security +$labels['form.smtp.security'] = 'Beveiliging'; // Port $labels['form.smtp.port'] = 'Poortnummer'; @@ -70,6 +70,9 @@ $labels['form.sieve.caption'] = 'Sieve'; // Server host name $labels['form.sieve.host'] = 'Servernaam'; +// Security +$labels['form.sieve.security'] = 'Beveiliging'; + // Port $labels['form.sieve.port'] = 'Poortnummer'; @@ -111,6 +114,20 @@ $labels['form.notify.off'] = 'Uit'; $labels['form.notify.requires_newmail_notifier'] = 'Meldingen vereisen de newmail_notifier-plug-in. Schakel deze in of neem contact op met uw beheerder.'; +// Security options +// None +$labels['form.security.none'] = 'Geen'; + +// STARTTLS +$labels['form.security.starttls'] = 'STARTTLS'; + +// SSL/TLS +$labels['form.security.ssl'] = 'SSL/TLS'; + +// None warning +$labels['form.security.none_warning'] = 'Onversleutelde verbindingen zijn onveilig. Uw inloggegevens en e-mails kunnen worden onderschept. Gebruik waar mogelijk SSL/TLS of STARTTLS.'; + + // Errors // Value in \'Server host name\' field is too long (64 chars max). diff --git a/localization/ru_RU.inc b/localization/ru_RU.inc index 6aaa8c9..8406f5f 100644 --- a/localization/ru_RU.inc +++ b/localization/ru_RU.inc @@ -23,8 +23,8 @@ $labels['form.imap.caption'] = 'IMAP'; // Server host name $labels['form.imap.host'] = 'Адрес сервера'; -// Secure connection (TLS) -$labels['form.imap.tls'] = 'Безопасное подключение (TLS)'; +// Security +$labels['form.imap.security'] = 'Безопасность'; // Port $labels['form.imap.port'] = 'Порт'; @@ -48,8 +48,8 @@ $labels['form.smtp.caption'] = 'SMTP'; // Server host name $labels['form.smtp.host'] = 'Адрес сервера'; -// Secure connection (TLS) -$labels['form.smtp.tls'] = 'Безопасное подключение (TLS)'; +// Security +$labels['form.smtp.security'] = 'Безопасность'; // Port $labels['form.smtp.port'] = 'Порт'; @@ -70,6 +70,9 @@ $labels['form.sieve.caption'] = 'Sieve'; // Server host name $labels['form.sieve.host'] = 'Адрес сервера'; +// Security +$labels['form.sieve.security'] = 'Безопасность'; + // Port $labels['form.sieve.port'] = 'Порт'; @@ -111,6 +114,20 @@ $labels['form.notify.off'] = 'Выключено'; $labels['form.notify.requires_newmail_notifier'] = 'Уведомления требуют плагин newmail_notifier. Пожалуйста, включите его или обратитесь к администратору.'; +// Security options +// None +$labels['form.security.none'] = 'Нет'; + +// STARTTLS +$labels['form.security.starttls'] = 'STARTTLS'; + +// SSL/TLS +$labels['form.security.ssl'] = 'SSL/TLS'; + +// None warning +$labels['form.security.none_warning'] = 'Незашифрованные соединения небезопасны. Ваши учётные данные и письма могут быть перехвачены. По возможности используйте SSL/TLS или STARTTLS.'; + + // Errors // Value in \'Server host name\' field is too long (64 chars max). diff --git a/localization/sl_SI.inc b/localization/sl_SI.inc index b333eb8..1f6d5d3 100644 --- a/localization/sl_SI.inc +++ b/localization/sl_SI.inc @@ -23,8 +23,8 @@ $labels['form.imap.caption'] = 'IMAP'; // Server host name $labels['form.imap.host'] = 'Ime oz. naslov IMAP strežnika'; -// Secure connection (TLS) -$labels['form.imap.tls'] = 'Varna povezava (TLS)'; +// Security +$labels['form.imap.security'] = 'Varnost'; // Port $labels['form.imap.port'] = 'Vrata'; @@ -48,8 +48,8 @@ $labels['form.smtp.caption'] = 'SMTP'; // Server host name $labels['form.smtp.host'] = 'Ime oz. naslov SMTP strežnika'; -// Secure connection (TLS) -$labels['form.smtp.tls'] = 'Varna povezava (TLS)'; +// Security +$labels['form.smtp.security'] = 'Varnost'; // Port $labels['form.smtp.port'] = 'Vrata'; @@ -70,6 +70,9 @@ $labels['form.sieve.caption'] = 'Sieve'; // Server host name $labels['form.sieve.host'] = 'Ime oz. naslov Sieve strežnika'; +// Security +$labels['form.sieve.security'] = 'Varnost'; + // Port $labels['form.sieve.port'] = 'Vrata'; @@ -111,6 +114,20 @@ $labels['form.notify.off'] = 'Izključeno'; $labels['form.notify.requires_newmail_notifier'] = 'Obvestila zahtevajo vtičnik newmail_notifier. Prosimo, omogočite ga ali se obrnite na skrbnika.'; +// Security options +// None +$labels['form.security.none'] = 'Brez'; + +// STARTTLS +$labels['form.security.starttls'] = 'STARTTLS'; + +// SSL/TLS +$labels['form.security.ssl'] = 'SSL/TLS'; + +// None warning +$labels['form.security.none_warning'] = 'Nešifrirane povezave so nevarne. Vaše poverilnice in e-pošta so lahko prestreženi. Kadar koli je mogoče, uporabite SSL/TLS ali STARTTLS.'; + + // Errors // Value in \'Server host name\' field is too long (64 chars max).