Archive maildir

@lbutlr kremels at
Wed Feb 13 15:02:39 EET 2019

On 13 Feb 2019, at 02:22, Gandalf Corvotempesta via dovecot <dovecot at> 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

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 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.'

More information about the dovecot mailing list