Synchronize your remote Maildirs with the local repository (OfflineIMAP), archive them in backups and clean up older ones (run regularly with systemd timer)
Install OfflineIMAP
- See the official Quick Start Guide.
- If necessary, adjust the binary in the Python script. (Defaults to
offlineimap
) - If you haven't already, add the passwords in plain text to
remotepass=
of the[Repository xyz]
section in offlineimap.conf (or offlineimaprc) to make sure the script can be run non-interactively.
git pull https://github.com/fabianjuelich/ArchiveIMAP.git
cd ArchiveIMAP
./install.sh
- Check with
systemctl list-timers --all
- Edit /etc/archiveimap/archiveimap.conf to match your local Maildir repos and their storage time (m=minute, h=hour, d=day, w=week).
- Edit /etc/systemd/system/archiveimap.timer to fulfill your routine requirements. (Defaults to 12am with up to 30min delay)