1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-09-16 09:06:32 +02:00

Allow custom options to be given to fetchmail via environment variable

This commit is contained in:
DaCHack
2025-06-18 22:22:30 +02:00
committed by GitHub
parent d615fe4e98
commit 0e6a121e9e

View File

@@ -66,6 +66,7 @@ def run(debug):
for fetch in fetches:
fetchmailrc = ""
options = "options antispam 501, 504, 550, 553, 554"
if "OPTIONS" in os.environ: options += f' {os.environ['OPTIONS']}'
options += " ssl" if fetch["tls"] else ""
options += " keep" if fetch["keep"] else " fetchall"
folders = f"folders {",".join(f'"{imaputf7encode(item).replace('"',r"\34")}"' for item in fetch["folders"]) or '"INBOX"'}"