This guide explains how to use Paperless-ngx as a mail archive system by ingesting email directly from Dovecot via LMTP. The flow is:
Create a mailbox for archive ingestion (example: archive@yourdomain.tld) and ensure it is delivered by Dovecot.
In your Paperless-ngx environment, enable email ingestion and define a mailbox target. Set the ingestion method to IMAP or direct processing depending on your deployment.
Example environment variables in .env:
PAPERLESS_EMAIL_TASK_CRON="*/5 * * * *"
PAPERLESS_EMAIL_HOST=localhost
PAPERLESS_EMAIL_USER=archive@yourdomain.tld
PAPERLESS_EMAIL_PASSWORD=change-me
PAPERLESS_EMAIL_PORT=993
PAPERLESS_EMAIL_SSL=true
Enable LMTP in Dovecot so mail can be delivered into the archive inbox.
Example in 10-master.conf:
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
mode = 0600
user = postfix
group = postfix
}
}
You can deliver messages directly to Paperless-ngx in two common ways:
For IMAP polling, ensure the mailbox credentials above are correct and the job runs on schedule.
Use Paperless-ngx rules to tag documents based on sender, subject, or headers. This makes archived mail searchable and organized.
Any questions?
Feel free to contact us. Find all contact information on our contact page.