Re: Garbage on pdf attachements using quoted-printable

From: Bjarni R. Einarsson (
Date: Wed 30 Apr 2003 - 00:49:55 GMT

  • Next message: Bjarni R. Einarsson: "Re: [patch] feat_force_name and text/html"

    On 2003-04-29, 18:00:24 (+0200), Emmanuel Lacour wrote:
    > Hi,
    > First, let's start with a true "thank you" to sanitizer author!! :-)))

    You're welcome. :)

    > I've got a problem with some pdf attachments.

    Yes, this is a known issue. For some reason some mail clients
    decide to use QP encoding for PDF attachments, even though QP
    encoding is invalid for any sort of binary data because of
    ambiguities in the QP standard.

    Basically, if you encode something with QP, there's no guarantee
    that it will be byte-for-byte the same when it's decoded. This is
    what is happening with the sanitizer - the sanitizer operates as a
    filter, and as such will first decode the attachment on the way in
    and then re-encode it on the way out, causing corruption.

    Currently the only way to avoid this problem is to wrap the
    sanitizer in a procmail ruleset or helper script which will
    quarantine the original unmodified message and use it verbatim if
    the sanitizer doesn't find any security risks in it.

    Bjarni R. Einarsson                           PGP: 02764305, B7A3AB89                -><-    

    Check out my open-source email sanitizer: Spammers, please send lots of mail to:

    Was I helpful? Let others know:

    hosted by