new mail detection and last-notification erasure

also last-notification writing