Catch incoming email and save the attachments to nextcloud (or any webdav backend).
229
Catch incoming email and save the attachments to nextcloud (or any webdav backend).
This project is a simple HTTP service that accepts multipart form POSTs containing structured email data. It validates the attachments and uploads them to a Nextcloud folder based on the recipient. You can have "[email protected]" route files to a separate folder than "[email protected]".
This service supports two incoming email sources:
Easiest way to get going is using docker.
docker-compose.sample.yml to docker-compose.ymlbuild: ../py-imap-to-http line in the imap service to the location of the dir from step 1docker-compose upThis project requires Python 3, and the python deps in requirements.txt. Using
a virtualenv is recommended.
cp env-sample .env
# Edit .env with your values
pip install -r requirements.dev.txt
I recommend creating a specific nextcloud user to run this under rather than your own account. Just share your inbox dirs to the user.
The settings should be self explanatory, except NCFD_ROUTES.
NCFD_ROUTES should be a comma separated list of email, path pairs which
themselves are separated by colons. Each email represents a recipient, and the
path is the remote path in Nextcloud that attachments from the recipient will be
uploaded to. This lets you run multiple filedrop emails from one instance.
python -m ncfd
© 2020 Casey Link. GNU Affero General Public License v3 or later
Content type
Image
Digest
Size
53.4 MB
Last updated
almost 6 years ago
docker pull ramblurr/nextcloud-filedrop