Ricardo Stella wrote:

"Roberto S. G." wrote:


hi,
i've been posting some messages to this forum regarding PDF attachments
being mangled
when downloaded/opened throu squirrelmail.
i'd like to inform some people who had the same problem, that the
problem isn't in squirrel:



I disagree, based on this simple test I just did:

I downloaded the i1040ez.pdf form from the IRS web site.
I saved it to the desktop.
I sent it to myself with SQMail

Now, I opened with IE (6.02 XP-SP2):

* Clicking on the file name under Attachments, tries to open within the
frame (via the Acrobat plugin), and I got the blank page

* Clicking on the 'download' link, it opens Acrobat reader standalone,
and it opens without problems

Now, I opened with Netscape Communicator 4.x (without the Acrobat
Plugin)

* Clicking on the file name under Attachments, fires Acrobat standalone,
and I get:

"Adobe reader could not open 'xxxxxx.pdf' because it is either not a
supported file type or because the file has been corrupted (for exampel,
it was sent as an email attachment and wasn't correctly decoded)."

* Clicking on the 'donwload' link, it defaults to 'save-as' (That's how
Netscape is configured)

Now, using Netscape Communicator 4.x (with the Acrobat Plugin)

* Clickin on the file name, does not give any errors, but the
right-frame gets completely stuck

The link to the filename is:

http://xxxx/webmail/src/download.php?startMessage=1&passed_id=448129&mailbox=INBOX&ent_id=2

The link to the download option is:

http://xxx/webmail/src/download.php?absolute_dl=true&passed_id=448129&mailbox=INBOX&ent_id=2

Bringing up both files in a hex editor, shows that the bad version (via
filename) is completely different than the 'download' version.  Even
though they are the same size...

My .02...

hi Ricardo,

First of all, if some squirrel guru is able to redirect me (or the problem) to the correct (if this is not) forum for this problem (php, mail standards, microsoft ???), I'll be grateful...

yes, i'd heard before about squirrel different behaviours with download and view links...
but i think that my problem is not related to that one:
I have a SquirrelMail v1.4.3RC1, and I previously also have the previous stable 1.4.1.
I always obtain the same attached file (in binary comparing), whichever link i use. And it's always damaged in the same point.
In order to reproduce the problem, i reproduce below my compiled instructions I posted before...


Everybody can check this "strange behaviour" of outlook 2000 (and nexts versions): send with it a pdf (1.4 format always fail, previous formats may/or not pass ok) file to any web mail viewer... for example an account on yahoo or hotmail... and you won't be able to correctly open it... send it with any other email client... and you'll see it.

bye
----------------
compiled notes from my posts:
1.
I've gone deeper into my problem: i've checked the file in the server: it's "Content-Transfer-Encoding: quoted-printable" encoded in the mail recipient, and i'm almost sure it's ok: a POP connection or an IMAP FETCH via telnet 143 shows a perfect attachment...
The decoding process involves, as far as i've seen, the next points:
it's almost ascii (a pdf ascii formated) with just "Lf" line returns, except for lots of "=XX" codes ("quoted-printable" codes)... i've noted that these codes are again decoded into "8 bit chars"... and i've seen that all of them are correctly managed, and with a little trick:
an "=" char at end of line means: "delete next line jump, cause this is a single line" (this is correctly done),
but after all this decoding has been done "a second decoding applying the same rules is made", to what should be left as is... and i have enough bad lucky that an ascii encoded image in the pdf file contains a "=" at the end of a line... so I end up with some lines with double length and a char less... and the pdf is that way mangled. (It's still managed (partially) with Acrobat 5, but Acrobat 6 is not able to patch the errors, and fail to open it).
2.
i've like to note that outlook (from 2000 version) use to send some file attachements as "quoted-printable", while any other email client I've seen always use "bin64"... but, intriguing enough, it only seems to affect to PDF files... the rest are always sent as bin64.
3.
Everybody can check this "strange behaviour" of outlook 2000 (and nexts versions): send with it a pdf 1.4 file to any web mail viewer... for example an account on yahoo or hotmail... and you won't be able to correctly open it... (the problem in this case is different from squirrel: break line conventions). Send it with any other email client... and you'll see it.
4.
after spending a lot of time (and i mean a lot) with this subject, i've concluded that
the problem is that "outlook 2000 (and next versions) sends PDFs using quoted-printable
encoding, which is not conform to conventions"... (for binary data... RFC 2045 6.5 2nd paragraph,
does not assure attachment integrity, just says "are not likely to change". (And see final assertions)).
In fact, this outlook behaviour leads to mangled pdfs (using last adobe) in almost every web-mail
i've checked (yahoo, hotmail, squirrel...).
There's no way to use the correct bin64 with pdfs in outlook 2000 (and next versions): the
program decides what to use, bin64 or quoted-p, which i think is quite dumb...
The only workaround is using winzip... (microsoft KB 178241 ? ).
----------------
(test file: http://img93.exs.cx/img93/5648/file_PDF14pdf.jpg (dwnld with some dwnld manager, & rename from jpg to pdf)).





------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl -- squirrelmail-users mailing list Posting Guidelines: http://squirrelmail.org/wiki/wiki.php?MailingListPostingGuidelines List Address: [EMAIL PROTECTED] List Archives: http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=2995 List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Reply via email to