From 49058d6afeb5ed7df0cda2815d41edfa2474dd17 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 17 Mar 2014 23:40:25 +0400 Subject: [PATCH] Guess filename extension for --save-* from the content type --- mimedecode.docbook | 16 +++++- mimedecode.py | 21 ++++++-- test/expected-save/msg_07-4.txt | Bin 0 -> 3710 bytes test/expected/msg_07-1.txt | Bin 0 -> 4170 bytes test/input/msg_07-1.txt | 84 ++++++++++++++++++++++++++++++++ test/test_all | 1 + 6 files changed, 117 insertions(+), 5 deletions(-) create mode 100644 test/expected-save/msg_07-4.txt create mode 100644 test/expected/msg_07-1.txt create mode 100644 test/input/msg_07-1.txt diff --git a/mimedecode.docbook b/mimedecode.docbook index 7d767f3..e8a0b23 100644 --- a/mimedecode.docbook +++ b/mimedecode.docbook @@ -536,9 +536,21 @@ cat input_file | mimedecode.py -o output_file counter is prepended to the filename to avoid collisions; if there are no name/filename parameters, or the name/filename parameters contain forbidden characters (null, slash, backslash) the filename is just the serial counter. + + + + If the file doesn't have any extensions (no dots in the value of the + name/filename parameters, or the name is just the counter) the program tries + to guess an extension by looking up the content type in mime.types files + including .mime.types file in the user's home directory (if it exists). If + the file has an extension the program doesn't try to verify that it + corresponds to the content type. + + + The file is saved in the directory set with -O (default is the current - directory). The save options are processed before option -e so the user can - save the message that causes the error. + directory). The save options are proceeded before -e options so the user can + save the message that causes an error. diff --git a/mimedecode.py b/mimedecode.py index 50f8a18..48f6f7e 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -1,10 +1,9 @@ #! /usr/bin/env python """Decode MIME message""" -from mimedecode_version import __version__, __author__, __copyright__, __license__ - import sys, os -import email +from mimedecode_version import __version__, \ + __author__, __copyright__, __license__ me = os.path.basename(sys.argv[0]) @@ -263,6 +262,18 @@ def totext(msg, instring): return s +mimetypes = None + +def _guess_extension(ctype): + global mimetypes + if mimetypes is None: + import mimetypes + mimetypes.init() + user_mime_type = os.path.expanduser('~/.mime.types') + if os.path.exists(user_mime_type): + mimetypes._db.read(user_mime_type) + return mimetypes.guess_extension(ctype) + def _save_message(msg, outstring, save_headers=False, save_body=False): for header, param in ( ("Content-Disposition", "filename"), @@ -284,6 +295,9 @@ def _save_message(msg, outstring, save_headers=False, save_body=False): fname = '' g.save_counter += 1 fname = str(g.save_counter) + fname + if '.' not in fname: + ext = _guess_extension(msg.get_content_type()) + if ext: fname += ext global output save_output = output @@ -583,6 +597,7 @@ if __name__ == "__main__": g.outfile = outfile output = outfile.write + import email msg = email.message_from_file(infile) for header, value in g.set_header_value: diff --git a/test/expected-save/msg_07-4.txt b/test/expected-save/msg_07-4.txt new file mode 100644 index 0000000000000000000000000000000000000000..047192840e2e1aa92113499e30617a2fe938420f GIT binary patch literal 3710 zcmV-^4uSDQZ*FvDZgeeFd2nSqAZcx3XJs#EX=XbhZeeX@JtAajZfA9KW@&S1A__xq zZggdCbS+eJVQzC~WpXV=Zewp`X>MmaAUI-abP8i{ZggdCbS-3Qb8v5SX>@6CZaN@g zbaY{3Xl-R~bUPqsX>4U~VQpnSB4lZ9XLWOCX>({I3Ro>oNlis9L3MO*V{dMDWpZ?7 zWI7;ba&K)QVqtS-HZ&k~Zy-2gX>=fBc_4IUb95kSWFT#6ZDnL-V{c?-E^v7Y3P(vs zI5%Mc0RRE;00960{{R30EC2ui000310RRI2gpaAq?GK}zwAzca-n{z{hT=$;=82~2 z%C_zc$MQ_q_KoNI&iDQg3<`(DqVb4KVggL2@(Eo94AZFfDyc%MPOO*L%`_w0@b^q> zYA@q$84aJQHRi`Vj(4?}b;msqDAeb7uoif@vq#2-*qCTYMg{3e2{UL{Sot+c#d5in zsp+FOC&^W6S~{kPpjx*|%2}~0+7r76t9a|w#%fyly6bE4SBpdXo61|Jiwxk4%If?) zJR53!gL|VJk=LQzU z$3S2*fa>6_Yc-DDyhYDEC`6cWV!-}}?@mGbr{JQUVqzv@45@LDz<=`MsWeH5;6XPt zPj;gzk)ODYE+>g3RFA_?n>YRF8zdIo@znSwFkEELpF(z1r^#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iMSR)XMm!} ze4W^Va+Fy?_;?3}hMR?BhQWiiWPi?sS8YO3Op|_g2xL+qRNAI>kP%BwmyGZ6EgEPc zL&#u(s5LQVig6fq^w%%RxP5Vke$zN9%?OSjC_6b=W%x&pxfhGY){Vg@i_X%EY9o5$ zn2zHmjbkAyrw17)2#f2uUpJUua5shfsA9;49{|}{G{{jANQLM1TlW}zw^l#aB0`;Z zRwBrQFW8UOGBnGjZt1s9Qdovj(G&8Fhzpi;*x1)jgQkd z$ku<3bB-{njn7hfh0-izR*=K~VtvAsff+SmURHu>n2&IUisaae1c;AxW{}Y}hP()d z?sFW4)?4jZAM-O}GUGDM7jphrk9*jH;WTmWXkj@5KSCsxGzoxfX;c1~g>LA3q4H>9 zCUdPOb#D2V!*`9^a+Ez;GPv`3{ZwC~6kX9)8KS64B2_v~b|EJjk5Gwd0|zy1`G*pg znPHQW9NAY;lQixS6TozQFqSHl1(8{z9?V#ANLgI-@oMvEM4p$Cqc}HExM8o^KpNFV zkSIB1)NZ+1UIg};Y1l^5m?X&ggE=#b%~*_L1DvMm3aJMhj0KX=iC#lwPL0@l1L>XC zrJV&7m+mB(fK*ep8G)pjsEOsth#aTxiwV>k>J$4w4+M|jQS`vn7TogoVdx@bEI&vn(ih8)71qz4!5O?wU zq4ol2LCIYnwxX6rXaw|#QW>Lw$caiLk~gXZC;Qmr*LE_(`Q#ilte45(NMNJ8v!kPyhe` literal 0 HcmV?d00001 diff --git a/test/expected/msg_07-1.txt b/test/expected/msg_07-1.txt new file mode 100644 index 0000000000000000000000000000000000000000..9ed3c2fa6d237c09607e059dd523102cb129d260 GIT binary patch literal 4170 zcmaKvcTf}Bwucd^QB)9+q7teI1VRZVH0dBn4NVYCAdmz|AcfvJgc_RkE=T|oQF>KT zArukmO|gI!QIIMK#)s$3n|trPH+N?5S$pkS?f31!wjmzp10*5|M4%0v2sA_@fIxX5 z7!3V;0TsaVN`MdCR)t ze6#>C92BUJ#(I(nKr@{GaVk*54G;H6W8HC{glqpg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7pXs#rOBA&I3GA9^={BB{5q#D)jp(t<9Av~v%%%OTdRQc@bxmb z`j<449za^P@0eSRHj28cSa@AT80F2^Ojn7;$;7M%U7H1 zSuzWz(1s?qPX58DA+64ul(g7+=%cOto8g`Uvmbg*nVY<-v=_{Z!`9Q5O3pYhe3f4>zf0&IxlK;mKFLw18XnK9^SR@97Dc3)>y}NIes~9b zLSVUruae-|){)F?p?0JI9*IDXDjjYW!;d*ih#vd*Q{HexO_zHSY7nz?x&bQfNFyG?As-q-{QpoI1MZbwx?eV5(l*^LpY7WSKBTCzaq@GDi_m!mAqe&Ri;7_?J3*rTNzE~lK83(04D^BCsMgDdoeKB&=sS^rH zgB94-7ISL{ven4>t=_aicL_XOSV;!(T^!%p`G?J1!rrb9fkwQoTS5tF=~p5Lk`J^lZDh(KsBpiGIPe81Q$JbbINq^$NSI9% zf7HF)s)Wz|@d5qu-SI|K{m=+D`72Wh!K)>Sk|woOW48U0jT8ACDxqACrP~S7J&s0# zO{EK*n*My0+44lrn_OhHGq*k_B;hU>6fe<}7~ERS42U~A7qEG7caPCir~lUF=CW)9 z6w^+;HGg?zU&3|K43+y*(p4T(1LfHeuSdLioqQJ4+)^#%J%#olQz+otmwWo(bF8E) Y_Dw466Du5pxtJLk)c@`C3<3fE2ee$0aR2}S literal 0 HcmV?d00001 diff --git a/test/input/msg_07-1.txt b/test/input/msg_07-1.txt new file mode 100644 index 0000000..aa0dc63 --- /dev/null +++ b/test/input/msg_07-1.txt @@ -0,0 +1,84 @@ +From test Sat Feb 1 00:00:00 2014 +MIME-Version: 1.0 +From: Barry +To: Dingus Lovers +Subject: Here is your dingus fish +Date: Fri, 20 Apr 2001 19:35:02 -0400 +Content-Type: multipart/mixed; boundary="BOUNDARY" + +--BOUNDARY +Content-Type: text/plain; charset="us-ascii" + +Hi there, + +This is the dingus fish. + +--BOUNDARY +Content-Type: image/gif; name="dingusfish" +Content-Transfer-Encoding: base64 +content-disposition: attachment; filename="dingusfish" + +R0lGODdhAAE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N5/VRfohRd0VYZoqhKIlU6TXYhJxmPUIloAwc1bPmHEpaZYZORHNlXUJM07hATwHR8MJYqkwWR +WaIezFhxSFlc8/Fq82hEnpeRozg3ULhhr9lAGtVEkCg5ZNRuuVleBPaZadhG0ZgkyPmDOTOKzViM +YgOcpukKqQcbjAWS0IleQ2ROjdh6A+md1qWdBRSX7iSYgFRTtRmBpJioieXJiHfJiMGIR9fJOn8I +MSfXYhspn4ooSa2mSAj4n+8Bmg03fBJZoPOJgsVZRxu1oOMRPXYYjdqjihFaEoZpXBREanuJoRI6 +cibFinq4ngUKh/wQd/H5ofYCZ0HJXR62opZFaAT0iFIZo4DIiUojkjeqKiuoZirKo5Y1a7AWckGa +BkuYoD5lpDK6eUs6CkDqpETwl1EqpfhJpVeKpVl6EgUAADs= + +--BOUNDARY-- diff --git a/test/test_all b/test/test_all index 5009f70..c6a5498 100755 --- a/test/test_all +++ b/test/test_all @@ -93,6 +93,7 @@ test_save() { test_save msg_07.txt msg_07.txt 1-dingusfish.gif msg_07-1.txt --save-headers image/gif test_save msg_07.txt msg_07.txt 1-dingusfish.gif msg_07-2.txt --save-body image/gif test_save msg_07.txt msg_07.txt 1-dingusfish.gif msg_07-3.txt --save-message image/gif +test_save msg_07-1.txt msg_07-1.txt 1-dingusfish.gif msg_07-4.txt --save-message image/gif if [ "$RC" -eq 0 ]; then echo "All tests passed!" -- 2.39.5