dataflake.org

Home Documentation Software Old Stuff Bug Reporting

MaildropHost fails on folded To / From-Headers (Resolved)

Request MaildropHost -- bug report -- by Maik Jablonski
Posted on Nov 25, 2004 2:39 pm
Subscribe

Enter your email address to receive mail on every change to this issue.

Entries (Latest first)


  Comment by Jens Vagelpohl on Nov 26, 2004 2:57 am
  It's in CVS now.

 

  Comment by Maik Jablonski on Nov 26, 2004 2:54 am
  --- MaildropHost.py~ 2004-11-25 20:46:58.000000000 +0100
Sorry for incomplete patch, but the updated version in CVS isn't complete yes. The following patch needs to be applied too:

+++ MaildropHost.py 2004-11-25 20:46:58.000000000 +0100
@@ -120,3 +120,3 @@
if not isinstance(mto, StringType) or not isinstance(mto, UnicodeType):
- self.m_to = ','.join(mto)
+ self.m_to = ','.join(mto).replace('\r','').replace('\n','')
else:
@@ -149,3 +149,3 @@
if not isinstance(mto, StringType) or not isinstance(mto, UnicodeType):
- self.m_to = ','.join(mto)
+ self.m_to = ','.join(mto).replace('\r','').replace('\n','')
else:
 

  Resolve by Jens Vagelpohl on Nov 26, 2004 2:43 am
  Fixed in CVS.

Please include the complete patch when you send patches. This one was missing stuff, like the lines that have the filename to patch in there... I had to type the changes in manually again, and who knows what that might break.

jens
 

  Comment by Maik Jablonski on Nov 25, 2004 2:43 pm
  Similar fix needs to be applied to lines 121 and 150.
 

  Initial Request by Maik Jablonski on Nov 25, 2004 2:39 pm
  If a "folded" From-/To-Header is fed to MaildropHost, the worker-thread fails sending a valid email.

Example: If a Mail-From-Header looks like:

From: Maik Jablonski
<maik.jablonski@uni-bielefeld.de>

the result in the spooled mail will be:

##From: Maik Jablonski
<maik.jablonski@uni-bielefeld.de>

But the mailworker expects the special To-/From-Header in a single line.

Easiest fix would be in MaildropHost.py:

123,124c123,124
< self.m_to = mto
< self.m_from = mfrom
---
> self.m_to = mto.replace('\r','').replace('\n','')
> self.m_from = mfrom.replace('\r','').replace('\n','')
152,153c152,153
< self.m_to = mto
< self.m_from = mfrom
---
> self.m_to = mto.replace('\r','').replace('\n','')
> self.m_from = mfrom.replace('\r','').replace('\n','')