l2md: make output modular to support different modes

Refactor the output handling of new mails in order to allow adding
new modes as next step.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
7 files changed