Support normal mails in DCC for hybrid clients

As a pre-requisite for Make DC a replacement for MUAs? and hybrid chat/mail clients in general, the DeltaChat Core library should support sending and receiving arbitrary MIME mails.

I see several ways to add the API to DCC, in order from least to most abstraction:

  1. Send/receive raw bytes. Not stored in DCC database.
    Folders are simply strings representing the full path, i.e. starting with “INBOX/”.
    • pro: least effort for DCC
    • con: most effort for DCC clients, duplicate DCC functionality
    • con: need to expose more internals to access e2ee keys, etc.
  2. New class allowing direct access to libetpan. Optionally stored in DCC database.
    Folders have their own class.
    • pro: reduced effort to implement now
    • con: more effort for clients on migration away from libetpan
  3. New class with all necessary methods, abstracting libetpan. Optionally stored in DCC database.
    Folders have their own class.
    • pro: reduced efforts for clients
    • con: more effort to implement now
    • con: more effort for DCC to migrate away from libetpan
  4. Extend the existing message class (dc_msg_t). Stored in DCC database.
    Folders can use either their own class or extend the existing chat class (dc_chat_t).
    • con: big change to existing APIs, code and DB
    • con: gets in the way / increases the learning curve for pure chat clients

Just counting the pros and cons, options 2 seems the best so far. But before we start thinking about implementation detail, what are your thoughts and ideas about it? Maybe some completely different implementation ideas?

Not sure this is a good forum for discussing what are rather implementation APIs and architecture questions. I’d rather suggest the mailing list. Let me still say a few things :slight_smile:

I suggest to think more about the needed API and not too much about how it’s implemented. There is a lot of tentative/incremental flux that could happen in the next months, regarding moving code from C to Rust etc. And let’s maybe first talk about sending/receiving semi-arbitrary mime-mails, not about new/added IMAP handling. Which C-API would be needed and how would it work/be specified?
How does Autocrypt-handling happen including encryption and decryption? If mime-mails are not tied to a chat at sending time, but to a caller-specified list of recipients, then how are they accessed on the receiving side?

I created a thread on the mailing list (archive link).

1 Like