From 70dceb3b379f87f6ff51582609e96ce1bc761a89 Mon Sep 17 00:00:00 2001 From: David Martin Date: Sat, 20 May 2017 16:48:40 +1000 Subject: [PATCH] Allow to configure the email inbox via config file. Same as all the other parameters it makes sense to set it in the config file as well. --- paperless.conf.example | 4 ++++ src/paperless/settings.py | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/paperless.conf.example b/paperless.conf.example index 98029b3cc..e923f26b6 100644 --- a/paperless.conf.example +++ b/paperless.conf.example @@ -37,6 +37,10 @@ PAPERLESS_CONSUME_MAIL_PORT="" PAPERLESS_CONSUME_MAIL_USER="" PAPERLESS_CONSUME_MAIL_PASS="" +# Override the default IMAP inbox here. If not set paperless defaults to +# "INBOX". +#PAPERLESS_CONSUME_MAIL_INBOX="" + ############################################################################### #### Security #### diff --git a/src/paperless/settings.py b/src/paperless/settings.py index f95c69be5..bab997537 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -244,8 +244,10 @@ MAIL_CONSUMPTION = { "PORT": os.getenv("PAPERLESS_CONSUME_MAIL_PORT"), "USERNAME": os.getenv("PAPERLESS_CONSUME_MAIL_USER"), "PASSWORD": os.getenv("PAPERLESS_CONSUME_MAIL_PASS"), - "USE_SSL": os.getenv("PAPERLESS_CONSUME_MAIL_USE_SSL", "y").lower() == "y", # If True, use SSL/TLS to connect - "INBOX": "INBOX" # The name of the inbox on the server + # If True, use SSL/TLS to connect + "USE_SSL": os.getenv("PAPERLESS_CONSUME_MAIL_USE_SSL", "y").lower() == "y", + # The name of the inbox on the server + "INBOX": os.getenv("PAPERLESS_CONSUME_MAIL_INBOX", "INBOX") } # This is used to encrypt the original documents and decrypt them later when