Hi to all We have a maildir with about 180GB of emails. We have to archive them to a structure like: .Archive.YYY./MM.folder Are you aware of a script doing this ? I've found a perl script that doesn't spit in year and month and a very, very, very, very, very old python script that: 1) doesn't manage base64 encoded subject properly 2) doesn't work with python 3.x (that is able to manage base64 encoded subject properly Any idea ?
Am 13.02.19 um 10:22 schrieb Gandalf Corvotempesta via dovecot:> Hi to all > We have a maildir with about 180GB of emails. > We have to archive them to a structure like: .Archive.YYY./MM.folder > > Are you aware of a script doing this ? I've found a perl script that > doesn't spit in year and month and a very, very, very, very, very old > python script that: > 1) doesn't manage base64 encoded subject properly > 2) doesn't work with python 3.x (that is able to manage base64 encoded > subject properly > > Any idea ? >Hello Gandalf, Thunderbird can do this (i.e. .Archive.YYYY.YYYY-MM) -- peter
I have made something for archiving that you can supply with an array of mail folders and it wil move messages of a specific year to a folder ARCHIVE/YEAR. If you only have 180GB I would not make subdivision in months. Just put everything in a year folder sent and and received combined. Also use doveadm in your script, that wil work on any type of storage and you do not want to risk loosing email, because someone is not 'coding' properly. -----Original Message----- From: Gandalf Corvotempesta via dovecot [mailto:dovecot at dovecot.org] Sent: 13 February 2019 10:23 To: Dovecot Mailing List Subject: Archive maildir Hi to all We have a maildir with about 180GB of emails. We have to archive them to a structure like: .Archive.YYY./MM.folder Are you aware of a script doing this ? I've found a perl script that doesn't spit in year and month and a very, very, very, very, very old python script that: 1) doesn't manage base64 encoded subject properly 2) doesn't work with python 3.x (that is able to manage base64 encoded subject properly Any idea ?
<!doctype html> <html> <head> <meta charset="UTF-8"> </head> <body> <div> with 2.3.4 you could use the new FILTER command over IMAP to run sieve script. </div> <div> <br> </div> <div> Aki </div> <blockquote type="cite"> <div> On 13 February 2019 at 12:07 Marc Roos via dovecot < <a href="mailto:dovecot@dovecot.org">dovecot@dovecot.org</a>> wrote: </div> <div> <br> </div> <div> <br> </div> <div> <br> </div> <div> I have made something for archiving that you can supply with an array of </div> <div> mail folders and it wil move messages of a specific year to a folder </div> <div> ARCHIVE/YEAR. If you only have 180GB I would not make subdivision in </div> <div> months. Just put everything in a year folder sent and and received </div> <div> combined. </div> <div> Also use doveadm in your script, that wil work on any type of storage </div> <div> and you do not want to risk loosing email, because someone is not </div> <div> 'coding' properly. </div> <div> <br> </div> <div> <br> </div> <div> <br> </div> <div> -----Original Message----- </div> <div> From: Gandalf Corvotempesta via dovecot [mailto: <a href="mailto:dovecot@dovecot.org">dovecot@dovecot.org</a>] </div> <div> Sent: 13 February 2019 10:23 </div> <div> To: Dovecot Mailing List </div> <div> Subject: Archive maildir </div> <div> <br> </div> <div> Hi to all </div> <div> We have a maildir with about 180GB of emails. </div> <div> We have to archive them to a structure like: .Archive.YYY./MM.folder </div> <div> <br> </div> <div> Are you aware of a script doing this ? I've found a perl script that </div> <div> doesn't spit in year and month and a very, very, very, very, very old </div> <div> python script that: </div> <div> 1) doesn't manage base64 encoded subject properly </div> <div> 2) doesn't work with python 3.x (that is able to manage base64 encoded </div> <div> subject properly </div> <div> <br> </div> <div> Any idea ? </div> <div> <br> </div> </blockquote> <div> <br> </div> <div class="io-ox-signature"> --- <br>Aki Tuomi </div> </body> </html>
> On 13 Feb 2019, at 11.22, Gandalf Corvotempesta via dovecot <dovecot at dovecot.org> wrote: > > Hi to all > We have a maildir with about 180GB of emails. > We have to archive them to a structure like: .Archive.YYY./MM.folder > > Are you aware of a script doing this ? I've found a perl script that > doesn't spit in year and month and a very, very, very, very, very old > python script that: > 1) doesn't manage base64 encoded subject properly > 2) doesn't work with python 3.x (that is able to manage base64 encoded > subject properly > > Any idea ?Maybe just simple scripting and doveadm move? There is even example at the bottom of the wikipage: https://wiki2.dovecot.org/Tools/Doveadm/Move <https://wiki2.dovecot.org/Tools/Doveadm/Move> Sami -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20190213/a82bf8ad/attachment.html>
On 13 Feb 2019, at 02:22, Gandalf Corvotempesta via dovecot <dovecot at dovecot.org> wrote:> Hi to all > We have a maildir with about 180GB of emails. > We have to archive them to a structure like: .Archive.YYY./MM.folder > > Are you aware of a script doing this ? I've found a perl script that > doesn't spit in year and month and a very, very, very, very, very old > python script that: > 1) doesn't manage base64 encoded subject properly > 2) doesn't work with python 3.x (that is able to manage base64 encoded > subject properlyWhy would the script be looking at the contents of the messages at all? <uch css having to "deal" with the subject? If you are using maildir, you have the timestamp in the filename, and you can easily sort a message into yyyy.mm folders from there. You can also, considering the size of the mail isn't in the multi terabyte range, just use filtering to do this for you (filtering of tour choice, I'd guess most any filtering could handle it). But the question is, why do you have to archive this 180GB of mail? Do you simple have to preserve it? In that case, tax cjf works great! After all, sorting mail that no one is ever going to look at is unlikely to be worth the effort, is it? If you need to have constant access to it, then you should probably get those emails into a fast DB of some sort. -- 'Never trust a ruler who puts his faith in tunnels and bunkers and escape routes. The chances are that his heart isn't in the job.'
Il giorno mer 13 feb 2019 alle ore 14:02 @lbutlr via dovecot <dovecot at dovecot.org> ha scritto:> Why would the script be looking at the contents of the messages at all? <uch css having to "deal" with the subject? If you are using maildir, you have the timestamp in the filename, and you can easily sort a message into yyyy.mm folders from there. You can also, considering the size of the mail isn't in the multi terabyte range, just use filtering to do this for you (filtering of tour choice, I'd guess most any filtering could handle it).The script isn't made by me and i'm not a python programme, thus, i'll keep it as-is I really prefere a bash one-liner......