Mailscanner corrupting pdf files

Plant, Dean dean.plant at ROKE.CO.UK
Thu Jul 24 17:01:26 IST 2003

Martin Sapsed wrote:
> Plant, Dean wrote:
>> I am having a problem with pdf files corrupting when passing through
>> the Mailscanner. If a mail with a pdf attachment is sent from one of
>> our clients, MS exchange encodes the message as either base64 or
>> quoted-printable format. All messages that are encoded as base64 pass
>> through the MailScanner correctly. Quoted-printable format mails
>> have the attachment corrupted. Turning off virus checks on
>> Mailscanner allows the quoted-printable mails to pass through
>> without corruption, so I assume it has something to do with:
>> 1. Perl Mime::tools - Is this decoding / encoding the attachment
>> correctly?
>> 2. MS Exchange - Why encode some pdf's as base64 and some as
>> quoted-printable
>> 3. Different versions/creators of pdf files.
>> Has anyone else suffered from this problem or does anyone have a
>> suggestion as a fix.
> I would say that PDF's ought to be encoded base64 everytime. I also
> wouldn't have thought that a PDF could survive being sent as
> Quoted-printable?
> After a quick search on Google RFC 1521 states "The Quoted-Printable
> encoding is intended to represent data that largely consists of octets
> that correspond to printable characters in the ASCII character set."
> and by my reckoning your average PDF file doesn't fit that
> description!
> I also didn't think that MailScanner altered content of messages
> unless it was told to because of some condition being met (striphtml
> or something like that). The virus scanner should just be presented
> with a copy of the attachment and asked if it's ok or not. I don't
> think that the attachment is removed and then reattached in some way.
> When you say you can turn scanning off and the quoted-printable PDFs
> go through ok, is this (at least one of) the same q-p PDFs which gets
> corrupted?
> Not much help really am I?? ;-)
> Cheers,
> Martin

Thanks for the reply.

I have a little more time to look at this and your correct about the virus scanning not being at fault. I forgot to mention that the Mailscanner adds a disclaimer, turning off the disclaimer stops the corruption of the pdf.

I found the below link which talks about a similar problem with mimedefang / Exchange & MIME::Tools.

Does anyone know if this could happen within mailscanner?



More information about the MailScanner mailing list