{"id":1917,"date":"2011-03-18T09:02:35","date_gmt":"2011-03-18T08:02:35","guid":{"rendered":"http:\/\/www.bdjl.de\/localhost\/?p=1917"},"modified":"2017-03-01T12:09:30","modified_gmt":"2017-03-01T11:09:30","slug":"base64-mime-multi-part-e-mail-anhang-dekodierung","status":"publish","type":"post","link":"https:\/\/www.bdjl.de\/localhost\/?p=1917","title":{"rendered":"base64 MIME multi part E-Mail Anhang Dekodierung"},"content":{"rendered":"<p>Da hat sich doch einer meiner vielen Chefs einen Scanner mit Mailfunktion zugelegt und mir dessen gibberish dann per E-Mail weitergeleitet. Angekommen sind zwei Mails. Beide Dateien im Anhang waren im Format dat beigelegt und kamen \u00fcber einen Exchange Server. Die erste dat Datei enthielt mehr als &#8222;normale&#8220; winmail.dat Dateien &#8211; n\u00e4mlich einen E-Mail Header mit den sp\u00e4ter von mir als wesentlich erkannten Informationen: multipart\/mixed und base64 (siehe Bild). Die zweite Datei &#8211; mit einem Editor ge\u00f6ffnet &#8211; zeigte nur noch Buchstabensalat.<\/p>\n<p>Ich tippte trotzdem zuerst auf das mir bekannte <a href=\"http:\/\/www.bdjl.de\/localhost\/?p=749\">winmail.dat Problem<\/a> und versuchte mich mit tnef. Ohne Erfolg. Dann googlete ich nach &#8222;linux decode mail attachments&#8220; und landete einen Treffer.<\/p>\n<p><a href=\"http:\/\/www.bdjl.de\/localhost\/wp-content\/uploads\/2011\/03\/base64mp.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1919\" title=\"base64mp\" src=\"http:\/\/www.bdjl.de\/localhost\/wp-content\/uploads\/2011\/03\/base64mp.png\" alt=\"\" width=\"610\" height=\"569\" \/><\/a><\/p>\n<p>Die beiden Anh\u00e4nge m\u00fcssen zuerst lokal gespeichert werden. Die Umwandlung geht mit Hilfe von munpack:<\/p>\n<blockquote><p>sudo apt-get install mpack<\/p>\n<p>cat part1.dat part2.dat | munpack<\/p><\/blockquote>\n<p>Details und noch viel mehr sind in diesem <a href=\"http:\/\/linux.dsplabs.com.au\/munpack-mime-base64-multi-part-attachment-php-perl-decode-email-pdf-p82\/\" target=\"_blank\">Blogpost<\/a> zu finden.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Da hat sich doch einer meiner vielen Chefs einen Scanner mit Mailfunktion zugelegt und mir dessen gibberish dann per E-Mail weitergeleitet. Angekommen sind zwei Mails. Beide Dateien im Anhang waren im Format dat beigelegt und kamen \u00fcber einen Exchange Server. Die erste dat Datei enthielt mehr als &#8222;normale&#8220; winmail.dat Dateien &#8211; n\u00e4mlich einen E-Mail Header [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,5,12],"tags":[133,130,132,131,129],"class_list":["post-1917","post","type-post","status-publish","format-standard","hentry","category-lfb","category-linux","category-netzfunde","tag-attachment","tag-base64","tag-e-mail","tag-encoding","tag-mime"],"_links":{"self":[{"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/posts\/1917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1917"}],"version-history":[{"count":11,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/posts\/1917\/revisions"}],"predecessor-version":[{"id":4982,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=\/wp\/v2\/posts\/1917\/revisions\/4982"}],"wp:attachment":[{"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bdjl.de\/localhost\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}