1 |
* Walter Dnes <waltdnes@××××××××.org> [120723 17:48]: |
2 |
> My ISP emails invoices+receipts as PDF files. Thay made a change in |
3 |
> the "mime type" earlier this year that makes things more difficult... |
4 |
> |
5 |
> Before |
6 |
> ====== |
7 |
> [-- Attachment #2: blah_blah_blah.pdf --] |
8 |
> [-- Type: application/pdf, Encoding: base64, Size: 47K --] |
9 |
> |
10 |
> [-- application/pdf is unsupported (use 'v' to view this part) --] |
11 |
> |
12 |
> After |
13 |
> ===== |
14 |
> [-- Attachment #2: blah_blah_blah.pdf --] |
15 |
> [-- Type: application/octet-stream, Encoding: base64, Size: 79K --] |
16 |
> |
17 |
> [-- application/octet-stream is unsupported (use 'v' to view this part) --] |
18 |
> |
19 |
> With "Type: application/pdf" I hit "v" and epdfview brought up the |
20 |
> document. With "Type: application/octet-stream" I have to save the |
21 |
> attachment and manually open with epdfview. Mime-type is useless in |
22 |
> this situation. Is there a way to force the file to be opened based on |
23 |
> extension rather than mime type? |
24 |
> |
25 |
> -- |
26 |
> Walter Dnes <waltdnes@××××××××.org> |
27 |
|
28 |
I think you could use something like mutt.octet.filter (There's a perl |
29 |
version at http://www.davep.org/mutt/mutt.octet.filter.pl) to handle |
30 |
application/octet-stream mime types. |
31 |
|
32 |
It uses file to try to determine the proper type and can then use |
33 |
whatever is in your mailcap to determine what to run. |
34 |
|
35 |
It should be pretty easy to extend it to match on filename if you really |
36 |
wanted to. |
37 |
|
38 |
Todd |