Mail account full: Move and keep old messages on another device?

My mail account is getting full.

For non deltachat messages I just move old mail from my inbox into a local IMAP server on a PC. So I can keep and read old mail forever, and reclaim space on the mobile device.

What is the strategy to do so for DeltaChat messages?

You can simply delete old message from IMAP server. Delta Chat does not read messages from the server more than once, it treats inbox as a feed rather than storage.

Thanks, that’s already good news.

However, I would like to move (not delete) that mail from the phone’s account to a local mail account, on a PC which also has DC.

Would the DC on the PC read mail from its DeltaChat/ mail folder when I manually put mail there?

Moving the messages into a backup dir should work (I assume you are not using a Chatmail account). If you were using encryption and want to read them forever you will also need the decryption keys. The GUI key export was removed around 1.10, but you can hack into the Deltachat database and extract the private keys. Maybe test by copying a few e-mails first.

Is this the info you wanted? Deltachat does not yet really have much by way of archiving capabilities (“Archive Chat” just reorganises the display).

It is available on Desktop. On Android export is removed because it usually exports into Downloads folder that may be readable by other apps at least on older Android versions.

1 Like

@Minim : Okay, so if moving mail made a PC-based DC instance to recognize the messages then I’d indeed have a solution. Concerning the link to extract the keys: Yeah, I have seen that, too. As @link2xt states, this isn’t even needed for the desktop version of DC.

So, I sum up: It seem that we can have a long term DC message backup by roughtly these steps:

(1) Install DC on a PC with enough storage and a local IMAP service like dovecot.
(2) On the PC, move the DC mail from the (limited) online mail account to the local DC mail folder.
(3) Assert that DC on the PC can decrypt the messages (e.g. by key export/import or inital installation from backup.

Thanks everybody!

1 Like

Thank you! I saw the key-export menu item vanish on DeltaTouch and made unfounded assumptions. That Android security problem sounds like a good reason for removing its GUI export.

I am glad to learn of this functionality. Would it be possible, under the Android advanced settings, to add a note saying “Key export is possible fron a second device”, with a link to an explanation online?

I assume key export on Desktop Linux exports the keys to a keyring.

There will be those reading this that do not have a local IMAP server. As far as I know, this makes things harder.

If your mail account supports POP, that is a simple way to download messages, since POP inherently downloads instead of syncing. Most non-web mailclients can be set to use POP and not delete from the server. You can even have POP and IMAP on the same mail account in the same client simultaneously.

I’ve also got commands for downloading from a server that has IMAP but no POP capabilities somewhere, I could dig them out. Then you don’t even need to install a client to get a nice Maildir tree of your mails.

Unfortunately DC cannot directly read Maildir (or Mbox) formats. So displaying your chats in a sane format is going to be more difficult; in another client, they will display as individual emails, including emails that edit past messages, and control messages sent automatically by the client.

Well, as people might misunderstand “backup”: I was looking for a backup solution just like you would do in the analog world: “Put your diary back onto the shelf when full, and start over with a new one”. In terms of DC, the intended use-case is: Move all DC mail from the online account of the previous year to a larger storage, still be able to decrypt/read that old mail, and free the online mail account at the same time.

I currently fail to imagine how I could do so with a POP/IMAP access mix. :slight_smile:

If there are easier solutions than the marked one above, leveraging a local IMAP server, I’d glad to get to know about.

I entirely agree with the diary analogy! And I expect to be able to read my old diaries. Deltachat does not yet really have much by way of shelve-my-old-messages-like-a-paper-diary capabilities .

I do not know of easier solutions. The ones I suggest have serious formatting problems. I’m sorry, I should perhaps have made it clearer that that was my point! :slight_smile:

One simpler method is keeping a backup file and maybe an old installable version of Deltachat around. This is admittedly not as futureproof as Maildir format.

1 Like

I have withdrawn my solution for now, because I have overseen a little aspect:

When I setup DC the easy way as a second device on a PC with a local IMAP server, I have the keys to decrypt messages etc but I fail to see a way to make that DC client pull messages from the local IMAP server (instead of the same full online mail account like the mobile DC client).

I assume that I can somehow setup DC with a new configuration/profile on the PC and make it pull from the local IMAP DeltaChat folder (so I can move messages there individually from the online mail account) - but I haven’t investigated that yet. And I would somehow give it the same keys for decryption as the mobile client. Hm!

1 Like

After some tests, here is my current solution.

To recall: I wanted to free my online DeltaChat mail folder (was full) but not delete the messages. The reason for the latter: Once mail is deleted, the only way to access older DC messages is via DC clients itself.

Here is what I did:

  1. To get the DC keys, install a desktop DC client which has the key export feature. The android client does not have it anymore. Assert that the desktop DC client is a second device and thus has the same keys.

  2. On the PC, export the DC keys (will export *.asc files) and import them to a local GPG key ring. In my case this was as simple as: gpg --import KEYFILE.asc

  3. Make your email client capable of using GPG. This depends on the email client. It should be easy e.g. with Thunderbird. Test whether you can decrypt and read from the online DeltaChat mail folder.

  4. Move your mail from the online DeltaChat mail folder to a local mail directory. E.g., Thunderbird has a local mail directory by default.

See also Configure Neomutt on mobile. :slight_smile:

There is one step more; Deltachat mails may edit previous messages. Also, many statements in a chat make zero sense taken out of context. I think you’d need to resend all these mails to a Deltachat client to read them easily as a human. Or write your own script to reconstruct the chat from the mails.

Compared to, say, Pidgin, which lets you export chats as HTML or plain text, this is complicated.

…A Pidgin plugin for Deltachat? :grin:

I also suggest that Deltachat could use a standard mail storage format..

Yeah, so some comments on a refinement of the currently marked solution:

  • Concerning messages get out of context by the backup: I simply enable a threaded view.
  • Concerning late edits (missed by earlier backup and such): My solution is definitvely not perfect. At least you have the original mail and probably the edited one. :wink:

To recall what is the overall issue here:

(1) I don’t see any way to improve the backup sitution for all approaches (including other clients) that access the same mail account / DeltaChat folder. Because the whole idea is to free the mail account. So I need to move mail to another (local) account and read it from there.

(2) And, currently it seems that I cannot use the built-in DC backup solution as it would not allow me to do incremental backups (?), and not to select a local mail storage.

(3) A better approach than using an ordinary mail client (like neomutt of course!), :slight_smile: hand it the DC keys and access the local mail dir: If I configured a local DC client from scratch and made it read from the local mail folder. Then I’d probably get a proper DC view of the backup messages. I have not investigated that yet.

I’ve just checked, and when a message is corrected, the correcting e-mail reads:

>[OLD MESSAGE]
:pencil:[NEW MESSAGE]

This is a good human-readable format that makes it easy to scan and, say, dismiss an edit as a typo correction.

So I withdraw that concern; you are right, a mail client with a threaded view would be perfectly adequate.

A more important constraint on this backup method is that it must be repeated slightly more often than once a month, as many Chatmail servers delete messages older than 30 days.

A more important constraint on this backup method is that it must be repeated slightly more often than once a month, as many Chatmail servers delete messages older than 30 days.

Is there any chance to access Chatmail’s messages as individual mail files? If not, I unfortunatelly do not see any way to handle this use case via the method I proposed above.

I’m not sure I understand. It is not possible to access messages stored in a Deltachat client as individual mails, because their header info was discarded on arrival, and they are stored in a nonstandard mail-storage format. It does not matter if the messages were once e-mails from a Chatmail server or e-mails from any other sort of mail server.

Downloading directly from the Chatmail server, of course you always get individual mail files. A cron job downloading everything from the Chatmail server every four weeks would probably get all the mails (unless you exceeded your quota). You’d think you’d want to use POP3 instead of IMAP, but the Chatmail default does not support POP3. There are some IMAP tools that download a local copy, though.

I am not a Chatmail user so I am probably missing basic knowledge:

When going the ChatMail way, is that still using my own mail account? AFAIK this is not the case. And if not, do you have access to that ChatMail mail relay to “download mail”?

Apologies if this is too basic or otherwise the wrong information.

Chatmail is a slightly specialized mailserver design. A Chatmail server is just like a regular mailserver, but it only allows mails that are end-to-end encrypted in a specific way. This eliminates spam. Chatmail servers are also optimized for speed. And Chatmail servers allow anyone to sign up for unlimited numbers of free accounts.

There are lots of Chatmail servers.

Using your own mail account on a non-Chatmail server, the encryption is optional. And maybe chats are a bit slower. Everything else is the same.

You can use both Chatmail and non-Chatmail accounts simultaneously in one Deltachat client.

Regardless of whether your mailserver is Chatmail or non-Chatmail, you fetch mails the same way, using IMAP (though non-Chatmail servers may also allow you to download mail with POP).

Was that what you wanted to know?

maildir exports would be amazing

1 Like