Discussion:
how to import or add an mbox file?
(too old to reply)
Nicholas Saunders
2023-11-27 20:13:11 UTC
Permalink
I'm just looking to read old messages offline and local.

I backed up the .pinerc file and have a foo.mbox file which I'd like to add. When I launch pine I see a list of old file. Can I somehow add or import this mbox to that list?


thanks,

Nick
Adam H. Kerman
2023-11-27 20:32:37 UTC
Permalink
Post by Nicholas Saunders
I'm just looking to read old messages offline and local.
I backed up the .pinerc file and have a foo.mbox file which I'd like to
add. When I launch pine I see a list of old file. Can I somehow add or
import this mbox to that list?
No importing required.

Just move it into the same directory or initiate your alpine session
with the full path to the file.

For instance, when I download control messages, they are in an mbox
archive and I can read them with alpine. I don't care to save them so
they get FTP'd to /tmp. Here's an archive I recently looked at.

alpine -if /tmp/uk.local.midlands

Without the full path, in my setup, my archived mboxes are in ~/mail, so
alpine would find it if I moved it to that directory.

Your mbox archive might be ~/Mail or something else. Check your .pinerc.
Kalevi Kolttonen
2023-11-27 20:32:52 UTC
Permalink
Post by Nicholas Saunders
I'm just looking to read old messages offline and local.
I backed up the .pinerc file and have a foo.mbox file
which I'd like to add. When I launch pine I see a list
of old file. Can I somehow add or import this mbox to
that list?
In your .pinerc, you need to define folder collections
with something like this:

folder-collections=Mail/[]

If you want to add more folders, separate their names
using commas.

Then just move your mbox file into the right directory:

mv -iv foo.mbox ~/Mail

You can then read your mailbox directly by using:

alpine -f foo.mbox

Or you can choose the correct folder from Folder List
menu that is in alpine's main menu.

br,
KK
Nicholas Saunders
2023-11-27 21:02:56 UTC
Permalink
Post by Kalevi Kolttonen
Post by Nicholas Saunders
I'm just looking to read old messages offline and local.
I backed up the .pinerc file and have a foo.mbox file
which I'd like to add. When I launch pine I see a list
of old file. Can I somehow add or import this mbox to
that list?
In your .pinerc, you need to define folder collections
folder-collections=Mail/[]
If you want to add more folders, separate their names
using commas.
mv -iv foo.mbox ~/Mail
alpine -f foo.mbox
Or you can choose the correct folder from Folder List
menu that is in alpine's main menu.
br,
KK
Thanks, and that's what I've done. However, it just loads as a massive text file and not individual e-mails:

ALPINE 2.25 FOLDER LIST Folder: INBOX No Messages

INBOX sent-mail saved-messages 22aug_saved foo.mbox foobar sent-mail-aug-2022 sent-mail-dec-2022 sent-mail-may-2022 sent-mail-nov-2022
sent-mail-oct-2022 sent-mail-sep-2022


It's the "foo.mbox" which I'm looking at.

I'm thinking there's a setting in the pinerc to parse mbox?
Nicholas Saunders
2023-11-27 21:07:27 UTC
Permalink
When I run "alpine -f foo.mbox" I get a single large message rather than the expected list of messages.

The backup came from Thunderbird.
Nicholas Saunders
2023-11-27 21:23:44 UTC
Permalink
I think that I'm using the "maildir" format.

How do I switch to mbox?


thanks,

Nick
John Levine
2023-11-29 03:16:02 UTC
Permalink
Post by Nicholas Saunders
I think that I'm using the "maildir" format.
No, maildir puts each message in a separate file. This sounds like it's
just a bunch of messages dumped into a file.

In an mbox file each message is preceded by a 'From ' line like the
one below with the sender's address and a timestamp. The first line in
the file has to be a From line.
Post by Nicholas Saunders
How do I switch to mbox?
If you're exporting the messages from Thunderbird, I am reasonably
sure that it uses mbox as its internal format, so I'd just look for
the mailbox you want in Thunderbird's directory and copy it.
--
Regards,
John Levine, ***@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly
Nicholas Saunders
2023-12-02 05:18:03 UTC
Permalink
Post by Nicholas Saunders
I think that I'm using the "maildir" format.
No, maildir puts each message in a separate file. This sounds like it's
just a bunch of messages dumped into a file.
In an mbox file each message is preceded by a 'From ' line like the
one below with the sender's address and a timestamp. The first line in
the file has to be a From line.
Post by Nicholas Saunders
How do I switch to mbox?
If you're exporting the messages from Thunderbird, I am reasonably
sure that it uses mbox as its internal format, so I'd just look for
the mailbox you want in Thunderbird's directory and copy it.
--
Regards,
Please consider the environment before reading this e-mail. https://jl.ly
That's where I'm confused. It's IMAP and Gmail. I couldn't find such files, at least on Linux (Ubuntu). I even downloaded a plugin. But the backups from the plugin weren't readable by even mailutils. The Pine local storage is readable by the mail command, which is enough portability for my purposes. Probably I wasn't doing the backups from Thunderbird correctly, but I never figured it out.

Pine's working fine for this. I was using export at first, but it was suggested to use save and that works fine.


-Nick

Kalevi Kolttonen
2023-11-28 12:07:27 UTC
Permalink
Post by Nicholas Saunders
Thanks, and that's what I've done. However, it just loads as
Well, mbox-format *is* a massive or not so massive text file.
Post by Nicholas Saunders
It's the "foo.mbox" which I'm looking at.
I'm thinking there's a setting in the pinerc to parse mbox?
Alpine should do that automatically as far as I know.

br,
KK
Loading...