idfile fixup, add mail-format support