[Mimedefang] Problem with MIME::Tools and base64 encoded message/rfc822 attachements

Faraz Vahabzadeh fzv at fzv.ca
Mon Jul 27 23:39:46 EDT 2015


Dianne is correct!

I guess the sample file is not a good one. Either the Content-Type has 
to change to "text/plain" or if you are really dealing with such badly 
constructed messages in real life then as the man page for Mime::Parser 
suggests just turn off nested message extraction ($parser->extract_nested_messages(0);)
which treats that particular mime part as "text/plain".

And adding MIME::Tools->debugging(1); can help a lot debugging your 
program.

Cheers,
--fzv

On Mon, 27 Jul 2015, Dianne Skoll wrote:

> On Tue, 28 Jul 2015 00:35:52 +0200
> Franz Schwartau <franz at electromail.org> wrote:
>
>> Why doesn't it work with a base64 encoded attachement?
>
> RFC 2046, section 5.2.1: https://tools.ietf.org/html/rfc2046#section-5.2.1
>
>   No encoding other than "7bit", "8bit", or "binary" is permitted for
>   the body of a "message/rfc822" entity.
>
> So the answer is in the RFC: You're not allowed to use base64 encoding
> for a message/rfc822 attachment.
>
> Regards,
>
> Dianne.



More information about the MIMEDefang mailing list