From 3f150e5944f1e4be7ac30014472bbb3886acedde Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Mon, 2 Nov 2020 19:06:47 +0100 Subject: [PATCH] add new param PGP_SENDER_PRIVATE_KEY_PATH --- app/config.py | 6 ++++++ example.env | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/config.py b/app/config.py index ca5e4687..19e03bce 100644 --- a/app/config.py +++ b/app/config.py @@ -326,3 +326,9 @@ MAX_SPAM_SCORE = 5.5 SPAMASSASSIN_HOST = os.environ.get("SPAMASSASSIN_HOST") # use a more restrictive score when replying MAX_REPLY_PHASE_SPAM_SCORE = 5 + +PGP_SENDER_PRIVATE_KEY = None +PGP_SENDER_PRIVATE_KEY_PATH = os.environ.get("PGP_SENDER_PRIVATE_KEY_PATH") +if PGP_SENDER_PRIVATE_KEY_PATH: + with open(get_abs_path(PGP_SENDER_PRIVATE_KEY_PATH)) as f: + PGP_SENDER_PRIVATE_KEY = f.read() diff --git a/example.env b/example.env index a32277e3..9daba1c7 100644 --- a/example.env +++ b/example.env @@ -162,4 +162,7 @@ DISABLE_ONBOARDING=true # PLAUSIBLE_DOMAIN=yourdomain.com # Spamassassin server -# SPAMASSASSIN_HOST = 127.0.0.1 \ No newline at end of file +# SPAMASSASSIN_HOST = 127.0.0.1 + +# if set, used to sign the forwarding emails +# PGP_SENDER_PRIVATE_KEY_PATH=local_data/private-pgp.asc \ No newline at end of file