"Vibe-Trading: Your Personal Trading Agent"
Python ai-agentalgorithmic-tradingbacktestingfintechllmmcpmulti-agentpythonquantitative-financetrading
fix(channels): plain IMAP upgrades with STARTTLS before the password goes out
Haozhe Wu198f73856d8f
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex ab65928f3..de1a7ae1a 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -330,6 +330,17 @@ This project adheres to [Semantic Versioning](https://semver.org/).documented opt-out for self-signed or internal-CA servers. **Upgrade note:**a mail server with such a certificate connected before this change and nowfails the TLS handshake until `verify_tls` is set to `false` for it.+- **Plain IMAP no longer sends the mailbox password in clear text** (after+ #1544). With `imap_use_ssl` off, the Email channel and its connection test+ logged in over an unencrypted connection, and the guided setup put that+ switch one click away. A new `imap_use_tls` (on by default, the IMAP twin of+ `smtp_use_tls`) upgrades the connection with STARTTLS before `LOGIN`; a+ server that offers no STARTTLS is reported as a network failure before the+ password is sent. `verify_tls` now governs STARTTLS on IMAP and SMTP as well+ as implicit SSL, so a self-signed server can opt out on any path. **Upgrade+ note:** an `imap_use_ssl: false` setup against a server without STARTTLS+ stops connecting until `imap_use_tls` is set to `false` for it, which sends+ the password in plain text again.- **Settings-write routes reject cross-site browser requests** (#1544).`require_settings_write_auth` did not apply the cross-site guard that itssiblings `require_auth` and `require_event_stream_auth` enforce on unsafediff --git a/agent/src/channels/config_meta.py b/agent/src/channels/config_meta.pyindex 054ce62c7..f8e6538ed 100644--- a/agent/src/channels/config_meta.py+++ b/agent/src/channels/config_meta.py@@ -127,6 +127,7 @@ def _email_hints() -> list[FieldHint]:("imap_password", "password", True, True),("imap_mailbox", "text", False, False),("imap_use_ssl", "bool", False, False),+ ("imap_use_tls", "bool", False, False),("smtp_host", "text", False, True),("smtp_port", "text", False, False),("smtp_username", "text", False, True),diff --git a/agent/src/channels/email.py b/agent/src/channels/email.pyindex f3960670b..d4fc541dc 100644--- a/agent/src/channels/email.py+++ b/agent/src/channels/email.py@@ -6,7 +6,6 @@ import imaplibimport mimetypesimport reimport smtplib-import sslfrom contextlib import suppressfrom dataclasses import dataclassfrom datetime import date@@ -43,6 +42,9 @@ class EmailConfig(BaseModel):imap_password: str = ""imap_mailbox: str = "INBOX"imap_use_ssl: bool = True+ # With imap_use_ssl off, upgrade with STARTTLS before LOGIN, as+ # smtp_use_tls does for SMTP. Off sends the password in plain text.+ imap_use_tls: bool = Truesmtp_host: str = ""smtp_port: int = 587@@ -50,8 +52,8 @@ class EmailConfig(BaseModel):smtp_password: str = ""smtp_use_tls: bool = Truesmtp_use_ssl: bool = False- # TLS certificate verification for implicit-SSL (IMAP4_SSL/SMTP_SSL)- # connections; set False only for self-signed / internal-CA mail servers.+ # Certificate + hostname verification on every TLS path (implicit SSL and+ # STARTTLS, IMAP and SMTP); False only for self-signed / internal-CA servers.verify_tls: bool = Truefrom_address: str = ""@@ -366,7 +368,7 @@ class EmailChannel(BaseChannel):with smtplib.SMTP(self.config.smtp_host, self.config.smtp_port, timeout=timeout) as smtp:if self.config.smtp_use_tls:- smtp.starttls(context=ssl.create_default_context())+ smtp.starttls(context=email_tls_context(self.config.verify_tls))smtp.login(self.config.smtp_username, self.config.smtp_password)smtp.send_message(msg)@@ -587,6 +589,8 @@ class EmailChannel(BaseChannel):client = imaplib.IMAP4(self.config.imap_host, self.config.imap_port)try:+ if not self.config.imap_use_ssl and self.config.imap_use_tls:+ client.starttls(ssl_context=email_tls_context(self.config.verify_tls))client.login(self.config.imap_username, self.config.imap_password)# NetEase (163/126/yeah.net) rejects SELECT with "Unsafe Login"# unless the client sent an IMAP ID first; harmless elsewhere.diff --git a/agent/src/channels/email_probe.py b/agent/src/channels/email_probe.pyindex ffbd75ffa..3151ce952 100644--- a/agent/src/channels/email_probe.py+++ b/agent/src/channels/email_probe.py@@ -11,7 +11,8 @@ blocking transports are driven through :func:`asyncio.to_thread`.Classification mirrors the adapter's own transport semantics(:meth:`EmailChannel._open_imap_client` and :meth:`EmailChannel._smtp_send`):-- IMAP: ``imap_use_ssl`` → ``IMAP4_SSL`` else ``IMAP4``; a connect failure is+- IMAP: ``imap_use_ssl`` → ``IMAP4_SSL`` else ``IMAP4`` + ``starttls`` when+ ``imap_use_tls``; a connect or upgrade failure is``network``, a rejected login is ``invalid_credentials``, and a mailboxthat cannot be selected is ``invalid_credentials`` naming the mailbox.- SMTP: ``smtp_use_ssl`` → ``SMTP_SSL`` else ``SMTP`` + ``starttls`` when@@ -30,7 +31,6 @@ import asyncioimport contextlibimport imaplibimport smtplib-import sslfrom collections.abc import Iterablefrom typing import TYPE_CHECKING, Any@@ -93,7 +93,11 @@ def _probe_imap(config: EmailConfig) -> tuple[str, str] | None:client = imaplib.IMAP4(config.imap_host, config.imap_port, timeout=_CONNECT_TIMEOUT_S)+ if config.imap_use_tls:+ client.starttls(ssl_context=email_tls_context(config.verify_tls))except (OSError, _IMAP4_ERROR) as exc:+ # A transport that cannot be established or upgraded (no STARTTLS+ # offered, a failed handshake) is network-class, as for SMTP.return "network", _bounded("imap", exc, secrets)try:@@ -140,7 +144,7 @@ def _probe_smtp(config: EmailConfig) -> tuple[str, str] | None:config.smtp_host, config.smtp_port, timeout=_CONNECT_TIMEOUT_S)if config.smtp_use_tls:- client.starttls(context=ssl.create_default_context())+ client.starttls(context=email_tls_context(config.verify_tls))except (smtplib.SMTPException, OSError) as exc:# Covers SMTPConnectError / SMTPServerDisconnected / socket.timeout;# a transport that cannot be established or upgraded is network-class.diff --git a/agent/src/channels/utils.py b/agent/src/channels/utils.pyindex c32471814..6394553f2 100644--- a/agent/src/channels/utils.py+++ b/agent/src/channels/utils.py@@ -125,14 +125,14 @@ def send_imap_id(client: Any) -> None:def email_tls_context(verify: bool) -> ssl.SSLContext:- """Return a TLS context for implicit-SSL (IMAP4_SSL/SMTP_SSL) email connections.+ """Return the TLS context for every email connection, implicit SSL or STARTTLS.``verify=True`` (the default) verifies the server certificate and hostnameagainst the system CA bundle, so a credential is never sent to anunverified server. ``verify=False`` disables verification — an explicit,documented opt-out for self-signed or internal-CA mail servers that trades- MITM protection for connectivity. Mirrors the STARTTLS path, which already- uses :func:`ssl.create_default_context`.+ MITM protection for connectivity. IMAP and SMTP, implicit SSL and STARTTLS,+ all take their context here, so ``verify_tls`` is one switch for all four."""if verify:return ssl.create_default_context()diff --git a/agent/tests/test_channel_config_meta.py b/agent/tests/test_channel_config_meta.pyindex b3868c9bc..86a466f49 100644--- a/agent/tests/test_channel_config_meta.py+++ b/agent/tests/test_channel_config_meta.py@@ -7,6 +7,9 @@ elsewhere) and the security acceptance criterion: no key matchingfrom __future__ import annotations+import json+from pathlib import Path+import pytestfrom src.channels import config_meta as _config_meta@@ -183,6 +186,7 @@ _EMAIL_HINT_KEYS = ("imap_password","imap_mailbox","imap_use_ssl",+ "imap_use_tls","smtp_host","smtp_port","smtp_username",@@ -234,7 +238,7 @@ def test_email_field_hints_contract() -> None:keys = tuple(hint["key"] for hint in hints)assert keys == _EMAIL_HINT_KEYSassert "enabled" not in keys- assert len(hints) == 30+ assert len(hints) == 31by_key = {hint["key"]: hint for hint in hints}assert {key for key, hint in by_key.items() if hint["secret"]} == {@@ -653,3 +657,29 @@ def test_every_hint_that_unmasks_a_secret_shaped_key_is_audited() -> None:if not hint["secret"] and SECRET_KEY_RE.search(hint["key"])}assert unmasked == _AUDITED_NON_SECRETS+++_REPO_ROOT = Path(__file__).resolve().parents[2]++[email protected]("name", sorted(_config_meta.FIELD_HINTS))+def test_every_hand_written_hint_is_labelled_in_the_web_ui(name: str) -> None:+ """The panel's label map and the hint table are two hand-written lists.++ A hint missing from ``ChannelConfigPanel.tsx`` still renders, as its raw+ key with no help text, so nothing fails; the help is where a field like+ ``imap_use_tls`` says that turning it off sends the password in plain text.+ """+ panel = (+ _REPO_ROOT / "frontend/src/components/settings/ChannelConfigPanel.tsx"+ ).read_text(encoding="utf-8")+ en = json.loads(+ (_REPO_ROOT / "frontend/src/i18n/locales/en.json").read_text(encoding="utf-8")+ )+ for hint in _config_meta.FIELD_HINTS[name]:+ key = hint["help_key"]+ assert f'"{key}":' in panel, f"{key} has no label entry in ChannelConfigPanel.tsx"+ node = en+ for part in key.split("."):+ node = node[part]+ assert node.get("label") and node.get("help"), f"{key} lacks an en label or help"diff --git a/agent/tests/test_email_connection_test.py b/agent/tests/test_email_connection_test.pyindex 083313793..20ee3b896 100644--- a/agent/tests/test_email_connection_test.py+++ b/agent/tests/test_email_connection_test.py@@ -74,11 +74,14 @@ def _install_imap_fakes(login_error: BaseException | None = None,select_result: tuple[str, list[Any]] = ("OK", [b"1"]),select_error: BaseException | None = None,+ starttls_error: BaseException | None = None,) -> dict[str, Any]:"""Replace ``imaplib.IMAP4``/``IMAP4_SSL`` with recording fakes."""calls: dict[str, Any] = {"constructed": [],"ssl_contexts": [],+ "starttls": [],+ "order": [],"logins": [],"ids": [],"selects": [],@@ -100,8 +103,16 @@ def _install_imap_fakes(if connect_error is not None:raise connect_error+ def starttls(self, ssl_context: Any = None) -> tuple[str, list[bytes]]:+ calls["starttls"].append(ssl_context)+ calls["order"].append("starttls")+ if starttls_error is not None:+ raise starttls_error+ return ("OK", [b"Begin TLS negotiation now"])+def login(self, user: str, password: str) -> tuple[str, list[bytes]]:calls["logins"].append((user, password))+ calls["order"].append("login")if login_error is not None:raise login_errorreturn ("OK", [b"LOGIN completed"])@@ -371,6 +382,40 @@ def test_plain_imap_transport_when_ssl_disabled(assert result["ok"] is Trueassert imap_calls["constructed"] == [("IMAP4", IMAP_HOST, 993, 10)]+ # Plain IMAP is upgraded before the password goes out (imap_use_tls default).+ assert imap_calls["order"] == ["starttls", "login"]+++def test_plain_imap_login_needs_an_explicit_opt_out(+ monkeypatch: pytest.MonkeyPatch,+) -> None:+ """``imap_use_tls=false`` is the one way to log in without TLS, as smtp_use_tls is."""+ imap_calls = _install_imap_fakes(monkeypatch)+ _install_smtp_fakes(monkeypatch)++ result = _run(_make_channel(imap_use_ssl=False, imap_use_tls=False).test_connection())++ assert result["ok"] is True+ assert imap_calls["starttls"] == []+ assert imap_calls["order"] == ["login"]+++def test_a_server_without_starttls_never_receives_the_password(+ monkeypatch: pytest.MonkeyPatch,+) -> None:+ """A refused upgrade is a transport failure, reported before any LOGIN."""+ imap_calls = _install_imap_fakes(+ monkeypatch,+ starttls_error=imaplib.IMAP4.error("STARTTLS extension not supported by server."),+ )+ _install_smtp_fakes(monkeypatch)++ result = _run(_make_channel(imap_use_ssl=False).test_connection())++ assert result["ok"] is False+ assert result["code"] == "network"+ assert result["detail"].startswith("imap: ")+ assert imap_calls["logins"] == []# --------------------------------------------------------------------------- #@@ -513,7 +558,7 @@ def test_probe_smtp_ssl_context_follows_verify_tls(def test_probe_plain_transports_pass_no_ssl_context(monkeypatch: pytest.MonkeyPatch,) -> None:- """Non-SSL transports take no context; STARTTLS keeps its own verifying one."""+ """Non-SSL transports take no constructor context; both upgrade with STARTTLS."""imap_calls = _install_imap_fakes(monkeypatch)smtp_calls = _install_smtp_fakes(monkeypatch)@@ -524,9 +569,39 @@ def test_probe_plain_transports_pass_no_ssl_context(assert result["ok"] is Trueassert imap_calls["ssl_contexts"] == [None]assert smtp_calls["ssl_contexts"] == [None]+ assert len(imap_calls["starttls"]) == 1assert smtp_calls["starttls"] == [True][email protected]("verify_tls", [True, False])+def test_starttls_follows_verify_tls_on_both_sides(+ monkeypatch: pytest.MonkeyPatch, verify_tls: bool+) -> None:+ """``verify_tls`` is one switch for every TLS path, STARTTLS included."""+ imap_calls = _install_imap_fakes(monkeypatch)+ smtp_contexts: list[Any] = []+ _install_smtp_fakes(monkeypatch)+ real_starttls = smtplib.SMTP.starttls++ def record(self: Any, context: Any = None) -> Any:+ smtp_contexts.append(context)+ return real_starttls(self, context=context)++ monkeypatch.setattr(smtplib.SMTP, "starttls", record)++ result = _run(+ _make_channel(+ imap_use_ssl=False, smtp_use_ssl=False, verify_tls=verify_tls+ ).test_connection()+ )++ assert result["ok"] is True+ expected = ssl.CERT_REQUIRED if verify_tls else ssl.CERT_NONE+ for ctx in (imap_calls["starttls"][0], smtp_contexts[0]):+ assert ctx.verify_mode == expected+ assert ctx.check_hostname is verify_tls++@pytest.mark.parametrize("verify_tls", [True, False])def test_adapter_imap_ssl_context_follows_verify_tls(monkeypatch: pytest.MonkeyPatch, verify_tls: bool@@ -759,3 +834,38 @@ def test_probe_sends_imap_id_before_select(monkeypatch: pytest.MonkeyPatch) -> Nassert result["ok"] is Trueassert order[:4] == ["connect", "login", "id:ID", "select"]+++def test_adapter_upgrades_plain_imap_before_login(monkeypatch: pytest.MonkeyPatch) -> None:+ """The polling connection follows the probe: STARTTLS, then LOGIN."""+ imap_calls = _install_imap_fakes(monkeypatch)+ channel = _make_channel(imap_use_ssl=False)++ client = channel._open_imap_client("INBOX")++ assert client is not None+ assert imap_calls["order"] == ["starttls", "login"]+ assert imap_calls["starttls"][0].verify_mode == ssl.CERT_REQUIRED++[email protected]("verify_tls", [True, False])+def test_adapter_smtp_starttls_follows_verify_tls(+ monkeypatch: pytest.MonkeyPatch, verify_tls: bool+) -> None:+ """The send path's STARTTLS takes the same context as implicit SSL."""+ _install_smtp_fakes(monkeypatch)+ contexts: list[Any] = []+ real_starttls = smtplib.SMTP.starttls++ def record(self: Any, context: Any = None) -> Any:+ contexts.append(context)+ return real_starttls(self, context=context)++ monkeypatch.setattr(smtplib.SMTP, "starttls", record)+ channel = _make_channel(smtp_use_ssl=False, verify_tls=verify_tls)++ channel._smtp_send(EmailMessage())++ expected = ssl.CERT_REQUIRED if verify_tls else ssl.CERT_NONE+ assert contexts[0].verify_mode == expected+ assert contexts[0].check_hostname is verify_tlsdiff --git a/frontend/src/components/settings/ChannelConfigPanel.tsx b/frontend/src/components/settings/ChannelConfigPanel.tsxindex 5cf126642..09142b607 100644--- a/frontend/src/components/settings/ChannelConfigPanel.tsx+++ b/frontend/src/components/settings/ChannelConfigPanel.tsx@@ -222,6 +222,7 @@ export function ChannelConfigPanel({"settings.channels.fields.email.imap_password": { label: t("settings.channels.fields.email.imap_password.label"), help: t("settings.channels.fields.email.imap_password.help") },"settings.channels.fields.email.imap_mailbox": { label: t("settings.channels.fields.email.imap_mailbox.label"), help: t("settings.channels.fields.email.imap_mailbox.help") },"settings.channels.fields.email.imap_use_ssl": { label: t("settings.channels.fields.email.imap_use_ssl.label"), help: t("settings.channels.fields.email.imap_use_ssl.help") },+ "settings.channels.fields.email.imap_use_tls": { label: t("settings.channels.fields.email.imap_use_tls.label"), help: t("settings.channels.fields.email.imap_use_tls.help") },"settings.channels.fields.email.smtp_host": { label: t("settings.channels.fields.email.smtp_host.label"), help: t("settings.channels.fields.email.smtp_host.help") },"settings.channels.fields.email.smtp_port": { label: t("settings.channels.fields.email.smtp_port.label"), help: t("settings.channels.fields.email.smtp_port.help") },"settings.channels.fields.email.smtp_username": { label: t("settings.channels.fields.email.smtp_username.label"), help: t("settings.channels.fields.email.smtp_username.help") },diff --git a/frontend/src/i18n/locales/ar.json b/frontend/src/i18n/locales/ar.jsonindex 2c7784855..63678e81f 100644--- a/frontend/src/i18n/locales/ar.json+++ b/frontend/src/i18n/locales/ar.json@@ -550,6 +550,10 @@"label": "IMAP عبر SSL","help": "الاتصال بـ IMAP عبر SSL (مفعّل افتراضيًا، ومطلوب للمنفذ 993)."},+ "imap_use_tls": {+ "label": "STARTTLS لـ IMAP",+ "help": "عند إيقاف IMAP عبر SSL، تتم ترقية الاتصال عبر STARTTLS قبل تسجيل الدخول (مفعّل افتراضيًا، وهو المعتاد للمنفذ 143). لا توقفه إلا لخادم لا يدعم TLS على شبكة موثوقة، إذ تُرسل كلمة المرور حينها نصًا صريحًا."+ },"smtp_host": {"label": "مضيف SMTP","help": "مضيف خادم البريد الصادر، مثل smtp.gmail.com. تُرسل الردود عبر هذا الخادم."diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.jsonindex a208640b4..cdfac398c 100644--- a/frontend/src/i18n/locales/de.json+++ b/frontend/src/i18n/locales/de.json@@ -555,6 +555,10 @@"label": "IMAP-SSL","help": "IMAP über SSL verbinden (standardmäßig aktiv; erforderlich für Port 993)."},+ "imap_use_tls": {+ "label": "IMAP-STARTTLS",+ "help": "Ist IMAP-SSL aus, die Verbindung vor der Anmeldung per STARTTLS verschlüsseln (standardmäßig aktiv; üblich für Port 143). Nur für einen Server ohne TLS in einem vertrauenswürdigen Netz abschalten – das Passwort wird dann im Klartext gesendet."+ },"smtp_host": {"label": "SMTP-Host","help": "Server für ausgehende E-Mails, z. B. smtp.gmail.com. Antworten werden über diesen Server versendet."diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.jsonindex e06faffbc..8163da7c0 100644--- a/frontend/src/i18n/locales/en.json+++ b/frontend/src/i18n/locales/en.json@@ -555,6 +555,10 @@"label": "IMAP SSL","help": "Connect to IMAP over SSL (on by default; required for port 993)."},+ "imap_use_tls": {+ "label": "IMAP STARTTLS",+ "help": "When IMAP SSL is off, upgrade the connection with STARTTLS before logging in (on by default; typical for port 143). Turn it off only for a server that offers no TLS on a network you trust — the password is then sent in plain text."+ },"smtp_host": {"label": "SMTP host","help": "Outbound mail server host, e.g. smtp.gmail.com. Replies are sent through this server."diff --git a/frontend/src/i18n/locales/es.json b/frontend/src/i18n/locales/es.jsonindex 9cc1d7ff3..b66ddc0e9 100644--- a/frontend/src/i18n/locales/es.json+++ b/frontend/src/i18n/locales/es.json@@ -555,6 +555,10 @@"label": "SSL de IMAP","help": "Conectar a IMAP mediante SSL (activado de forma predeterminada; necesario para el puerto 993)."},+ "imap_use_tls": {+ "label": "STARTTLS de IMAP",+ "help": "Si SSL de IMAP está desactivado, cifrar la conexión con STARTTLS antes de iniciar sesión (activado de forma predeterminada; lo habitual en el puerto 143). Desactívalo solo para un servidor sin TLS en una red de confianza: la contraseña se enviaría en texto plano."+ },"smtp_host": {"label": "Host SMTP","help": "Servidor de correo saliente, p. ej. smtp.gmail.com. Las respuestas se envían a través de este servidor."diff --git a/frontend/src/i18n/locales/id.json b/frontend/src/i18n/locales/id.jsonindex e0fa6a202..5ef975dbb 100644--- a/frontend/src/i18n/locales/id.json+++ b/frontend/src/i18n/locales/id.json@@ -555,6 +555,10 @@"label": "SSL IMAP","help": "Hubungkan ke IMAP melalui SSL (aktif secara default; diperlukan untuk port 993)."},+ "imap_use_tls": {+ "label": "STARTTLS IMAP",+ "help": "Saat SSL IMAP nonaktif, enkripsi koneksi dengan STARTTLS sebelum login (aktif secara default; lazim untuk port 143). Matikan hanya untuk server tanpa TLS di jaringan tepercaya — kata sandi akan dikirim sebagai teks biasa."+ },"smtp_host": {"label": "Host SMTP","help": "Host server email keluar, misalnya smtp.gmail.com. Balasan dikirim melalui server ini."diff --git a/frontend/src/i18n/locales/ja.json b/frontend/src/i18n/locales/ja.jsonindex 14f1e67e1..efe31ccc9 100644--- a/frontend/src/i18n/locales/ja.json+++ b/frontend/src/i18n/locales/ja.json@@ -550,6 +550,10 @@"label": "IMAP SSL","help": "SSL 経由で IMAP に接続します(既定オン。ポート 993 では必須)。"},+ "imap_use_tls": {+ "label": "IMAP STARTTLS",+ "help": "IMAP SSL がオフのとき、ログイン前に STARTTLS で接続を暗号化します(既定オン。ポート 143 の標準)。TLS に対応しないサーバーを信頼できるネットワークで使う場合のみオフにしてください。オフにするとパスワードが平文で送信されます。"+ },"smtp_host": {"label": "SMTP ホスト","help": "送信メールサーバーのホスト名(例: smtp.gmail.com)。返信はこのサーバー経由で送信されます。"diff --git a/frontend/src/i18n/locales/ko.json b/frontend/src/i18n/locales/ko.jsonindex 9a717ee74..587fc3d16 100644--- a/frontend/src/i18n/locales/ko.json+++ b/frontend/src/i18n/locales/ko.json@@ -550,6 +550,10 @@"label": "IMAP SSL","help": "SSL로 IMAP에 연결합니다(기본 켜짐, 포트 993에 필요)."},+ "imap_use_tls": {+ "label": "IMAP STARTTLS",+ "help": "IMAP SSL이 꺼져 있으면 로그인 전에 STARTTLS로 연결을 암호화합니다(기본 켜짐, 포트 143의 표준). TLS를 지원하지 않는 서버를 신뢰할 수 있는 네트워크에서 쓸 때만 끄세요. 끄면 비밀번호가 평문으로 전송됩니다."+ },"smtp_host": {"label": "SMTP 호스트","help": "발신 메일 서버 호스트입니다(예: smtp.gmail.com). 답장은 이 서버를 통해 전송됩니다."diff --git a/frontend/src/i18n/locales/pt-BR.json b/frontend/src/i18n/locales/pt-BR.jsonindex 65db87f15..ab93f850f 100644--- a/frontend/src/i18n/locales/pt-BR.json+++ b/frontend/src/i18n/locales/pt-BR.json@@ -555,6 +555,10 @@"label": "SSL do IMAP","help": "Conectar ao IMAP via SSL (ativado por padrão; necessário para a porta 993)."},+ "imap_use_tls": {+ "label": "STARTTLS do IMAP",+ "help": "Com o SSL do IMAP desativado, criptografar a conexão com STARTTLS antes do login (ativado por padrão; o usual na porta 143). Desative apenas para um servidor sem TLS em uma rede confiável: a senha passa a ser enviada em texto puro."+ },"smtp_host": {"label": "Host SMTP","help": "Servidor de e-mail de saída, por exemplo smtp.gmail.com. As respostas são enviadas por esse servidor."diff --git a/frontend/src/i18n/locales/zh-CN.json b/frontend/src/i18n/locales/zh-CN.jsonindex 3afd3f4a3..699d1c477 100644--- a/frontend/src/i18n/locales/zh-CN.json+++ b/frontend/src/i18n/locales/zh-CN.json@@ -550,6 +550,10 @@"label": "IMAP SSL","help": "通过 SSL 连接 IMAP(默认开启;993 端口需要)。"},+ "imap_use_tls": {+ "label": "IMAP STARTTLS",+ "help": "IMAP SSL 关闭时,登录前先用 STARTTLS 加密连接(默认开启,适用于 143 端口)。只有在可信网络中、服务器不支持 TLS 时才关闭——关闭后密码会以明文发送。"+ },"smtp_host": {"label": "SMTP 服务器","help": "发件(出站)邮件服务器地址,例如 smtp.gmail.com。回复邮件经由该服务器发送。"