imp 3.0 - attachments problem - 0x0a being prepended

Scott Kearney skearney@fas.harvard.edu
Mon, 4 Mar 2002 11:51:26 -0500 (EST)


Hello all,

I'm trying to troubleshoot a problem with attachments on IMP 3.0
running on Horde 2.0 framework. Turba 1.0 is also configured. IE is having
more problems than Netscape, in that IE cannot save any attachments and NS
can save any of them.. However, neither browser can "view" the
attachments, and the files that Netscape is able to save are "corrupted"
by having linefeeds prepended to them. I'll try to run down what I've
tried, excuse my redundancies.

Other variables: 
 - IMAP server is uwash 4.4 (non-ssl)
 - apache 1.3.12 w/Raven SSL
 - php 4.1.1

imapd and Apache are on the same box. The box is running Digital Unix 4.0f
(OSF1).

The messages I am trying to view were sent by myself to myself using IMP.
The sending worked fine (AFAIK). 

Everything is working more or less fine, except for attachments. I've
tried a few different types in several different browsers, and this is
what I came up with:

browser + attachment type + action = result
-------------------------------------------
NS + html + view = fine
NS + html + save = fine*
IE + html + view = fine
IE + html + save = error
NS + gif/jpg + view = blank page
NS + gif/jpg + save = corrupt file
IE + gif/jpg + view = blank page
IE + gif/jpg + save = error

The "error" I'm getting with IE is a dialog box that pops up over the file
transfer box stating:

"Internet Explorer cannot download <filename> from <server.name.edu>.

Internet Explorer was not able to open this Internet site. The requested
site is either unavailable or cannot be found. Please try again."

Using netscape, I've downloaded and compared the email attachments with
the original files. The html file appears to have had two linefeeds or
carriage returns inserted at the top of it.

When I try to use "display" on the command line to view one of the images,
I get the following error: 
"display: Not a JPEG file: starts with 0x0a 0x0a (sheepcherokee04b.jpg)."

Note that original image (the one I emailed myself) displays fine.

So it looks to me like IMP is inserted some extra linefeeds to the front
of all attachments! Sadly, I don't know how to fix it. The only
modification I have made to IMP was following the instructions somebody
posted to make a mime viewer for images. Here is the URL for that message
on MARC:

http://marc.theaimsgroup.com/?l=imp&m=101285159129814&w=2

Those instructions did not have any impact on my problem, but I have not
removed them, as the changes did seem sensical to leave in.
--
Scott Kearney  
Web Developer
Faculty of Arts and Sciences, Harvard University

Email: skearney@fas.harvard.edu
Phone: 617-384-7201
Fax:   617-495-1210