[Tutor] send file/mail to imap

Tim Golden mail at timgolden.me.uk
Fri Dec 28 16:51:28 CET 2007


Tim Michelsen wrote:
> I have a mbox file locally on my notebook.
> 
> I would like to send this file to my IMAP account using python.

Ummm. There seem to be two possible sources of confusion here.

Number one is that you don't normally "send" things via IMAP,
you use the IMAP protocol to *read* messages from a server-based
mail store of some sort.

Number two is that it's not clear whether the "mbox file" is
merely coincidentally a mbox file (ie it might as well be a
text file or a Word doc) or is -- as seems most likely -- a
real mailbox which you want to make available to normal email
clients via your IMAP server.

So... reading way too much between the lines, I deduce that you
want to have the mails in your mbox file available to your
mail clients via your IMAP server. Am I right?

If so, you don't want to use an IMAP client, you want some
other kind of file transfer mechanism, such as FTP or an scp
command to get the file into the appropriate place on your
mail server where the IMAP server will see it. You might
then have to subscribe to it from your clients; depends on
your setup.

TJG


More information about the Tutor mailing list