Docs
This commit is contained in:
parent
cbecbcb7d8
commit
54df10dc78
@ -1164,12 +1164,6 @@ within your documents.
|
||||
|
||||
Defaults to false.
|
||||
|
||||
#### [`PAPERLESS_EMAIL_GNUPG_HOME=<str>`](#PAPERLESS_EMAIL_GNUPG_HOME) {#PAPERLESS_EMAIL_GNUPG_HOME}
|
||||
|
||||
: Optional, sets the `GNUPG_HOME` path to use with GPG decryptor for encrypted emails. See [GPG Decryptor](advanced_usage.md#gpg-decryptor) for more information. If not set, defaults to the default `GNUPG_HOME` path.
|
||||
|
||||
Defaults to <not set>.
|
||||
|
||||
### Polling {#polling}
|
||||
|
||||
#### [`PAPERLESS_CONSUMER_POLLING=<num>`](#PAPERLESS_CONSUMER_POLLING) {#PAPERLESS_CONSUMER_POLLING}
|
||||
@ -1213,6 +1207,48 @@ consumers working on the same file. Configure this to prevent that.
|
||||
|
||||
Defaults to 0.5 seconds.
|
||||
|
||||
## Incoming Mail {#incoming_mail}
|
||||
|
||||
### Email OAuth {#email_oauth}
|
||||
|
||||
#### [`PAPERLESS_OAUTH_CALLBACK_BASE_URL=<str>`](#PAPERLESS_OAUTH_CALLBACK_BASE_URL) {#PAPERLESS_OAUTH_CALLBACK_BASE_URL}
|
||||
|
||||
: The base URL for the OAuth callback. This is used to construct the full URL for the OAuth callback. This should be the URL that the Paperless instance is accessible at. If not set, defaults to the `PAPERLESS_URL` setting. At least one of these settings must be set to enable OAuth Email setup.
|
||||
|
||||
Defaults to none (thus will use [PAPERLESS_URL](#PAPERLESS_URL)).
|
||||
|
||||
#### [`PAPERLESS_GMAIL_OAUTH_CLIENT_ID=<str>`](#PAPERLESS_GMAIL_OAUTH_CLIENT_ID) {#PAPERLESS_GMAIL_OAUTH_CLIENT_ID}
|
||||
|
||||
: The OAuth client ID for Gmail. This is required for Gmail OAuth Email setup. See [Gmail OAuth Email Setup](usage.md#oauth-email-setup) for more information.
|
||||
|
||||
Defaults to none.
|
||||
|
||||
#### [`PAPERLESS_GMAIL_OAUTH_CLIENT_SECRET=<str>`](#PAPERLESS_GMAIL_OAUTH_CLIENT_SECRET) {#PAPERLESS_GMAIL_OAUTH_CLIENT_SECRET}
|
||||
|
||||
: The OAuth client secret for Gmail. This is required for Gmail OAuth Email setup. See [Gmail OAuth Email Setup](usage.md#oauth-email-setup) for more information.
|
||||
|
||||
Defaults to none.
|
||||
|
||||
#### [`PAPERLESS_OUTLOOK_OAUTH_CLIENT_ID=<str>`](#PAPERLESS_OUTLOOK_OAUTH_CLIENT_ID) {#PAPERLESS_OUTLOOK_OAUTH_CLIENT_ID}
|
||||
|
||||
: The OAuth client ID for Outlook. This is required for Outlook OAuth Email setup. See [Outlook OAuth Email Setup](usage.md#oauth-email-setup) for more information.
|
||||
|
||||
Defaults to none.
|
||||
|
||||
#### [`PAPERLESS_OUTLOOK_OAUTH_CLIENT_SECRET=<str>`](#PAPERLESS_OUTLOOK_OAUTH_CLIENT_SECRET) {#PAPERLESS_OUTLOOK_OAUTH_CLIENT_SECRET}
|
||||
|
||||
: The OAuth client secret for Outlook. This is required for Outlook OAuth Email setup. See [Outlook OAuth Email Setup](usage.md#oauth-email-setup) for more information.
|
||||
|
||||
Defaults to none.
|
||||
|
||||
### Encrypted Emails {#encrypted_emails}
|
||||
|
||||
#### [`PAPERLESS_EMAIL_GNUPG_HOME=<str>`](#PAPERLESS_EMAIL_GNUPG_HOME) {#PAPERLESS_EMAIL_GNUPG_HOME}
|
||||
|
||||
: Optional, sets the `GNUPG_HOME` path to use with GPG decryptor for encrypted emails. See [GPG Decryptor](advanced_usage.md#gpg-decryptor) for more information. If not set, defaults to the default `GNUPG_HOME` path.
|
||||
|
||||
Defaults to <not set>.
|
||||
|
||||
## Barcodes {#barcodes}
|
||||
|
||||
#### [`PAPERLESS_CONSUMER_ENABLE_BARCODES=<bool>`](#PAPERLESS_CONSUMER_ENABLE_BARCODES) {#PAPERLESS_CONSUMER_ENABLE_BARCODES}
|
||||
|
@ -112,7 +112,7 @@ process.
|
||||
Please see [the wiki](https://github.com/paperless-ngx/paperless-ngx/wiki/Related-Projects) for a user-maintained list of related projects and
|
||||
software (e.g. for mobile devices) that is compatible with Paperless-ngx.
|
||||
|
||||
### IMAP (Email) {#usage-email}
|
||||
### Email {#usage-email}
|
||||
|
||||
You can tell paperless-ngx to consume documents from your email
|
||||
accounts. This is a very flexible and powerful feature, if you regularly
|
||||
@ -200,6 +200,14 @@ different means. These are as follows:
|
||||
Paperless is set up to check your mails every 10 minutes. This can be
|
||||
configured via [`PAPERLESS_EMAIL_TASK_CRON`](configuration.md#PAPERLESS_EMAIL_TASK_CRON)
|
||||
|
||||
#### OAuth Email Setup
|
||||
|
||||
Paperless-ngx supports OAuth2 for email accounts. This is currently supported for Gmail and Outlook accounts. To set up an email account with OAuth2, you will need to create an app in the respective service and obtain the [client ID and client secret](configuration.md#email_oauth). You will also need to set either the [callback base url](configuration.md#PAPERLESS_OAUTH_CALLBACK_BASE_URL) or (`PAPERLESS_URL`)[configuration.md#PAPERLESS_URL] to the correct value for the OAuth flow to work correctly.
|
||||
|
||||
Specific instructions for setting up the required app in Gmail and Outlook are beyond the scope of this document, but you can find user-maintained instructions on [the wiki](https://github.com/paperless-ngx/paperless-ngx/wiki/Email-OAuth-App-Setup) or by searching the web.
|
||||
|
||||
Once setup, navigating to the email settings page in the Paperless-ngx UI will allow you to add an email account for Gmail or Outlook using the OAuth2 method.
|
||||
|
||||
### REST API
|
||||
|
||||
You can also submit a document using the REST API, see [POSTing documents](api.md#file-uploads)
|
||||
|
@ -7,8 +7,6 @@ from django.utils import timezone
|
||||
|
||||
from paperless_mail.models import MailAccount
|
||||
|
||||
# Gmail setup guide: https://postmansmtp.com/how-to-configure-post-smtp-with-gmailgsuite-using-oauth/
|
||||
# Outlok setup guide: https://medium.com/@manojkumardhakad/python-read-and-send-outlook-mail-using-oauth2-token-and-graph-api-53de606ecfa1
|
||||
GMAIL_OAUTH_ENDPOINT_TOKEN = "https://accounts.google.com/o/oauth2/token"
|
||||
GMAIL_OAUTH_ENDPOINT_AUTH = "https://accounts.google.com/o/oauth2/auth"
|
||||
OUTLOOK_OAUTH_ENDPOINT_TOKEN = (
|
||||
|
Loading…
x
Reference in New Issue
Block a user