VM

Problem downloading attachments of external messages

Bug #1188241 reported by Uday Reddy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VM
Triaged
High
Uday Reddy

Bug Description

Alan Wehmann reports (viewmail-bugs, 2013-06-06):

During testing of "External Messages" I sent three test emails to the
imap server that were greater than 50K in size (besides these, there
were several others that arrived independently). Each of my test
emails had a PDF file attached. Using the "display" button in the
presentation buffer, the PDF files were not successfully displayed in
Adobe Reader.

Here are some relevant variable values (perhaps repeated later, via the bug report):

"vm-primary-inbox is imap-ssl:email.fnal.gov:993:inbox:login:wehmann:*
vm-imap-account-alist is ((imap-ssl:email.fnal.gov:993:login:wehmann:* fermi_email))
vm-enable-external-messages is (imap)
vm-external-fetch-message-for-presentation is nil
vm-external-fetched-message-limit is 11
vm-imap-max-message-size is 50000
vm-imap-sync-on-get is nil
tls-program is (gnutls-cli --x509cafile /usr/ssl/certs/ca-bundle.crt --insecure -p %p %h)"

I did some investigating, using Edebug. I noted that the file
inserted in the temporary directory ("c:/Documents and
Settings/Alan/Local Settings/Temp" in my case) had zero length. This
is why Adobe Reader complained about it.

Tags: imap external
Revision history for this message
Uday Reddy (reddyuday) wrote :

Notes:

The MIME layout entry has beginning and the end markers of the attachment pointing to the same position. Hence, a file with zero length got saved.

This seems similar to the problem reported by Arik (Bug 740755).

Revision history for this message
Alan Wehmann (alan-wehmann) wrote :

I'm probably an amateur at diagnosing a problem like this, but that doesn't seem to stop me from trying.

There is code in 'vm-decode-mime-message that does 'delete-region in the Presentation Buffer for a message that is fetched from the IMAP server (because it exceeds the size limit that I imposed). It is after that use of 'delete-region that the layout markers are defective and can no longer do their job (i.e. they get inserted into the button extent for the attached PDF file and the button code creates a zero length temporary file for Adobe Reader).

An oversized message where "vm-load-message" is used, has its layout markers refer to the Folder buffer & therefore the 'delete-region in the Presentation Buffer does not affect those markers. Using the "display" button in the Presentation Buffer does give the right file attachment to Adobe Reader.

Revision history for this message
Alan Wehmann (alan-wehmann) wrote :

I thought it would be a learning experience to see if I could circumvent this bug by not allowing the "delete-region" to take place, if the overlay markers were referring to the Presentation buffer, and instead use narrowing in the Presentation buffer to hide what would have been deleted. This approach is minimalist and perhaps simplistic, but seems to work. One example of it being simplistic is that it ignores the issue described in . <a href="https://bugs.launchpad.net/vm/+bug/1068460">bug 1068460</a>.

Uday Reddy (reddyuday)
Changed in vm:
milestone: 8.3.2a → 8.3.1a
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.