[Alpine-info] Maildir folder-collection

Paolo Andretta andretta at apf.it
Thu Dec 21 06:01:56 PST 2023


On Thu, 21 Dec 2023, Damion Yates wrote:


> On Thursday 21 December 2023, Carlos E. R. <robin.listas at telefonica.net> wrote:

> On 2023-12-20 14:58, Paolo Andretta wrote:

>

> Hi all,

>

> Migrated my old mail from a server using mailbox to a new one using Maidir (migrated by ImaSync).

> Alpine 2.21 to Alpine 2.25

> I can read the Inbox, but I can't manage all my folders and subfolders.

> ImapSync created in Maildir a hierarchy like:

>

> If you used "ImapSync" for the migration, I assume you used an imap server on both machines. Or is it the same machine?


As I wrote, I have sync the mail to a new server (both use Dovecot,
different versions, but I think this isn't interesing).


> I believe imapsync will have fetched from the remote IMAP server but written the local Maildir hierarchy.  I use something called offlineimap which does the same

> The problem them is not in Alpine realm, but in the mail daemon realm. Alpine doesn't care how the daemon keeps the mail inside, it doesn't see the files.

> But you have to configure dovecot to read the new storage. I assume you already did that, if you moved mail from dovecot server to dovecot server.


I can read the mails in the new server.
It works fine.


> I have tried to set the variable folder-collections to many values without results. Any hints?

>

> My last attempt:

> folder-collections="Locali" #mc/\.mail/.[]

>

> folder-collections=

>         "Mail (local imap)" {localhost/novalidate-cert/user=cer}[]

>

> Possibly (unsure):

>

> I believe if I'm recognising the syntax with #mc I believe this is used by the Maildir patch to alpine, which unfortunately is not integrated into the recent releases and remains as a separate patch.

> In your original email Paolo, you specify two different alpine versions.  If you are attempting to locally access these files, it needs the alpine to be patched.


In my old server, I have mailbox folders that can be accessed locally
without problems. When I start my old Alpine (wich is the results of 20+
years upgrades), I simply confirm my username and insert the related
pasword.
The new server is a standard Rocky 9.x with the package from standard
repo:

Source RPM : alpine-2.25-2.el9.src.rpm
Build Date : Thu Feb 10 16:30:33 2022
Build Host : buildvm-x86-13.iad2.fedoraproject.org
Packager : Fedora Project

It works with Maildir, so I suppose the patch is integrated.

Anyway, If I set:

folder-collections="Locali" #mc/Maildir/.[]

I have my floder list is something like:

INBOX 231221 Sent dead_letter mail[.]

I select the [.] and I have my folder hierarchy as usual, except for the
annoying matter of selecting the [.] and that the new folder seems not in
the standard hierarchy

If I set:

folder-collections="Locali" #md/Maildir/.mail.[]

I have folders at the usual level, but they are all expanded:

INBOX sent-mail saved-messages
110 1703EPP-np 1805Spam
190718 190718Err 190923
1999 1999.2000 1999.5200
1999.aba 1999.acca 1999.an
1999.arch 1999.at 1999.att
1999.cli 1999.cofax 1999.con
1999.cv 1999.d 1999.da
1999.db 1999.dedra 1999.dip
1999.ec 1999.en 1999.esa

This seems works as I want and expect, but there is the folders expansion
problem that is annoying (I have around 1.500 folders/subfolders ...)
Searched and played with some settings, but can't find the solution.
And it is time consuming to enter/exit from Alpine. And I don't like to
solve problems by attempts ...



> Even I actually use two versions of alpine, one that I compiled with the

> patch years ago and the latest that supports the new xoauth2

> authentication.  It's been on my to-do list for years to go around to

> the faf of fetching all the sources integrating the patch and building

> an alpine that supports both at the same time.  Also on my to-do list is

> to convince Eduardo Chappa to integrate the patch.


I personally prefer mbox over Maidir for historical reason and because I
am lazy and Maildir probably require me to revise all my old settings,
procmail rules, management scripts, ... but it is the de facto standard
for many configurations and it is better for backup/sync ...


> Another solution is to fire up a local instance of an IMAP daemon which

> will speak Maildir and have alpine communicate to that.  There are

> potentially some caching and searching efficiencies to be gained,

> however this also sounds a bit complicated and I don't bother with this

> myself.


I am already working on a mail server that directly receive mail form the
net ;-)

Thanks,
Paolo




More information about the Alpine-info mailing list