Attached is the entire pop3.tcl with the proposed
changes. I took the liberty of bumping up the
version from 1.6.3 to 1.7. Note that this code has
actually been in operation for almost two years.
First a minor performance improvement in RetrFast -
don't spend time splitting potentially large message
if not doing any debug logging.
Second is a new retrieval method - tofile.
Since POP3 messages can be very large, with
attachments that may never need to be processed in
tcl, to minimize memory usage, it may be best to
write the retrieved message to a temp file and return
the temp filename instead of the entire message.
# Alex Hisen ([email protected]) 2005-12-18:
# In order to provide support for the new tofile
# we need a way to generate temporary file
# We first try to use an AOLserver command if
# If not we try to see if our version of Tcl supports
# the file tempfile subcommand (see TIP #210:
# http://www.tcl.tk/cgi-bin/tct/tip/210.html )
# Finally we fallback to the tcllib fileutil package.
# Note that our package require fileutil is caught,
# if you don't have any of the three methods, this
# will work fine as long as you don't use tofile
# The Tempfile proc we create in our namespace
# the way TIP #210 prescribes - it opens the file for
# returns the open file channel, and sets the
# to the full path and name of the created temporary