Merge pull request #427 from leider/master

massive reafactoring of mail archive