Backup an IMAP account into a folder
Find a file
2025-04-02 14:48:56 +03:00
backup_imap add all to search 2025-04-02 14:48:56 +03:00
config Initial commit 2025-03-26 15:39:54 +02:00
.gitignore Initial commit 2025-03-26 15:39:54 +02:00
backup_imap.sh Initial commit 2025-03-26 15:39:54 +02:00
Dockerfile Initial commit 2025-03-26 15:39:54 +02:00
install.sh Initial commit 2025-03-26 15:39:54 +02:00
LICENSE Initial commit 2025-03-26 15:39:54 +02:00
podman_build.sh Initial commit 2025-03-26 15:39:54 +02:00
podman_run.sh Initial commit 2025-03-26 15:39:54 +02:00
pyproject.toml Initial commit 2025-03-26 15:39:54 +02:00
README.md decode mailbox 2025-03-26 19:17:48 +02:00
requirements.txt Initial commit 2025-03-26 15:39:54 +02:00
setup.cfg Initial commit 2025-03-26 15:39:54 +02:00
setup.py Initial commit 2025-03-26 15:39:54 +02:00
wrapper.sh Initial commit 2025-03-26 15:39:54 +02:00

backup_imap

Do a backup of an IMAP account in to a local folder.

Requirements

Installation

Linux

To install for example in your ~/.local/bin folder:

./install.sh --destination ~/.local/bin

To install system-wide:

sudo ./install.sh --destination /usr/local/bin

Change your configuration file in "${HOME}/.config/backup_imap.conf" (see the example in the config folder).

Windows (from PowerShell, untested)

Ensure you have "C:\Users${env:USERNAME}\AppData\Roaming\Python\Python${python_version}\Scripts" in your Path environment variable.

& $(where.exe pip).split()[0] install .

Usage

Usage: backup_imap.py [OPTIONS]

Options:
-d, --debug-level [CRITICAL|ERROR|WARNING|INFO|DEBUG|NOTSET]
                                Set the debug level for the standard output.
-l, --log-file TEXT             File to store all debug messages.
-s, --imap-server TEXT          Hostname or IP of the IMAP server
                                [required]
-p, --imap-port INTEGER         IMAP port to contact the server
-S, --use-ssl                   Use SSL to contact the IMAP server
-u, --imap-user TEXT            User to connect to IMAP server  [required]
-P, --imap-password TEXT        User password to conect to IMAP server
                                [required]
-m, --mailbox TEXT              Mailbox to backup
-F, --destination-folder TEXT   Folder to save the messages and folders
                                [required]
--config FILE                   Read configuration from FILE.
--help                          Show this message and exit.