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.