Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to import or add an mbox file?

22 views
Skip to first unread message

Nicholas Saunders

unread,
Nov 27, 2023, 3:13:12 PM11/27/23
to
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

unread,
Nov 27, 2023, 3:32:40 PM11/27/23
to
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

unread,
Nov 27, 2023, 3:32:55 PM11/27/23
to
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

unread,
Nov 27, 2023, 4:02:58 PM11/27/23
to
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

unread,
Nov 27, 2023, 4:07:28 PM11/27/23
to
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

unread,
Nov 27, 2023, 4:23:46 PM11/27/23
to
I think that I'm using the "maildir" format.

How do I switch to mbox?


thanks,

Nick

Kalevi Kolttonen

unread,
Nov 28, 2023, 7:07:30 AM11/28/23
to
Nicholas Saunders <saunders...@gmail.com> wrote:
> Thanks, and that's what I've done. However, it just loads as
> a massive text file and not individual e-mails:

Well, mbox-format *is* a massive or not so massive text file.

> 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

John Levine

unread,
Nov 28, 2023, 10:16:05 PM11/28/23
to
According to Nicholas Saunders <saunders...@gmail.com>:
>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.

From jo...@iecc.com Sun Sep 18 08:53:38 2016 -0400

>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, jo...@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

Nicholas Saunders

unread,
Dec 2, 2023, 12:18:05 AM12/2/23
to
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
0 new messages