Imapgrab dockerfile.
Go to file
Maximilian Kratz e6f8b176bc Adds a LICENSE
Closes #6.
2024-03-30 07:45:15 +01:00
.github/workflows Updates all GitHub-based Actions to their latest versions 2023-12-20 09:16:30 +01:00
Dockerfile Updates dependency packages + fixes CMD call 2022-09-10 09:45:04 +02:00
LICENSE Adds a LICENSE 2024-03-30 07:45:15 +01:00 Adds GitHub Actions CI config 2023-01-29 12:30:11 +01:00


Build Docker images

Unofficial imapgrab Dockerfile for backing up all folders of an imap server.


After installing docker, just run the following command:

docker pull maxkratz/imapgrab:latest

Environment variables

You can use the following environment variables for customization of this container:

MAILHOST # Hostname of the imap server
MAILUSER # Login-Name (mailbox)
MAILPASSWORD # Password (mailbox)
MAILFOLDER # Subfolder for creating the backup
MAILLOG # If set to true, container will create a log instead of using console output

Mount volumes or bind folders

One may mount a folder of the host to /mnt within the container to enable persistent backups of imap servers.

  • /mnt/mail will be used as backup target.
  • /mnt/log will be used as log target (if environment variable is set).

Full example command

docker run -it -e "" -e "" -e "MAILPASSWORD=secure123" -e "MAILFOLDER=mybackup" -e "MAILLOG=TRUE" -v /home/maxkratz/email-backups/:/mnt maxkratz/imapgrab:latest

Creates a backup of all files and folders of the mailbox with password secure123 at host inclusive logs into subfolder mybackup.


The Dockerfile can be found at:

What gets installed in this container?

The following packages are installed within this docker container: