From 0e6a121e9ec97add4dff514b9331e424441450b4 Mon Sep 17 00:00:00 2001 From: DaCHack <62812480+DaCHack@users.noreply.github.com> Date: Wed, 18 Jun 2025 22:22:30 +0200 Subject: [PATCH] Allow custom options to be given to fetchmail via environment variable --- optional/fetchmail/fetchmail.py | 1 + 1 file changed, 1 insertion(+) diff --git a/optional/fetchmail/fetchmail.py b/optional/fetchmail/fetchmail.py index 96f387dd..539610a6 100755 --- a/optional/fetchmail/fetchmail.py +++ b/optional/fetchmail/fetchmail.py @@ -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"'}"