Discussion:
Moving messages from about 100 mbox files to imap server
Rainer M Krug
2015-03-24 10:06:12 UTC
Permalink
Hi

I have downloaded archives from a mailing list (in mbox format) and
would like to import them into gnus.

Is there any way that I can do this from gnus?

Thanks,

Rainer
--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
Rainer M Krug
2015-03-24 10:28:22 UTC
Permalink
Post by Rainer M Krug
Hi
I have downloaded archives from a mailing list (in mbox format) and
would like to import them into gnus.
OK - I converted them into maildir format and now I will put them into
dovecot.

Cheers,

Rainer
Post by Rainer M Krug
Is there any way that I can do this from gnus?
Thanks,
Rainer
--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
Rainer M Krug
2015-03-24 11:06:21 UTC
Permalink
Post by Rainer M Krug
Post by Rainer M Krug
Hi
I have downloaded archives from a mailing list (in mbox format) and
would like to import them into gnus.
OK - I converted them into maildir format and now I will put them into
dovecot.
OK - solved it.

Here my solution:

,----
| 1) I downloaded a script is from
| [[https://github.com/igor47/mailtools/blob/master/mbox2maildir.py]] and
| named it =conv.pl=
|
| 2) I run it together with =find= to iterate through all mbox files
|
| mkdir ./Maildir
| find . -name "MATCHING_THE_MBOX_FILES" -exec ./conv.pl {} ./Maildir/ \;
|
|
| 3) The files are created in =./Maildir/new=.
|
| 4) I then moved them to my maildir used by dovecot
|
| mv ./Maildir/new ~/Maildir/TARGETFOLDER/new
`----

And in gnus they showed op as new mails in the maildir.

Cheers,

Rainer
Post by Rainer M Krug
Cheers,
Rainer
Post by Rainer M Krug
Is there any way that I can do this from gnus?
Thanks,
Rainer
--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
Rainer M Krug
2015-03-26 09:52:03 UTC
Permalink
I wrote this =up in a blog post for reference:

https://rmkrug.wordpress.com/2015/03/26/convert-multiple-mbox-files-into-a-maildir/

Cheers,

Rainer
Post by Rainer M Krug
Post by Rainer M Krug
Post by Rainer M Krug
Hi
I have downloaded archives from a mailing list (in mbox format) and
would like to import them into gnus.
OK - I converted them into maildir format and now I will put them into
dovecot.
OK - solved it.
,----
| 1) I downloaded a script is from
| [[https://github.com/igor47/mailtools/blob/master/mbox2maildir.py]] and
| named it =conv.pl=
|
| 2) I run it together with =find= to iterate through all mbox files
|
| mkdir ./Maildir
| find . -name "MATCHING_THE_MBOX_FILES" -exec ./conv.pl {} ./Maildir/ \;
|
|
| 3) The files are created in =./Maildir/new=.
|
| 4) I then moved them to my maildir used by dovecot
|
| mv ./Maildir/new ~/Maildir/TARGETFOLDER/new
`----
And in gnus they showed op as new mails in the maildir.
Cheers,
Rainer
Post by Rainer M Krug
Cheers,
Rainer
Post by Rainer M Krug
Is there any way that I can do this from gnus?
Thanks,
Rainer
--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
Steinar Bang
2015-03-24 11:08:30 UTC
Permalink
Post by Rainer M Krug
I have downloaded archives from a mailing list (in mbox format) and
would like to import them into gnus.
Is there any way that I can do this from gnus?
I've never tried this, but:
G F <name-of-mbox-file>
should open the mbox file as an ephemeral nndoc group, and then you can
mark and move/copy the articles to a different group (eg. on an IMAP
server).
Adam Sjøgren
2015-03-24 11:25:54 UTC
Permalink
Post by Steinar Bang
G F <name-of-mbox-file>
should open the mbox file as an ephemeral nndoc group, and then you can
mark and move/copy the articles to a different group (eg. on an IMAP
server).
I've used that a bunch of times - it has worked well for me.


Just a data point,

Adam
--
"I got into the driver’s seat Adam Sjøgren
And I drove down 42nd Street ***@koldfront.dk
In my Cadillac
Good car to drive after a war"
Rainer M Krug
2015-03-24 12:06:06 UTC
Permalink
Post by Adam Sjøgren
Post by Steinar Bang
G F <name-of-mbox-file>
should open the mbox file as an ephemeral nndoc group, and then you can
mark and move/copy the articles to a different group (eg. on an IMAP
server).
I've used that a bunch of times - it has worked well for me.
I am sure that it works (I tried it as well) but it takes ages to open
an mbox file with thousands of emails - so no option if 100 mbx files
are involved.

But I managed using another script (see my other post)

Thanks,

Rainer
Post by Adam Sjøgren
Just a data point,
Adam
--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
Adam Sjøgren
2015-03-24 13:13:51 UTC
Permalink
Post by Rainer M Krug
I am sure that it works (I tried it as well) but it takes ages to open
an mbox file with thousands of emails - so no option if 100 mbx files
are involved.
Ahh, I misread - I thought it was one mbox with 100 emails in...

With 100 files, something more automated is definitely preferable.
(Altough in a pinch, a keyboard macro might be doable ;-))
Post by Rainer M Krug
But I managed using another script (see my other post)
Cool!


Best regards,

Adam
--
"Clear? Huh! Why a four-year-old child could Adam Sjøgren
understand this report. Run out and find me a four-year- ***@koldfront.dk
old child. I can't make head or tail out of it."
Loading...