maildir bug fixed, allowed maildir to be started and stopped repeatly

Fixes #2475