fetch2gmail 1.1.4__tar.gz → 1.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fetch2gmail-1.1.4/src/fetch2gmail.egg-info → fetch2gmail-1.1.5}/PKG-INFO +1 -1
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/pyproject.toml +1 -1
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5/src/fetch2gmail.egg-info}/PKG-INFO +1 -1
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetcher/web_ui.py +15 -4
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/LICENSE +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/README.md +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/setup.cfg +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetch2gmail.egg-info/SOURCES.txt +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetch2gmail.egg-info/dependency_links.txt +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetch2gmail.egg-info/entry_points.txt +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetch2gmail.egg-info/requires.txt +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetch2gmail.egg-info/top_level.txt +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetcher/__init__.py +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetcher/auth_server.py +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetcher/auth_ui.py +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetcher/cli.py +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetcher/config.py +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetcher/env_file.py +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetcher/gmail_client.py +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetcher/imap_client.py +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetcher/log_buffer.py +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetcher/run.py +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetcher/state.py +0 -0
- {fetch2gmail-1.1.4 → fetch2gmail-1.1.5}/src/fetcher/ui_auth.py +0 -0
|
@@ -502,6 +502,7 @@ class ConfigUpdate(BaseModel):
|
|
|
502
502
|
imap_port: int | None = None
|
|
503
503
|
imap_username: str | None = None
|
|
504
504
|
imap_mailbox: str | None = None
|
|
505
|
+
imap_use_ssl: bool | None = None
|
|
505
506
|
imap_password: str | None = None # stored in .env, not in config
|
|
506
507
|
delete_after_import: bool | None = None
|
|
507
508
|
gmail_use_label: bool | None = None
|
|
@@ -517,6 +518,7 @@ class SetupBody(BaseModel):
|
|
|
517
518
|
imap_username: str
|
|
518
519
|
imap_password: str
|
|
519
520
|
imap_mailbox: str = "INBOX"
|
|
521
|
+
imap_use_ssl: bool = True
|
|
520
522
|
delete_after_import: bool = True
|
|
521
523
|
gmail_use_label: bool = False
|
|
522
524
|
gmail_label: str = "ISP Mail"
|
|
@@ -540,7 +542,7 @@ def api_setup(request: Request, body: SetupBody) -> dict[str, str]:
|
|
|
540
542
|
username=body.imap_username,
|
|
541
543
|
password=body.imap_password,
|
|
542
544
|
mailbox=body.imap_mailbox,
|
|
543
|
-
use_ssl=
|
|
545
|
+
use_ssl=body.imap_use_ssl,
|
|
544
546
|
)
|
|
545
547
|
except ValueError as e:
|
|
546
548
|
raise HTTPException(status_code=400, detail=str(e))
|
|
@@ -552,7 +554,7 @@ def api_setup(request: Request, body: SetupBody) -> dict[str, str]:
|
|
|
552
554
|
"username": body.imap_username,
|
|
553
555
|
"password_env": "IMAP_PASSWORD",
|
|
554
556
|
"mailbox": body.imap_mailbox,
|
|
555
|
-
"use_ssl":
|
|
557
|
+
"use_ssl": body.imap_use_ssl,
|
|
556
558
|
"delete_after_import": body.delete_after_import,
|
|
557
559
|
},
|
|
558
560
|
"gmail": {
|
|
@@ -590,7 +592,7 @@ def api_config_update(request: Request, update: ConfigUpdate) -> dict[str, str]:
|
|
|
590
592
|
port = int(update.imap_port if update.imap_port is not None else imap.get("port", 993))
|
|
591
593
|
username = update.imap_username if update.imap_username is not None else imap.get("username", "")
|
|
592
594
|
mailbox = update.imap_mailbox if update.imap_mailbox is not None else imap.get("mailbox", "INBOX")
|
|
593
|
-
use_ssl = imap.get("use_ssl", True)
|
|
595
|
+
use_ssl = update.imap_use_ssl if update.imap_use_ssl is not None else imap.get("use_ssl", True)
|
|
594
596
|
try:
|
|
595
597
|
_verify_imap_credentials(
|
|
596
598
|
host=host,
|
|
@@ -614,6 +616,8 @@ def api_config_update(request: Request, update: ConfigUpdate) -> dict[str, str]:
|
|
|
614
616
|
imap["username"] = update.imap_username
|
|
615
617
|
if update.imap_mailbox is not None:
|
|
616
618
|
imap["mailbox"] = update.imap_mailbox
|
|
619
|
+
if update.imap_use_ssl is not None:
|
|
620
|
+
imap["use_ssl"] = update.imap_use_ssl
|
|
617
621
|
if update.delete_after_import is not None:
|
|
618
622
|
cfg.setdefault("imap", {})["delete_after_import"] = update.delete_after_import
|
|
619
623
|
if update.gmail_use_label is not None:
|
|
@@ -763,6 +767,8 @@ _HTML_PAGE = """
|
|
|
763
767
|
<p>Enter your IMAP (ISP) mailbox details. Your password is stored encrypted in <code>.env</code> (not plain text), not in the config file.</p>
|
|
764
768
|
<label>IMAP host <input id="s_imap_host" type="text" placeholder="imap.example.com"></label>
|
|
765
769
|
<label>IMAP port <input id="s_imap_port" type="number" value="993"></label>
|
|
770
|
+
<label style="display:inline-block; margin-top:0.25rem;"><input type="checkbox" id="s_imap_use_ssl" checked> Use SSL/TLS for IMAP</label>
|
|
771
|
+
<p class="hint" style="font-size:0.85rem; color:#666; margin-top:0;">Uncheck for plain IMAP (e.g. port 143).</p>
|
|
766
772
|
<label>IMAP username (email) <input id="s_imap_username" type="text" placeholder="you@isp.com"></label>
|
|
767
773
|
<label>IMAP password <input id="s_imap_password" type="password" placeholder="Stored encrypted in .env"></label>
|
|
768
774
|
<label>Mailbox <input id="s_imap_mailbox" type="text" value="INBOX" title="IMAP folder to fetch from. INBOX is the main inbox where new mail arrives."></label>
|
|
@@ -815,6 +821,8 @@ _HTML_PAGE = """
|
|
|
815
821
|
<h2>Config</h2>
|
|
816
822
|
<label>IMAP host <input id="imap_host" type="text"></label>
|
|
817
823
|
<label>IMAP port <input id="imap_port" type="number"></label>
|
|
824
|
+
<label style="display:inline-block; margin-top:0.25rem;"><input type="checkbox" id="imap_use_ssl"> Use SSL/TLS for IMAP</label>
|
|
825
|
+
<p class="hint" style="font-size:0.85rem; color:#666; margin-top:0;">Uncheck for plain IMAP (e.g. port 143).</p>
|
|
818
826
|
<label>IMAP username <input id="imap_username" type="text"></label>
|
|
819
827
|
<label>IMAP password <input id="imap_password" type="password" placeholder="Leave blank to keep current (stored encrypted)"></label>
|
|
820
828
|
<label>Mailbox <input id="imap_mailbox" type="text" title="IMAP folder to fetch from. INBOX = main inbox."></label>
|
|
@@ -883,6 +891,7 @@ _APP_JS = r"""
|
|
|
883
891
|
document.getElementById('dashboard').style.display = 'block';
|
|
884
892
|
document.getElementById('imap_host').value = c.imap.host;
|
|
885
893
|
document.getElementById('imap_port').value = c.imap.port;
|
|
894
|
+
document.getElementById('imap_use_ssl').checked = c.imap.use_ssl;
|
|
886
895
|
document.getElementById('imap_username').value = c.imap.username;
|
|
887
896
|
document.getElementById('imap_mailbox').value = c.imap.mailbox;
|
|
888
897
|
document.getElementById('delete_after_import').checked = c.imap.delete_after_import;
|
|
@@ -1047,6 +1056,7 @@ _APP_JS = r"""
|
|
|
1047
1056
|
var body = {
|
|
1048
1057
|
imap_host: document.getElementById('imap_host').value,
|
|
1049
1058
|
imap_port: parseInt(document.getElementById('imap_port').value, 10),
|
|
1059
|
+
imap_use_ssl: document.getElementById('imap_use_ssl').checked,
|
|
1050
1060
|
imap_username: document.getElementById('imap_username').value,
|
|
1051
1061
|
imap_mailbox: document.getElementById('imap_mailbox').value,
|
|
1052
1062
|
delete_after_import: document.getElementById('delete_after_import').checked,
|
|
@@ -1076,9 +1086,10 @@ _APP_JS = r"""
|
|
|
1076
1086
|
fetch('/api/setup', {
|
|
1077
1087
|
method: 'POST',
|
|
1078
1088
|
headers: { 'Content-Type': 'application/json' },
|
|
1079
|
-
|
|
1089
|
+
body: JSON.stringify({
|
|
1080
1090
|
imap_host: document.getElementById('s_imap_host').value,
|
|
1081
1091
|
imap_port: parseInt(document.getElementById('s_imap_port').value, 10),
|
|
1092
|
+
imap_use_ssl: document.getElementById('s_imap_use_ssl').checked,
|
|
1082
1093
|
imap_username: document.getElementById('s_imap_username').value,
|
|
1083
1094
|
imap_password: document.getElementById('s_imap_password').value,
|
|
1084
1095
|
imap_mailbox: document.getElementById('s_imap_mailbox').value,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|