Problem with quopri in email

Benjamin Niemann b.niemann at betternet.de
Fri Sep 3 12:00:50 EDT 2004


Hi,

I just sent a newsletter (HTML with <img>s) using a Python script.
Looking at the error_log of our web server, I'm seeing lots of 404 error for 
files like
/images/news/f68f57c1c67dc319d84f7c11c8b71b65jpeg
or
/images/news/f23a00f8bd912b73b4f63149cc808dbf..jpeg
(there should be exactly one dot...)

The corresponding parts of the quopri encoded HTML looks like this:
...<img=
src=3D"http://www.fujinews.de/images/news/f68f57c1c67dc319d84f7c11c8b71b65=
.jpeg" alt=3D"E550_seitliche_front_flash low res.jpg" vspace=3D"4" hspace=
=3D"4" border=3D"0" align=3D"left" />...

The dropped/duplicated dot is at the beginning of the line - other images are 
not affected.

Mailreaders with IE6 as HTML renderer make both mistakes (dropping and 
duplicating the dot), others like Lotus Notes 5 or various webmailers only 
duplicate the dot.

I'm using Python 2.2.1 on Debian 3.0
The version of email module is 2.5.3 (not the one from the Python2.2 package).

Whose fault is it?
I found nothing in RFC 1521 that disallows lines starting with a dot (unless 
it's the only character on the line) - the fragment above seems to be valid 
quoted-printable, as far as I can tell. Am I right?
If it is not a bug in the email module, has anyone ideas for a workaround?
(except forcing our client not to use Notes 5 anymore ;)


Greetings from Heidelberg,
	Benjamin Niemann



More information about the Python-list mailing list