mail-listener emits uid and flags