Replace TLS checkbox with security dropdown (None/STARTTLS/SSL)

Replace the single IMAP TLS checkbox with a per-protocol security
dropdown for IMAP, SMTP, and Sieve. The security scheme (ssl:// or
tls://) is now stored directly in the host field, unifying the approach
across all protocols.

Smart form behavior:
- Default ports update automatically when changing security type
- Fields clear on blur when value matches the placeholder
- Warning shown when selecting no encryption
- Defaults: IMAP SSL/993, SMTP STARTTLS/587, Sieve STARTTLS/4190

The DB_SECURE_IMAP_TLS flag is no longer written but still read for
backward compatibility with existing records.
This commit is contained in:
Laurent Dinclaux
2026-02-10 17:54:36 +11:00
parent 780cfc6a7e
commit 36b9b3e35f
11 changed files with 368 additions and 133 deletions

View File

@@ -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).

View File

@@ -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).

View File

@@ -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).

View File

@@ -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).

View File

@@ -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).

View File

@@ -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).

View File

@@ -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).