Hi,
I would try to do it in two steps, copy messages from the offline
account (you can run evolution also as: evolution --offline
to not
have connection for all your mail accounts) to an On This Computer
folder and once done, copy the messages to the new server. Making a
copy of the ~/.cache/evolution/mail// is a good thing to
do, though I guess you did that already.
One problem can be that not all of the messages are stored locally. It
can happen, depending whether you had enabled synchronization for
offline use and for what time frame. Whether you can define a time
frame for the offline download depends on the evolution version you
have installed, but you forgot to mention it (it can be found in the
Help->About menu). I suppose it’s at least 3.44.x.
The messages in the ~/.cache/evolution/mail// are
organized in a similar structure to Maildir, only not precisely the
same. Luckily, they are complete messages, thus you can copy them under
~/.local/share/evolution/mail/local/… to have them accessible under
the On This Computer. The procedure is a manual work (some scripts or
programs could be created). Basically, the IMAP cache looks like this:
~/.cache/evolution/mail/<imap-account>/folders/
INBOX
cur [messages in this folder]
subfolders [subfolders of the Inbox]
folder1
cur
folder2
cur
subfolders
...
...
folderN [on the same level as the Inbox]
cur
subfolders
(I do not know whether the Discourse interface will preserve my
indentation…)
The cur
directory contains two-letter directories, where the actual
messages are stored.
The Maildir format is similar, the one used in Evolution uses (leading)
dots to delimit folder names. I suggest you create a folder under On
This Computer, into which you’ll copy the folder structure from the
cache. Then create a new test folder under it and copy a message into
it in Evolution, then create a new folder under it and copy another
message under it. Then see what happened under
~/.local/share/evolution/mail/local/ directory.
Say you named the first folder backup
and created it under Inbox, in
which case there will be ~/.local/share/evolution/mail/local/…backup
which contains cur
, new
and tmp
directories. Say you’ll name the
second folder testfolder
under the backup
, in which case there will
be ~/.local/share/evolution/mail/local/…backup.testfolder/ directory,
with the same cur
, new
and tmp
directory structure.
You can recreate the folder structure this way under the On This
Computer. Then you copy the message files (really files, not the two-
letter directories) from
~/.cache/evolution/mail//folders/INBOX/cur/
into
~/.local/share/evolution/mail/local/…backup.Inbox/new/
It’s not a typo, you’ll copy from cur
to new
, because it’s the
place where the Maildir expects the new messages to be stored, then
it’ll move them to the cur
on its own, with other required
processing.
The process can seem complicated, but I think it’s not as that, once
you’ll get to the way it works (I’m not sure I managed to explain it in
an understandable way though). The bigger problem is the manual work,
if you’ve deep/wide folder structure.
Bye,
Milan