Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: PDF file attachments gets corrupted

  1. #1
    wiscalico is offline Intermediate Member
    Join Date
    Jul 2007
    Posts
    16
    Rep Power
    6

    Default PDF file attachments gets corrupted

    Hi.

    I have a problem sending PDF's to some of my customers via Zimbra webinterface (only tried using the web GUI). I can't reproduce the same problem sending the same PDF file from ie. Gmail.

    I've saved the 2 emails (the on with the problem and the one without) to eml files to look inside and I can see PDF files are attached differently:

    PDF sent from Zimbra web GUI (this files gets corrupted on the customer end):

    Code:
    snip
    
    ------=_Part_1982_12082751.1214481564556
    Content-Type: application/pdf; name=100075.pdf
    Content-Transfer-Encoding: 7bit
    Content-Disposition: attachment; filename=100075.pdf
    
    %PDF-1.4
    1 0 obj
    <<
    /Creator (Oracle10gR2 AS Reports Services)
    /CreationDate (D:20080626115829)
    /ModDate (D:20080626115829)
    /Producer (Oracle PDF driver)
    /Title (test@domain.com)
    /Author (Oracle Reports)
    >>
    endobj
    5 0 obj
    <</Length 6 0 R
    /Filter [/ASCII85Decode /FlateDecode]
    >>
    stream
    Gb!#\9lJcU&A9%PIi.8-+==e6gb8M'>,3H6''YLbPs[/mRKbC5VKRLjrV)jcIYa0.:bmDH%*R5m
    c/\6YbaY/O3^7+<A&&h-.a*5m^^<HdT"i&Fr]38j!bJ_l,V]/$4S4nnJ8j<?Tn(JHi9KhOL\NrY
    +>th!p?VP-9m(n3<8^sg!=QuIMU0VODAbu<o[WEnB,@2Ts8DCjW;]%LZ4Te+7Y"sf%pD(#c8n(#
    
    snip
    PDF sent from gmail (the one that works):

    Code:
    snip
    
    ------=_Part_1766_3760052.1214481631884
    Content-Type: application/pdf; name=100075.pdf
    Content-Transfer-Encoding: base64
    X-Attachment-Id: f_fhxazrk00
    Content-Disposition: attachment; filename=100075.pdf
    
    JVBERi0xLjQNCjEgMCBvYmoNCjw8DQovQ3JlYXRvciAoT3JhY2xlMTBnUjIgQVMgUmVwb3J0cyBT
    ZXJ2aWNlcykNCi9DcmVhdGlvbkRhdGUgKEQ6MjAwODA2MjYxMTU4MjkpDQovTW9kRGF0ZSAoRDoy
    MDA4MDYyNjExNTgyOSkNCi9Qcm9kdWNlciAoT3JhY2xlIFBERiBkcml2ZXIpDQovVGl0bGUgKGxt
    bEBjYXJnb21hc3Rlci5kaykNCi9BdXRob3IgKE9yYWNsZSBSZXBvcnRzKQ0KPj4NCmVuZG9iag0K
    
    snip
    I had the customer send back the corrupted PDF and when I run a diif on the corrupted PDF and they look almost the same a side from each line seems to have a dot prepended... here is a snip:

    Code:
     diff 100075.pdf 100075_corrupted.pdf
    125,129c125,129
    < .WS1MZ&UjE!*Ql5.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!
    < .&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!
    < .&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!
    < .&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!
    < .&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!j#fik
    ---
    > ..WS1MZ&UjE!*Ql5.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!
    > ..&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!
    > ..&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!
    > ..&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!
    > ..&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!.&)S!j#fik
    139c139
    < .)%4tIh@a!,DJ[ESJgCEiQ\ou'U[^NCRF7H>uhbI`RjfZrX'tO!!P@W4oYKbm.`U!%u@gCKtL.M
    ---
    > ..)%4tIh@a!,DJ[ESJgCEiQ\ou'U[^NCRF7H>uhbI`RjfZrX'tO!!P@W4oYKbm.`U!%u@gCKtL.M
    
    snip

    The error seems to be a combination error where Zimbra is part of the equation... some customers doesn't have problemes viewing the PDF's and others (always the same) does. If I send the same PDF's from something else like Gmail all customers can view the PDF's. But I'm not convinced that Zimbra is making the error but I would like to know if there is anything I can change in Zimbra so all my customers can receive the PDF's without any hassel?
    Last edited by wiscalico; 08-14-2008 at 02:45 AM.

  2. #2
    nrc
    nrc is offline Special Member
    Join Date
    Mar 2007
    Location
    Columbus, OH
    Posts
    166
    Rep Power
    7

    Default

    The two dots are part of the SMTP protocol - see section 4.5.2 of RFC2821.

    http://www.ietf.org/rfc/rfc2821.txt

    - Before sending a line of mail text, the SMTP client checks the first character of the line. If it is a period, one additional period is inserted at the beginning of the line.

    - When a line of mail text is received by the SMTP server, it checks the line. If the line is composed of a single period, it is treated as the end of mail indicator. If the first character is a period and there are other characters on the line, the first character is deleted.
    So something isn't following the rules. This problem may be caused by one of the SMTP hops between you and your recipient. If you send the attachment to yourself at Gmail is it corrupted?

    What version of Zimbra are you running?

  3. #3
    wiscalico is offline Intermediate Member
    Join Date
    Jul 2007
    Posts
    16
    Rep Power
    6

    Default

    If I send the PDF to my Gmail account everything works just fine.

    This happens with both Zimbra version 5.0.5 and 5.0.6.

  4. #4
    nrc
    nrc is offline Special Member
    Join Date
    Mar 2007
    Location
    Columbus, OH
    Posts
    166
    Rep Power
    7

    Default

    So it seems likely that everything is ok with Zimbra. It sounds like either Gmail is taking a different path to your customer and avoiding a broken SMTP server or their MTA recognizes the broken SMTP service and handles it.

    If your recipient can provide you with a full copy of received headers from the Gmail message and the Zimbra message that may show the difference in paths and identify potentially broken relays.

  5. #5
    wiscalico is offline Intermediate Member
    Join Date
    Jul 2007
    Posts
    16
    Rep Power
    6

    Default

    I can't really change how the relays work even though they are the ones with the fault.

    Can I do anyting within Zimbra to change who it attaches PDF files without assigning a person zip every PDF file and one in the other end to unzip em again

  6. #6
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    716
    Rep Power
    8

    Default

    For a correct diagnosis that unfortunately didn't lead to a more general fix, see comment 22 at Bug 15612 &ndash; zimbra corrupts pdf generated by ms office with acrobat distiller

    ZWC blindly trusts the client browser to encode attachments in a reasonable way (MIME type tagging, choice of ascii/base64/qp encoding). GMail and other webmails do more second-guessing of untrustworthy user input and re-encode as appropriate.

    I've seen a lot of cases where people couldn't attach (for example) Word or Excel files because a bad MIME response from some completely unrelated web server was trusted by Firefox, causing subsequent uploads of said file type to *any* web application to be encoded incorrectly.

    The "solution" to bug 15612 was to hard-code a specific fix to a specific instance of the general problem. I've had a couple support cases open on permutations of the issue but haven't gotten much traction.

  7. #7
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    716
    Rep Power
    8

    Default

    Oh, as a workaround: IE and Safari are less likely to get uploaded file types/encodings wrong than Firefox.

  8. #8
    wiscalico is offline Intermediate Member
    Join Date
    Jul 2007
    Posts
    16
    Rep Power
    6

    Default

    Quote Originally Posted by Rich Graves View Post
    IE and Safari are less likely to get uploaded file types/encodings wrong than Firefox.
    I tried using IE 7.0.5730.11 on a Windows XP platform PDF's on the recieving side are still bugged

  9. #9
    rabati is offline Junior Member
    Join Date
    Mar 2008
    Posts
    5
    Rep Power
    6

    Default

    We have the same problem, after upgrade from 5.0.2 to 5.0.7 sometimes, attachment in PDF (generated with distiller) are corrupted but only with firefox.

    We are uning zimbra since 4.5 and we never had this kind of problem (30 users)

  10. #10
    langs's Avatar
    langs is offline Special Member
    Join Date
    Sep 2006
    Location
    Brisbane
    Posts
    130
    Rep Power
    7

    Default

    Has there been any more thought on this? As today I am getting the behavior on a couple of my users.

    With one it only seems to be effecting some pdf's generated by our ERP, however its the same pdf being sent to about a dozen of my other users and for them it works fine.

    The other user complaining about this it seems to be randomly effecting pdf's no matter the source, ie one of my other users sent him 3 email with 3-4 pdfs in each and about half work and half don't.

    With both users if they fwd the emails to themselves the attachments work fine.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. speed up the net
    By mcesari in forum Administrators
    Replies: 10
    Last Post: 04-25-2008, 11:24 AM
  2. centos 5 zimbra 4.5.6 no statistics
    By rutman286 in forum Installation
    Replies: 9
    Last Post: 08-14-2007, 09:30 AM
  3. Opensource backup Question.
    By nfear24 in forum Administrators
    Replies: 3
    Last Post: 03-31-2007, 11:47 PM
  4. Traslation SVN tree status
    By meikka in forum I18N/L10N - Translations
    Replies: 7
    Last Post: 02-13-2007, 10:13 AM
  5. M3 problem with shares
    By titangears in forum Users
    Replies: 4
    Last Post: 01-12-2006, 12:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •