[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Problems with kio and smtp
From:       Marc Mutz <marc.mutz () uni-bielefeld ! de>
Date:       2003-09-30 21:30:21
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Monday 22 September 2003 21:00, Richard Lärkäng wrote:
> A small testcase is attached.

Sorry, had I recognized the testcase as a test program and not a file, 
the bugzilla dialog would've been much more effective ;-) Sorry.

In short: You send a message that does not end in newline. This is not 
possible with SMTP. The message needs to be terminated with \r\n.\r\n 
and the first \r\n is part of the message text[1].

The only way I can think of to send text not ending in newline and no 
newline being added is to wrap the text/plain part into a multipart/
mixed. In that case, if the text/plain part ends like:

....
last line (no newline)
--boundary--

the \r\n following "(no newline)" is part of the boundary string, so the 
actual content of the t/p attachment does not end in newline.

But then, the receiver needs to be able to handle mp/mixed with a single 
t/p part...

Marc

[1] rfc 2821:
   The mail data is terminated by a line containing only a period, that
   is, the character sequence "<CRLF>.<CRLF>" (see section 4.5.2).  This
   is the end of mail data indication.  Note that the first <CRLF> of
   this terminating sequence is also the <CRLF> that ends the final line
   of the data (message text) or, if there was no data, ends the DATA
   command itself.  An extra <CRLF> MUST NOT be added, as that would
   cause an empty line to be added to the message.  The only exception
   to this rule would arise if the message body were passed to the
   originating SMTP-sender with a final "line" that did not end in
   <CRLF>; in that case, the originating SMTP system MUST either reject
   the message as invalid or add <CRLF> in order to have the receiving
   SMTP server recognize the "end of data" condition.

-- 
There are lots of hackers in the world -- kids, mostly -- who like to
play at politics and dress their own antics in the trappings of
terrorism. [...] It's base and despicable, and it causes real damage,
but it's cyberhooliganism, not cyberterrorism.
                             -- Bruce Schneier, Crypto-Gram Jun 2003

[Attachment #5 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic