https://github.com/maxkratz/docker_imapgrab
Imapgrab dockerfile.
https://github.com/maxkratz/docker_imapgrab
backup docker docker-image dockerfile imap imap-client
Last synced: 2 months ago
JSON representation
Imapgrab dockerfile.
- Host: GitHub
- URL: https://github.com/maxkratz/docker_imapgrab
- Owner: maxkratz
- License: apache-2.0
- Created: 2019-12-24T15:13:03.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-09-15T09:15:54.000Z (almost 2 years ago)
- Last Synced: 2025-01-13T03:12:16.797Z (over 1 year ago)
- Topics: backup, docker, docker-image, dockerfile, imap, imap-client
- Language: Dockerfile
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docker_imapgrab
[](https://github.com/maxkratz/docker_imapgrab/actions/workflows/build.yml)
*Unofficial* imapgrab Dockerfile for backing up all folders of an imap server.
## Quickstart
After installing docker, just run the following command:
```sh
docker pull maxkratz/imapgrab:latest
```
## Environment variables
You can use the following environment variables for customization of this container:
```sh
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
```sh
docker run -it -e "MAILHOST=mail.example.net" -e "MAILUSER=user@example.net" -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 **user@example.net** with password **secure123** at host **mail.example.net** inclusive logs into subfolder **mybackup**.
## Dockerfile
The Dockerfile can be found at:
[https://github.com/maxkratz/docker_imapgrab/blob/main/Dockerfile](https://github.com/maxkratz/docker_imapgrab/blob/main/Dockerfile)
## What gets installed in this container?
The following packages are installed within this docker container:
* Some utility packages like git, curl, getmail etc.
* [IMAPbackup by ralbear](https://github.com/ralbear/IMAPbackup) (thats the whole point ...)