Hi
TARGET: I'd like to remove all e-mail before a data (+5y) to a mailbox file and store it outside.
I've one SME9 (I know = unsupported/old , but that's reason I need archivemail!) with +200GB e-mail.
I'd like to archive OUTSIDE all e-mail with more than 5 years.
So I read https://forums.koozali.org/index.php/topic,53584.msg278409.html#msg278409
and went to try.
So I discovered the archivemail utility do not recursive scan subdirs as you can see below:
[root@andorinha users]# ./archivemail -n -d 1 escravo/Maildir/.Trash/
escravo/Maildir/.Trash:
I would have archived 87 of 87 message(s) (15.3MB of 15.3MB) in 1.4 seconds
[root@andorinha users]# ./archivemail -n -d 1 escravo/Maildir/.Sent/
escravo/Maildir/.Sent:
I would have archived 15 of 15 message(s) (5.0kB of 5.0kB) in 0.4 seconds
[root@andorinha users]# ./archivemail -n -d 1 escravo/Maildir
escravo/Maildir:
I would have archived 7 of 7 message(s) (35.0kB of 35.0kB) in 1.8 seconds
When I scan the Maildir (main source) I'd like to recursively archive all e-mail.
I'm aware I could write a script to scan each directory and use suffix to add directory as suffix to stored archive but so I'd have several (too many!) archives to one account!
There are any other ways to do this?
Regards,
Jáder
That already was done by Charlie: https://forums.koozali.org/index.php/topic,31684.msg133393.html#msg133393
You 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.py
2) 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-ng
I 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