473,396 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problem with quopri in email

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
Jul 18 '05 #1
2 1707
Benjamin Niemann <b.*******@betternet.de> writes on Fri, 03 Sep 2004 18:00:50 +0200:
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" />...


This is not a "quopri" problem but an SMTP problem.

The SMTP protocol requires that a dot at the beginning of a line
is escaped by doubling (because it uses a line consisting of a
single dot as end of message indicator). Of course, the SMTP reader
is expected to remove this dublicated dot again.
Somehow, your SMTL sender or reader got something wrong with
the handling of a dots at the beginning of a line.
Dieter
Jul 18 '05 #2
Dieter Maurer wrote:
Benjamin Niemann <b.*******@betternet.de> writes on Fri, 03 Sep 2004 18:00:50 +0200:
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" />...

This is not a "quopri" problem but an SMTP problem.

The SMTP protocol requires that a dot at the beginning of a line
is escaped by doubling (because it uses a line consisting of a
single dot as end of message indicator). Of course, the SMTP reader
is expected to remove this dublicated dot again.
Somehow, your SMTL sender or reader got something wrong with
the handling of a dots at the beginning of a line.

Seems to be rather common, as the dots in the quotation above are
duplicated, too ;)
Wouldn't it then make sense that the quopri encoder encodes a dot at the
beginning of a line as =2E ?? In a perfect world not, but obviously we
have to live with broken software that we cannot control.
At least this pointed me to a possible solution. When I will find the
time, I'll try to hack the encoder a bit and see if this fixes the problem.

Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: newbie_mw | last post by:
Hi, I need urgent help with a novice problem. I would appreciate any advice, suggestions... Thanks a lot in advance! Here it is: I created a sign-up sheet (reg.html) where people fill in their...
5
by: Bruce W...1 | last post by:
In my effort to learn PHP I'm playing with some simple email scripts. They worked a few days ago but they stopped working. The only thing I've done to this Windows 2000 PC in this time was a...
5
by: George | last post by:
VB.net 2003 standard, XP windows home edition. Installed first application OK today. When I removed the application via Control Panel, there were no problems and the app folders were deleted. ...
1
by: kristian.hermansen | last post by:
keherman@ibmlnx20:/tmp$ cat helloworld.py #!/usr/bin/env python import pygtk pygtk.require('2.0')
1
by: GM | last post by:
Dear all, The problem that I am facing now is that, when I use poplib to get a email message with chinese character set like big5, the character string is changed automatically to sth like...
2
by: joseph2000 | last post by:
Hi, I have problem with e-mails which are being send via System.Web.Mail.SmtpMail class but before describing the problem itself first I'd like to show shortly what I'm doing on the server. ...
3
by: Steven Allport | last post by:
I am working on processing eml email message using the email module (python 2.5), on files exported from an Outlook PST file, to extract the composite parts of the email. In most instances this...
1
by: Ana RM | last post by:
Mark.Powell@eds.com (Mark D Powell) wrote in message news:<2687bb95.0308010642.1fc4ff1f@posting.google.com>... Hi Mark, Thanks por answer me. I do not think it is important thw warehouse...
6
by: Tomasz J | last post by:
Hello developers, I bind my TextBox control specyfying a format stored in my application global ApplicationContext object - it has a static string CurrencyFormat property. The problem - this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.