some more mail stuff, and cleaning up logs