Tcl Library Source Code

View Ticket
Login
Ticket UUID: 531541
Title: Partial message construction
Type: RFE Version: None
Submitter: andreas_kupries Created on: 2002-03-18 20:47:58
Subsystem: mime Assigned To: mrose
Priority: 5 Medium Severity:
Status: Open Last Modified: 2003-05-10 02:10:39
Resolution: Closed By:
    Closed on:
Description:
See Tcllib FR #531531 and Tcllib FR #527114
for supplemental information.

It would be convenient for the pop3 server
if the mime package could construct/copy
partial messages containing a specified number
of lines of the body. The implementation of
the pop3 TOP command would benefit greatly from
this.

I know that I could construct the whole message
in memory and then simply cut of the transfer
after the specified number of lines but this
means that the system will consume a lot of memory
when it comes to big messages.
User Comments: andreas_kupries added on 2003-05-10 02:10:39:
Logged In: YES 
user_id=75003

mime::buildmessage is like copymesage, but constructs the 
final message in memory, as a string instead of writing 
directly to a channel.

I will think more about this.

mrose added on 2002-03-21 09:12:35:
Logged In: YES 
user_id=24077

i guess i'd have to understand how the mime token is being 
constructed in order to figure out the best way to do 
this. for example, i don't know what mime::buildmessage is.

certainly, we could add a switch to mime::copymessage to 
accomplish what you want...

/mtr

andreas_kupries added on 2002-03-20 05:14:36:
Logged In: YES 
user_id=75003

Note that Tcllib FR #527114 now has docs attached, so the 
interface between pop3 server and its storage backend is
now specified, and definitely a mime token (This makes 
things like dot-stuffing much easier for me, as I can rely 
on the functionality in mime and don't have to reimplement 
it again).

andreas_kupries added on 2002-03-20 04:58:57:
Logged In: YES 
user_id=75003

Marshall, this is not about what a user got from pop,
but about the innards of a pop3 server.

Scenario:
User contacts pop3 server, opens a mailbox, then
asks for the first 10 lines of the message 5
(TOP command). The pop3 server executes a callback
to get the mail to send. The result of that
callback is a mime token. Now I want to use an
extended "mime::copymessage" or now "copypartial"
command in the pop server to construct and send
the partial message over the pop3 connection to the
user who requested the partial mail.

Right now I am using "mime::buildmessage" and a
split/lrange/join combo to get the partial message.

mrose added on 2002-03-19 04:57:12:
Logged In: YES 
user_id=24077

certainly you an do something like

mime::initialize -string "whatYouGotFromPOP"

but the issue, i guess, is what to do if it's a 
multipart...