[Fix] Gmail smime.p7m and tnef open mail (with winmail.dat)

Outlook and gmail do not always work together. If a someone sends you a mail from outlook using Rich Text, and has s/mime enabled, the mail will show in gmail as an empty mail with just a smime.p7s or smime.p7m attachment. This can be fixed on a Linux box:

  1. Save the smime.p7m/p7s file
  2. Rename to mail.eml
  3. For Debian/Ubuntu related systems: apt-get install mpack ; munpack mail.eml
  4. For Fedora (and related) systems: yum install ripmime ; ripmime -i mail.eml
  5. In the dir, the extracted files are now shown. Use “file *” to show what types of files they are (example below)

mail.eml:      multipart/signed; protocol="application/pkcs7-signature";\015, ASCII text, with CRLF line terminators
smime.p7s:     data
textfile0:     empty
textfile1:     ASCII text, with CRLF line terminators
textfile2:     HTML document, UTF-8 Unicode text, with CRLF line terminators