# \[WORKAROUND\] Make new Delta Chat installation import old messages from IMAP directory

**URL:** <https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262>\
**Category:** Feature Proposal\
**Created:** [February 20, 2019, 8:44am UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262 "2019-02-20T08:44:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![fnadde42](https://forum.delta.chat/user_avatar/forum.delta.chat/fnadde42/32/111_2.png) [@fnadde42](https://forum.delta.chat/u/fnadde42)\
**Post date:** [February 20, 2019, 8:44am UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/1 "2019-02-20T08:44:06Z")

</div>

## Expected behavior

When I install Delta Chat I would want it to import all conversations in the IMAP directory _DeltaChat_.

## Actual behavior

I install Delta Chat and only new conversations appear (those after the install). I can still see old ones in the _DeltaChat_ directory in Thunderbird but they won’t appear on the Android app or Desktop app, even though the setting for reading this directory is enabled.

---

<div class="post-metadata">

**Author:** ![r10s](https://forum.delta.chat/user_avatar/forum.delta.chat/r10s/32/1513_2.png) [@r10s](https://forum.delta.chat/u/r10s)\
**Post date:** [February 20, 2019, 10:30am UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/2 "2019-02-20T10:30:56Z")

</div>

yip. this makes some sense.

however, for now, the start “from scratch” is by design to keep things simple. might be that this will change some day 🙂

btw: to setup a different device or to reinstall the app, you can do export a backup at “Settings / Advanced” and import it on install. the backup will include your old messages and setting then (similar eg. to whatsapp)

---

<div class="post-metadata">

**Author:** ![fnadde42](https://forum.delta.chat/user_avatar/forum.delta.chat/fnadde42/32/111_2.png) [@fnadde42](https://forum.delta.chat/u/fnadde42)\
**Post date:** [February 20, 2019, 10:45am UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/3 "2019-02-20T10:45:36Z")

</div>

What happened was my phone died so I couldn’t back it up and hence were interested in just scanning the directory for existing messages. I do think that people would want that feature since it shouldn’t matter which device you are on. I get that you want to keep it simple and I agree with that. The question though is where to draw the simplicity line between common functionality and feature creep.

---

<div class="post-metadata">

**Author:** ![r10s](https://forum.delta.chat/user_avatar/forum.delta.chat/r10s/32/1513_2.png) [@r10s](https://forum.delta.chat/u/r10s)\
**Post date:** [February 20, 2019, 10:49am UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/4 "2019-02-20T10:49:55Z")

</div>

sure, this would make sense - and probably, this will be added sooner or later.

(the “simple” i mentioned above was more a “simpler for the developers” 🙂 (we have to work on delta with rather limited resources compared to similar projects)

---

<div class="post-metadata">

**Author:** ![fnadde42](https://forum.delta.chat/user_avatar/forum.delta.chat/fnadde42/32/111_2.png) [@fnadde42](https://forum.delta.chat/u/fnadde42)\
**Post date:** [February 20, 2019, 10:59am UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/5 "2019-02-20T10:59:53Z")

</div>

# Workaround

I realized that there is a workaround and right now I can’t see any problems with it. What I did to import the old messages lying around in the _DeltaChat_ directory in my mail was this:

1. Create a directory and call it anything, like “e-mail parking”.
2. Move all your mails in your inbox over to that directory.
3. Move all your mails in the _DeltaChat_ directory into your inbox.
4. Delta Chat (on Android and Desktop at least) notices these messages and they appear in the client.
5. Move back these messages to the _DeltaChat_ directory.
6. Move back your inbox messages from the “e-mail parking”-directory to your inbox.

Tada 🎉

---

<div class="post-metadata">

**Author:** ![adbenitez](https://forum.delta.chat/user_avatar/forum.delta.chat/adbenitez/32/2323_2.png) [@adbenitez](https://forum.delta.chat/u/adbenitez)\
**Post date:** [February 20, 2019, 2:36pm UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/6 "2019-02-20T14:36:56Z")

</div>

I think importing this old messages should be done with care, since it is worse that users get old chats they removed from Delta Chat back again, this can mess up their chats list, and give a buggy experience to users

---

<div class="post-metadata">

**Author:** ![Hocuri](https://forum.delta.chat/user_avatar/forum.delta.chat/hocuri/32/25_2.png) [@Hocuri](https://forum.delta.chat/u/Hocuri)\
**Post date:** [February 21, 2019, 7:03pm UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/7 "2019-02-21T19:03:18Z")

</div>

@fnadde42 talked only about the first installation, and I’d rather have back all my chats instead of losing them all - and, again, it is only on first installation.

---

<div class="post-metadata">

**Author:** ![agutierrez](https://forum.delta.chat/user_avatar/forum.delta.chat/agutierrez/32/436_2.png) [@agutierrez](https://forum.delta.chat/u/agutierrez)\
**Post date:** [August 10, 2019, 9:21pm UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/8 "2019-08-10T21:21:06Z")

</div>

I would very much like this to be implemented someday, this, I think, is one of the main reasons why we are forced to live with a MUA.

For some time I have been thinking of some simple way to do it, but my limited knowledge makes it difficult for me.

DeltaChat v0.510.1

---

<div class="post-metadata">

**Author:** ![testbird](https://forum.delta.chat/letter_avatar_proxy/v4/letter/t/ce73a5/32.png) [@testbird](https://forum.delta.chat/u/testbird)\
**Post date:** [August 11, 2019, 3:59pm UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/9 "2019-08-11T15:59:20Z")

</div>

> [@adbenitez](#):
>
> users get old chats they removed from Delta Chat back again, this can mess up their chats list, and give a buggy experience to users

This would only happen if deltachat does not properly remove deleted messages from the server. Is this the case?

---

<div class="post-metadata">

**Author:** ![adbenitez](https://forum.delta.chat/user_avatar/forum.delta.chat/adbenitez/32/2323_2.png) [@adbenitez](https://forum.delta.chat/u/adbenitez)\
**Post date:** [August 12, 2019, 2:16pm UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/10 "2019-08-12T14:16:02Z")

</div>

@testbird if you delete a chat it is only deleted in your local database, messages stay in the server, so when you install if you load everything from DeltaChat folder, you load deleted chats,  
even if this where not the case, it should ask the user if they want to load this old messages or not

---

<div class="post-metadata">

**Author:** ![testbird](https://forum.delta.chat/letter_avatar_proxy/v4/letter/t/ce73a5/32.png) [@testbird](https://forum.delta.chat/u/testbird)\
**Post date:** [August 16, 2019, 8:49pm UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/11 "2019-08-16T20:49:56Z")

</div>

Thanks, found that it’s still there… [https://github.com/deltachat/deltachat-core/issues/210](https://github.com/deltachat/deltachat-core/issues/210)

All deleted messages clearly need to be deleted on the server as well (i.e. synced by default). Accordingly, for a synced client, also all messages need to be downloaded (synced) by default (i.e.if there is enough local storage space). Only this allows to keep multiple client devices in sync.

I think in Cuba you would not need to download any old stuff if [a server storage limit](https://support.delta.chat/t/reduce-space-on-internal-storage-disk-full/132/24) is in effect to not keep much messages on the server (only archive them locally).

---

<div class="post-metadata">

**Author:** ![agutierrez](https://forum.delta.chat/user_avatar/forum.delta.chat/agutierrez/32/436_2.png) [@agutierrez](https://forum.delta.chat/u/agutierrez)\
**Post date:** [August 16, 2019, 10:50pm UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/12 "2019-08-16T22:50:12Z")

</div>

As I have always imagined, it is this way.

- at the end of the chat, an option, “download more messages”.  
And this would download 10, 20 or 25 more messages, as some MUA do. Little by little.

- at the end of the chat list, an option, “download more chats”.  
This would download 5 new chats, with at least 5 messages each.

I think this would be simple for the user.

---

<div class="post-metadata">

**Author:** ![agutierrez](https://forum.delta.chat/user_avatar/forum.delta.chat/agutierrez/32/436_2.png) [@agutierrez](https://forum.delta.chat/u/agutierrez)\
**Post date:** [August 16, 2019, 10:58pm UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/13 "2019-08-16T22:58:41Z")

</div>

> [@testbird](#):
>
> I think in Cuba you would not need to download any old stuff if the server storage limit is reduced to not keep much messages on the server (only keep them locally).

For this, what we need is an option:

- “delete message from server when downloaded”

---

<div class="post-metadata">

**Author:** ![testbird](https://forum.delta.chat/letter_avatar_proxy/v4/letter/t/ce73a5/32.png) [@testbird](https://forum.delta.chat/u/testbird)\
**Post date:** [August 17, 2019, 10:18am UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/14 "2019-08-17T10:18:52Z")

</div>

> [@agutierrez](#):
>
> For [non-default, strictest traffic minimization], what we need is an option:
> 
> - “delete message from server when downloaded”

But that would _necessarily_ not only prevent downloading old messages, but would break receiving a new message on any other device (multi-client sync). Even if the message was not read on the device that was first to download!

So I think a good and useful traffic minimization option would only have to include a “delete messages from server after they are _read_” feature (among other things).

* * *

I think your idea of incremental downloading of older messages might be a good (more conservative) default actually, but some button to sync up with (import / download) all messages from the server in a single step would still be in need to set up a new, fully syncing client.

---

<div class="post-metadata">

**Author:** ![testbird](https://forum.delta.chat/letter_avatar_proxy/v4/letter/t/ce73a5/32.png) [@testbird](https://forum.delta.chat/u/testbird)\
**Post date:** [August 17, 2019, 11:36am UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/16 "2019-08-17T11:36:00Z")

</div>

You might want to keep track of a list of usefull traffic minimization features somewhere, yourself. The issues I did file all got closed without a fix.

---

<div class="post-metadata">

**Author:** ![adbenitez](https://forum.delta.chat/user_avatar/forum.delta.chat/adbenitez/32/2323_2.png) [@adbenitez](https://forum.delta.chat/u/adbenitez)\
**Post date:** [August 19, 2019, 12:27pm UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/17 "2019-08-19T12:27:31Z")

</div>

> [@testbird](#):
>
> But that would _necessarily_ not only prevent downloading old messages, but would break receiving a new message on any other device (multi-client sync). Even if the message was not read on the device that was first to download!

the point is that some of us DON’T want synchronization at all, because re-downloading messages in other devices only means waste of money, in the case of Cuba, we want to download the message to one device and delete them from server instantaneously, so no other email client download, also avoid sending the self-bcc which is totally a waste for us, so there are a need to opt-out of synchronization and keeping the messages on server, and just use the email as the transport protocols

---

<div class="post-metadata">

**Author:** ![testbird](https://forum.delta.chat/letter_avatar_proxy/v4/letter/t/ce73a5/32.png) [@testbird](https://forum.delta.chat/u/testbird)\
**Post date:** [August 19, 2019, 1:59pm UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/18 "2019-08-19T13:59:26Z")

</div>

Hi adbenitez,

my point you quoted was to not delete after download but rather after the message was shown.

I guess no one wants to totally miss messages, only because another device, possibly at another location, happened to be online while the message arrived and downloaded it first.

Only deleting it from the server after it was shown should provide more reliability, while preventing re-downloading of already read messages.

---

<div class="post-metadata">

**Author:** ![adbenitez](https://forum.delta.chat/user_avatar/forum.delta.chat/adbenitez/32/2323_2.png) [@adbenitez](https://forum.delta.chat/u/adbenitez)\
**Post date:** [August 19, 2019, 5:45pm UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/19 "2019-08-19T17:45:37Z")

</div>

most the time if you don’t want synchronization is because there are not such “another device” in the first place, if it was downloaded by one device it is enough and only one device should show it, what you suggest will keep the same issue of the same message showing on more than one client, the hole point is to download only once, if the message is in one device it is save to delete (in this scenario of opting out synchronization)

---

<div class="post-metadata">

**Author:** ![testbird](https://forum.delta.chat/letter_avatar_proxy/v4/letter/t/ce73a5/32.png) [@testbird](https://forum.delta.chat/u/testbird)\
**Post date:** [August 19, 2019, 8:53pm UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/20 "2019-08-19T20:53:40Z")

</div>

I still get the impression that the difference between delete-after-message-was-downloaded and delete-after-message-was-read might not be clear yet.

(Especially when considering that we are _both_ talking about the case in which some traffic saving option is enabled, and among other possible things, its desired effect is to not keep any unneccesary, old messages on the server, to avoid archive syncing traffic.)

It’s a corner case to avoid a “failure to deliver”.

> [@adbenitez](#):
>
> most the time if you don’t want synchronization is because there are not such “another device” in the first place, if it was downloaded by one device it is enough and only one device should show it, what you suggest will keep the same issue of the same message showing on more than one client

Ok, if there are no other devices as you say in the first place, how should the same message show up on more than one client? I think that may just have been thought or written to fast.

All that happens with “delete-after-message-was-read” is that only an _unread_ message will (also) be downloaded and show up on any further device, if there is one. After the message is read, there will be no further downloads by newly re-connecting clients, because the message gets removed from the server after the first read. As desired, generally messages that are read while another client is turned off or disconnected won’t be re-downloaded (synced) by that other client later on.

The delete-after-message-was-downloaded is just going one step too quick, it does not save any traffic in the single client case, but breaks reliable reception with multiple clients, even if there is only one single client online at any given time.

> [@adbenitez](#):
>
> if the message is in one device it is save to delete (in this scenario of opting out synchronization)

Not quite, if the message has not been read on one device, then deleting it on the server will prevent users to ever be able to read it on another device.  
Syncing up on already-read messages may be disabled for sure, but not allowing newly connected clients to download new, still-unread messages makes for flaky messaging.

---

<div class="post-metadata">

**Author:** ![adbenitez](https://forum.delta.chat/user_avatar/forum.delta.chat/adbenitez/32/2323_2.png) [@adbenitez](https://forum.delta.chat/u/adbenitez)\
**Post date:** [August 20, 2019, 11:53am UTC](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262/21 "2019-08-20T11:53:34Z")

</div>

> [@testbird](#):
>
> Ok, if there are no other devices as you say in the first place, how should the same message show up on more than one client? I think that may just have been thought or written to fast.

easy question, because there are only one device with one delta chat… and one classic email client that was there before my geeky friend came to me with this Delta-thingie, so the soon you remove it from the inbox the better, tons of non-tech people seems not to understand how delta or email works and complains about Delta Chat “sending spam to their inboxes”, there are no real need for keeping them until unread, if you want synchronization just use Delta Chat as it is now and you will be happy, but please don’t try to mix sync stuff when what we want is to avoid sync quirks at all, we don’t care about “reliable reception with multiple clients”, just don’t, we are talking about opting out sync so “breaks reliable reception with multiple clients” is a feature 😉

> [@testbird](#):
>
> Not quite, if the message has not been read on one device, then deleting it on the server will prevent users to ever be able to read it on another device.

that is the whole point!!! what we want is “ever be able to read it on another device”, we will read it in only one device, you miss what is important here: to avoid re-downloading messages because it costs money, “reliable reception with multiple clients” is a luxury for people in developed countries 😉

Regards,  
adb 🙂

[Next page](https://forum.delta.chat/t/workaround-make-new-delta-chat-installation-import-old-messages-from-imap-directory/262.md?page=2)
