A Docker image to export emails from Gmail to Dropbox.
415
A Docker image to export emails from Gmail to Dropbox.
docker run \
--rm \
-e [email protected] \
-e PASSWORD="YOUR_PASSWORD" \
-e FOLDER="YOUR_LABEL" \
-e DROPBOX_ACCESS_TOKEN="YOUR_TOKEN" \
suin/export-gmail-to-dropbox
docker run \
--name export_gmail \
-d \
--restart=always \
--log-opt max-size=1m \
--log-opt max-file=5 \
-e [email protected] \
-e PASSWORD="YOUR_PASSWORD" \
-e FOLDER="YOUR_LABEL" \
-e DROPBOX_ACCESS_TOKEN="YOUR_TOKEN" \
-e SCHEDULE=@hourly \
suin/export-gmail-to-dropbox
HOST IMAP server host name (default: imap.gmail.com)USERNAME Gmail/email username requiredPASSWORD Gmail/email password requiredFOLDER Label in Gmail requiredMYSQL_PASSWORD the mysql password requiredDROPBOX_ACCESS_TOKEN your Dropbox API access token requiredSCHEDULE backup schedule time, see explainatons belowTZ Timezon setting (default: UTC)You can additionally set the SCHEDULE environment variable like -e SCHEDULE="@daily" to run the backup automatically.
More information about the scheduling can be found here.
Visit the Dropbox app creation page, and fill following fields in there.

Once an application have created, you should press "Generate" button to generate your access token:

If you got error message "Web login required" with output like followings, you will have to enable "Allow less secure apps" On in your Google settings.
fetchmail: IMAP> A0002 LOGIN "[email protected]" *
fetchmail: IMAP< * NO [WEBALERT https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=...] Web login required.
fetchmail: IMAP< A0002 NO [ALERT] Please log in via your web browser: https://support.google.com/mail/accounts/answer/78754 (Failure)
fetchmail: IMAP> A0003 LOGOUT
Go Connected apps & sites and turn on "Allow less secure apps".
Content type
Image
Digest
Size
36.5 MB
Last updated
about 8 years ago
docker pull suin/export-gmail-to-dropbox