Switching directories from maildir to mbox in kmail 4.14.1

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Switching directories from maildir to mbox in kmail 4.14.1

Randy Kramer
Background: For a period of time, I have to do some work on a Debian Jessie
system.  The supported version of kmail is 4.14.1.  I've discovered that, by
default, mail folders are set up as maildir.

I need to switch them bo mbox -- how do I do that?
Reply | Threaded
Open this post in threaded view
|

Re: Switching directories from maildir to mbox in kmail 4.14.1

Randy Kramer
On Saturday, May 18, 2019 09:18:57 PM [hidden email] wrote:
> Background: For a period of time, I have to do some work on a Debian Jessie
> system.  The supported version of kmail is 4.14.1.  I've discovered that,
> by default, mail folders are set up as maildir.
>
> I need to switch them bo mbox -- how do I do that?


I should add that I've done some googling, and found some instructions that
seem to imply the when I create a new folder, I should get a popup that has a
selection for mbox or maildir.  That doesn't popup on this system.

Further, when I look at folder properties, I don't see an option to switch to
mbox.

I tried looking at ~/.../kmailrc but didn't see any place where maildir was
set.
Reply | Threaded
Open this post in threaded view
|

Re: Switching directories from maildir to mbox in kmail 4.14.1

René J.V. Bertin
On Saturday May 18 2019 21:47:31 [hidden email] wrote:

>> I need to switch them bo mbox -- how do I do that?
>
>
>I should add that I've done some googling, and found some instructions that
>seem to imply the when I create a new folder, I should get a popup that has a
>selection for mbox or maildir.  That doesn't popup on this system.
>
>Further, when I look at folder properties, I don't see an option to switch to
>mbox.

Looking over the different agents I only see a single one that doesn't seem specific to the maildir format: the mbox agent. But that one will support only a single mbox, not a folder with any number of mbox files in it (if that's what you're after).

I have long used a different approach: I set up an imap server on the host where I want to archive my mail, and configure a directory for my email that's accessible over imap. I can do any kind of organisation of email into mail folders that I want, and know that each of those folders will be an mbox file at a known location on disk.
The only drawback with kmail and the like is that you need to jump through some hoops to prevent getting additional copies of that archived email in the akonadi database.
That, and akonadi doesn't support the usual imap server root directory property that Thunderbird and most other MUAs add on top of the imap standard. You will thus need an imap server that can be configured to serve a configurable location for each user rather than the user's home directory (because akonadi will happily try to index EVERYTHING under there).

R.
Reply | Threaded
Open this post in threaded view
|

Re: Switching directories from maildir to mbox in kmail 4.14.1

Randy Kramer
On Sunday, May 19, 2019 03:45:10 AM René J.V. Bertin wrote:
> On Saturday May 18 2019 21:47:31 [hidden email] wrote:
> >> I need to switch them bo mbox -- how do I do that?

> Looking over the different agents I only see a single one that doesn't seem
> specific to the maildir format: the mbox agent. But that one will support
> only a single mbox, not a folder with any number of mbox files in it (if
> that's what you're after).
>
> I have long used a different approach: I set up an imap server on the host
> where I want to archive my mail, and configure a directory for my email
> that's accessible over imap. I can do any kind of organisation of email
> into mail folders that I want, and know that each of those folders will be
> an mbox file at a known location on disk. The only drawback with kmail and
> the like is that you need to jump through some hoops to prevent getting
> additional copies of that archived email in the akonadi database. That,
> and akonadi doesn't support the usual imap server root directory property
> that Thunderbird and most other MUAs add on top of the imap standard. You
> will thus need an imap server that can be configured to serve a
> configurable location for each user rather than the user's home directory
> (because akonadi will happily try to index EVERYTHING under there).

Thanks for the response -- I'll read over that again, but it sounds like more
effort than I want to go to, at least at the present time.

For now, I'm using two gmail accounts, both subscribed to the lists that are
relevant to my work on the Jessie system.  I'll use the Jessie system to read
and respond (or write) the emails that I need to deal with re the work I'm
doing there, but let them be archived on my Wheezy system where they are
stored in mbox files.

I guess I'll have to dig deeper into the later versions of kmail -- if mbox is
no longer supported (when I eventually upgrade to Buster or later), I'll be
looking for a new email client.
Reply | Threaded
Open this post in threaded view
|

Re: Switching directories from maildir to mbox in kmail 4.14.1

Martin Steigerwald
In reply to this post by Randy Kramer
[hidden email] - 19.05.19, 03:47:
> On Saturday, May 18, 2019 09:18:57 PM [hidden email] wrote:
> > Background: For a period of time, I have to do some work on a Debian
> > Jessie system.  The supported version of kmail is 4.14.1.  I've

An ancient version of KMail.

> > discovered that, by default, mail folders are set up as maildir.
> >
> > I need to switch them bo mbox -- how do I do that?

Why would you need to switch them to mbox? Maybe there is another
solution to the goal you like to accomplish.

> I should add that I've done some googling, and found some instructions
> that seem to imply the when I create a new folder, I should get a
> popup that has a selection for mbox or maildir.  That doesn't popup
> on this system.

There are three resources for local mail storage:

1. Maildir (default): stores mails in a maildir folder structure.

2. Mbox: Accesses a single mailbox file (good for local mail in '/var/
spool/mail').

3. Mixedmaildir: allows to decide per folder whether to use maildir or
mbox.

I bet the third would show up the popup you mentioned. However it has
been a long time I last used it.

When you create a new user defined resource for receiving (and storing)
mails I believe when you use 'KMail mail folder' (roughly translated
from German) you will get mixedmaildir resource.

Please note tough: I migrated away since back then KDEPIM developers
changed the default as well and wrote several times that they do not
recommend using it anymore. It has a completely different implementation
and since it is not the default anymore, it likely does not receive as
much testing as before.

In general it should work, but on attempts to import a KMail mail folder
resource folder into KDEPIM some years ago I saw a very high memory
usage. I stopped the import which I triggered by creating a KMail mail
resource pointing to that old folder due to intense swapping¹. It has
been a long time ago and this issue may be fixed meanwhile. However you
are using an ancient version of KMail and  I believe mixedmaildir
resource did not receive much development work for a long time – so the
bug may still be there. (Don't bother to reopen the bug report when it
is still there in such an ancient version of KMail tough.)

The folder I tried to import contained only MBox folders I used for
archival. Prior to removing the mixedmaildir resource before migrating
to a newer version of KDEPIM/Akonadi back then, I created a new pure
maildir resource and separated migrated all maildir folders to it so
that the old mixedmail resource just contained mbox folders anymore.

I'd actually like to use the mixedmaildir thing again cause a folder of
mbox folders is really nice to archive mails and still have them
accessible within KMail. Cause rsync'ing a few mbox files that do not
even change afterwards anymore to backup disk is much faster than
rsync'ing millions of little mail files. For now I just tar maildir
folders with huge mailing lists and then remove them afterwards from
time to time to keep Akonadi performance above a certain level. At one
point when computers and Akonadi have more performance I may re-import
them by just un-tar-ing them into the right location within the maildir
resource folder.

So or so I believe for KDEPIM/Akonadi developers there is more important
work to do than to deal with any issues mixedmaildir resource may have.


[Akonadi] [Bug 334318] New: on adding old mail archive mixedmaildir
resource consumes tons of memory
https://bugs.kde.org/show_bug.cgi?id=334318

Thanks,
--
Martin


Reply | Threaded
Open this post in threaded view
|

Re: Switching directories from maildir to mbox in kmail 4.14.1

Randy Kramer
On Monday, May 20, 2019 02:46:17 PM Martin Steigerwald wrote:
> [hidden email] - 19.05.19, 03:47:
> > On Saturday, May 18, 2019 09:18:57 PM [hidden email] wrote:
> > > Background: For a period of time, I have to do some work on a Debian
> > > Jessie system.  The supported version of kmail is 4.14.1.  I've
>
> An ancient version of KMail.

Newer than the one I've been using up to now (and, actually, continuing to
use).  (kmail 1.13.7 on Debian Wheezy).

> Why would you need to switch them to mbox? Maybe there is another
> solution to the goal you like to accomplish.

I've spent a long time (I don't want to admit how long -- close to 18 years)
building, essentially, a free format database (sort of an askSam workalike)
using mbox as the basic framework.  I've got semi-working versions using kate
as the editor, now working on building an editor based on scintilla -- very
slow going.

I intend to allow records (essentially in the format of emails) to be
intermixed with real emails in mbox files.

> > I should add that I've done some googling, and found some instructions
> > that seem to imply the when I create a new folder, I should get a
> > popup that has a selection for mbox or maildir.  That doesn't popup
> > on this system.
>
> There are three resources for local mail storage:
>
> 1. Maildir (default): stores mails in a maildir folder structure.
>
> 2. Mbox: Accesses a single mailbox file (good for local mail in '/var/
> spool/mail').
>
> 3. Mixedmaildir: allows to decide per folder whether to use maildir or
> mbox.
>
> I bet the third would show up the popup you mentioned. However it has
> been a long time I last used it.
>
> When you create a new user defined resource for receiving (and storing)
> mails I believe when you use 'KMail mail folder' (roughly translated
> from German) you will get mixedmaildir resource.

Hmm, I have no idea how to create "a new user defined resource for receiving
(and storing) mails".  I've tried googling, and, so far, nothing makes sense
to me.
 

> Please note tough: I migrated away since back then KDEPIM developers
> changed the default as well and wrote several times that they do not
> recommend using it anymore. It has a completely different implementation
> and since it is not the default anymore, it likely does not receive as
> much testing as before.
>
> In general it should work, but on attempts to import a KMail mail folder
> resource folder into KDEPIM some years ago I saw a very high memory
> usage. I stopped the import which I triggered by creating a KMail mail
> resource pointing to that old folder due to intense swapping¹. It has
> been a long time ago and this issue may be fixed meanwhile. However you
> are using an ancient version of KMail and  I believe mixedmaildir
> resource did not receive much development work for a long time – so the
> bug may still be there. (Don't bother to reopen the bug report when it
> is still there in such an ancient version of KMail tough.)
>
> The folder I tried to import contained only MBox folders I used for
> archival. Prior to removing the mixedmaildir resource before migrating
> to a newer version of KDEPIM/Akonadi back then, I created a new pure
> maildir resource and separated migrated all maildir folders to it so
> that the old mixedmail resource just contained mbox folders anymore.
>
> I'd actually like to use the mixedmaildir thing again cause a folder of
> mbox folders is really nice to archive mails and still have them
> accessible within KMail. Cause rsync'ing a few mbox files that do not
> even change afterwards anymore to backup disk is much faster than
> rsync'ing millions of little mail files. For now I just tar maildir
> folders with huge mailing lists and then remove them afterwards from
> time to time to keep Akonadi performance above a certain level. At one
> point when computers and Akonadi have more performance I may re-import
> them by just un-tar-ing them into the right location within the maildir
> resource folder.
>
> So or so I believe for KDEPIM/Akonadi developers there is more important
> work to do than to deal with any issues mixedmaildir resource may have.
>
>
> [Akonadi] [Bug 334318] New: on adding old mail archive mixedmaildir
> resource consumes tons of memory
> https://bugs.kde.org/show_bug.cgi?id=334318
>
> Thanks,
Reply | Threaded
Open this post in threaded view
|

Re: Switching directories from maildir to mbox in kmail 4.14.1

Martin Steigerwald
[hidden email] - 21.05.19, 02:39:

> > > I should add that I've done some googling, and found some
> > > instructions that seem to imply the when I create a new folder, I
> > > should get a popup that has a selection for mbox or maildir.
> > > That doesn't popup on this system.
> >
> > There are three resources for local mail storage:
> >
> > 1. Maildir (default): stores mails in a maildir folder structure.
> >
> > 2. Mbox: Accesses a single mailbox file (good for local mail in
> > '/var/ spool/mail').
> >
> > 3. Mixedmaildir: allows to decide per folder whether to use maildir
> > or mbox.
> >
> > I bet the third would show up the popup you mentioned. However it
> > has
> > been a long time I last used it.
> >
> > When you create a new user defined resource for receiving (and
> > storing) mails I believe when you use 'KMail mail folder' (roughly
> > translated from German) you will get mixedmaildir resource.
>
> Hmm, I have no idea how to create "a new user defined resource for
> receiving (and storing) mails".  I've tried googling, and, so far,
> nothing makes sense to me.

Settings / Setup KMail / Accounts / Add (roughly translated from german
as my KMail displays in German language). It may be slightly different in
older versions of KMail (I am using 18.08).

Ciao,
--
Martin


Reply | Threaded
Open this post in threaded view
|

Re: Switching directories from maildir to mbox in kmail 4.14.1

Randy Kramer
On Tuesday, May 21, 2019 03:25:54 AM Martin Steigerwald wrote:

> [hidden email] - 21.05.19, 02:39:
> > > > I should add that I've done some googling, and found some
> > > > instructions that seem to imply the when I create a new folder, I
> > > > should get a popup that has a selection for mbox or maildir.
> > > > That doesn't popup on this system.
> > >
> > > There are three resources for local mail storage:
> > >
> > > 1. Maildir (default): stores mails in a maildir folder structure.
> > >
> > > 2. Mbox: Accesses a single mailbox file (good for local mail in
> > > '/var/ spool/mail').
> > >
> > > 3. Mixedmaildir: allows to decide per folder whether to use maildir
> > > or mbox.
> > >
> > > I bet the third would show up the popup you mentioned. However it
> > > has
> > > been a long time I last used it.
> > >
> > > When you create a new user defined resource for receiving (and
> > > storing) mails I believe when you use 'KMail mail folder' (roughly
> > > translated from German) you will get mixedmaildir resource.
> >
> > Hmm, I have no idea how to create "a new user defined resource for
> > receiving (and storing) mails".  I've tried googling, and, so far,
> > nothing makes sense to me.
>
> Settings / Setup KMail / Accounts / Add (roughly translated from german
> as my KMail displays in German language). It may be slightly different in
> older versions of KMail (I am using 18.08).

Ahh, thanks, now I understand (mostly).  In the Jessie version of KMail
(4.14.1), adding a new account ("a new user defined resource for receiving (and
storing) mails"), choosing KMail mail folder does not seem to give an option
for a mixedmaildir resource.

There is another option in the same area that mentins mbox file, but it seems
pretty clear that it is only a means to get mail into kmail from an mbox file.

Aside: I've done some googling, but I can't find something that clearly says
kmail no longer supports mbox for mail storage -- maybe it is buried in some
list of changes for some version of kmail

Anyway, it is my tentative conclusion that kmail no longer supports mbox (for
mail storage) and, in my copious spare time, I'll be looking for a
replacement.  (That will presumably have the added advantage of not having to
figure out how to disable akonadi (if that is the current name of the kmail
indexing program).)

Thanks for your help!