# 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: ```bash ./install.sh --destination ~/.local/bin ``` To install system-wide: ```bash 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. ```powershell & $(where.exe pip).split()[0] install . ``` ## Usage ```bash 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. ```