That already was done by Charlie:
https://forums.koozali.org/index.php/topic,31684.msg133393.html#msg133393You can script removal of old read mail using something like:
cd ~user
find Maildir -type f -mtime +100 -name \*R\* | xargs rm -f
If we want to copy rather than delete, change the "xargs rm -f" bit of the script.
If you can't write the script your self, pay someone to do it. Remember that most "free" software is written by people who write code for a living.
I even found another script (no sure where in forums ) and there are another solutions:
1) script / tool to convert from Maildir to Mailbox (one big file for each folder).
like
https://github.com/bluebird75/maildir2mbox/blob/master/maildir2mbox.py2) Use a MailPiler to import (and later delete) = mailpiler.org
3) Use a Thunderbird extension to export to any of supported formats using something like this extension:
https://github.com/thundernest/import-export-tools-ngI was just wondering how older/smarter buys (you!) make this happens.
Do you delete e-mails older than XX or archive using .PST or mailbox or TB extension
or do you have a more enterprise solution using MailPiler ?
I'm seriously thinking about MailPiler but it has his own problems/limitations (everyone/everything has!).
My problem is right now I have more than 10 accounts with +40GB e-mails.
Let me show you a test made on weekend on SENT folder of one of those e-mail accounts:
[root@xxxxxxx files]# archivemail --dry-run --copy --date=2018-01-01 -o /home/e-smith/files/ArquivamentoEmails --suffix=before2018 /home/e-smith/files/users/axxxxxo2/Maildir/.Sent/
archivemail: Warning - changing effective user id: this automatic feature is deprecated and will be removed from later versions.
/home/e-smith/files/users/axxxxxxo2/Maildir/.Sent:
I would have archived 15471 of 55560 message(s) (6161.5MB of 26952.7MB) in 1078.1 seconds
Regards,
Jáder