User Tools

Site Tools


ubuntu:email:archive_old_emails

Ubuntu - Email - Archive old emails

To archive old emails, for instance those emails older than 2 years:

(cd current/ && find . -mtime +732 -print0) | rsync -ag –remove-source-files –files-from=- –from0 ./current_maildirs_location/ ./archive_maildirs_location/

This will recursively go through all directories in the current_maildirs_location, find files older than 2 years and move them into the archive_maildirs_location, preserving the directory structures.

ubuntu/email/archive_old_emails.txt · Last modified: 2020/12/06 11:40 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki