[review] smtp v13

Work in progress branch for the SMTP logging, file extraction and mime decoding.

PR to use github review interface.

cc: @decanio @regit @glongo
'ret' is set by File* api, so checking for MIME_DEC_OK doesn't make sense here.