Bug 770782

Summary: mutt does not handle attachments properly with an existing mailcap file
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: mailcapAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: hhorak, mlichvar, pertusus, rdieter, ville.skytta
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-05 18:21:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Jaegermann 2011-12-29 04:30:53 UTC
Description of problem:

Assume that one of mail message attachments is a some_picture.jpg JPEG file and mutt read this message and that we are in attachment menu.  Putting a cursor on 'some_picture.jpg' entry and hitting return results in an alert with:

No images found in 'file:///tmp/some_picture.jpg'.

Closer check reveals that mutt does write /tmp/some_picture.jpg but with

image/*; /usr/bin/xdg-open %s

entry in /etc/mailcap fails to handle it.  This does work if /etc/mailcap line is replaced with

image/*; /usr/bin/xdg-open %s ; copiousoutput

The same goes if an attachment is of application/pdf type and the same cure applies.  I strongly suspect that this will be also the case with every MIME type where an external handler is required although I bumped into that with images and checked for PDF too but not for anything else.

Version-Release number of selected component (if applicable):
mutt-1.5.21-7.fc16.x86_64

Additional info:
I know for sure that sometime in the past mutt in Fedora 14 did NOT require 'copiousoutput' and worked without that fine but I cannot tell now if this was the case with the latest F14 updates.  I can confirm, though, that
mutt-1.4.2.2-3.0.2.el5 has not problems with "missing" 'copiousoutput'.  I cannot tell if this change was deliberate; I failed to find anything on this in ChangeLog.

Comment 1 Michal Jaegermann 2011-12-29 05:20:08 UTC
Additional check reveal that these are entries with /usr/bin/xdg-open, or apparently some other intermediary shell script, which require 'copiousoutput'.
That means that with 'application/pdf' this does NOT work:

application/pdf; /usr/bin/xdg-open %s

but either of the following two (assuming evince installed):

application/pdf; evince %s
application/pdf; /usr/bin/xdg-open %s ; copiousoutput

is fine.

Hm, that likely means this this worked with mutt-1.4.2.2-3.0.2.el5 just because
a corresponding mailcap entry was of a type 'application/pdf; evince %s'.

Comment 2 Honza Horak 2012-01-05 14:55:23 UTC
Hi, I see the same behavior, but /etc/mailcap is a part of mailcap package, so re-assigning this bug to that one.

Comment 3 Ville Skyttä 2012-01-05 18:21:53 UTC

*** This bug has been marked as a duplicate of bug 653249 ***