I used a copier/scanner to scan a document and email me the resulting image. It sent me several emails, each with a message/partial
MIME attachment. mutt
doesn't seem to understand these messages. What do I need to do to these to get my scanned image?
2 Answers
You need to use uudeview for this.
First, save all of the emails into their own mbox folder. Next, run uudeview
on that folder. When prompted, either press 'd' (for 'd'ecode) or just hit enter. That will create a text file containing the all of the encoded data for the file. Run uudeview
on that file to get the image you want.
For more information about the message/partial
MIME type, check out its definition in RFC 2046.
-
1If the solution above does not work, which is sometimes the case (maybe because of wrong order of messages within mbox?), I've found that Christian Herenz's solution below was still working.– JoceCommented Nov 10, 2015 at 16:25
Here is how I deal with such attachments in mutt
:
- I save the
message/partial
attachments in files namedpart_01
,part_02
etc. I then concatenate those files into a single file, e.g. in bash
for file in part_?? do cat $file >> full_message done
Lastly, I run uudeview on the
full_message
file.uudeview full_message
Notes:
- The only source from which I get these types of emails, are multi-page scans from "printer/fax/scanner/copier"-machines at my workplace (Ricoh Aficio MP C4501).
- The different "parts" are sent in different emails, with subjects
pdf copy from <printername> part <x>/<y>
where<printername>
is the name of the printer and<x>
is the part-number, and<y>
is the total number of parts. Oddly enough, these emails do not arrive in a ordered sequence within my inbox.
Caveat:
- The "manual saving" could be quite cumbersome if you have many parts. So far, I have never recieved more than 5 parts. Nevertheless, I'm of course interested in a more elegant solution.