Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #8091 > unrolled thread

Emails backup in python 3.2

Started byTheSaint <nobody@nowhere.net.no>
First post2011-06-21 21:03 +0800
Last post2011-06-22 19:20 +0800
Articles 3 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  Emails backup in python 3.2 TheSaint <nobody@nowhere.net.no> - 2011-06-21 21:03 +0800
    Re: Emails backup in python 3.2 Michael Hrivnak <mhrivnak@hrivnak.org> - 2011-06-22 00:20 -0400
      Re: Emails backup in python 3.2 TheSaint <nobody@nowhere.net.no> - 2011-06-22 19:20 +0800

#8091 — Emails backup in python 3.2

FromTheSaint <nobody@nowhere.net.no>
Date2011-06-21 21:03 +0800
SubjectEmails backup in python 3.2
Message-ID<itq4qa$31r$1@speranza.aioe.org>
Hello,
I'm looking for an idea how to backup emails retrieved by poplib and save 
them into mailbox.mbox file.
The problem is the received message which is a list of bytes streams, 
mailbox.mbox don't expect a list.
What conversion should I do?
A file type io.StringIO ?
decoding every bytes stream which might not have any declared codec?

As far as python moved into unicode, why doesn't it handle these undecoded 
bytes as it was with strings before?

-- 
goto /dev/null

[toc] | [next] | [standalone]


#8181

FromMichael Hrivnak <mhrivnak@hrivnak.org>
Date2011-06-22 00:20 -0400
Message-ID<mailman.269.1308716455.1164.python-list@python.org>
In reply to#8091
Why not use one of the many projects and products that are designed to
store email?  Do you have a special reason for wanting to implement
your own email storage?

I'm thinking that you can use fetchmail with your favorite mail store,
and you won't need to write any code at all.

http://fetchmail.berlios.de/

Michael

On Tue, Jun 21, 2011 at 9:03 AM, TheSaint <nobody@nowhere.net.no> wrote:
> Hello,
> I'm looking for an idea how to backup emails retrieved by poplib and save
> them into mailbox.mbox file.
> The problem is the received message which is a list of bytes streams,
> mailbox.mbox don't expect a list.
> What conversion should I do?
> A file type io.StringIO ?
> decoding every bytes stream which might not have any declared codec?
>
> As far as python moved into unicode, why doesn't it handle these undecoded
> bytes as it was with strings before?
>
> --
> goto /dev/null
> --
> http://mail.python.org/mailman/listinfo/python-list
>

[toc] | [prev] | [next] | [standalone]


#8197

FromTheSaint <nobody@nowhere.net.no>
Date2011-06-22 19:20 +0800
Message-ID<itsjpp$p1c$1@speranza.aioe.org>
In reply to#8181
Michael Hrivnak wrote:

> Do you have a special reason for wanting to implement
> your own email storage?

Learning python :)

It seems very easy to get my mails with the poplib help.
Usually I work with Kmail which imports mbox files.
I'm not prone to set up a SMTP server on my PC.

-- 
goto /dev/null

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web