Move IMAP payload logging to a plugin