Re: [trojita] Error with QRESYNC (invalid parameters)

2017-08-01 Thread Matthieu Hazon
Forgot to mention that I checked all the numbers of the QRESYNC request 
and everything seems OK.


Matthieu Hazon



Re: [trojita] Error with QRESYNC (invalid parameters)

2017-08-01 Thread Matthieu Hazon

Ok, tested a bit further and got interesting things.

It seems the dovecot server doesn't accept the last parenthesized list 
if no known UIDs sequence is provided, so this won't work:
SELECT INBOX (QRESYNC (1412601342 12776 
(1410,2115,2468,2644,2732,2776,2798,2809,2815,2818 
4220,5092,5509,5709,5805,5864,5889,5900,5906,5910)))


But this will work:
SELECT INBOX (QRESYNC (1412601342 12776 1:5910 
(1410,2115,2468,2644,2732,2776,2798,2809,2815,2818 
4220,5092,5509,5709,5805,5864,5889,5900,5906,5910)))


Where 5910 = UIDNEXT - 1

Section 3.2.5.1 of the RFC 7162 states that:
   "If the list of known UIDs was also provided, the server should only
   report flag changes and expunges for the specified messages.  If the
   client did not provide the list of UIDs, the server acts as if the
   client has specified "1:", where  is the mailbox's
   UIDNEXT value minus 1.  If the mailbox is empty and never had any
   messages in it, then lack of the list of UIDs is interpreted as an
   empty set of UIDs."

It's not very clear what they refer by "the list of UIDs" but I assume 
it's for the list of known UIDs, am I right?



Anyway, could this method be an acceptable patch?


Regards,
Matthieu Hazon



[trojita] Integration of Trojita IMAP in another project.

2018-03-17 Thread Matthieu Hazon

Hi folks,

I'm part of the Mail2Voice project (mail2voice.org), an email client 
dedicated for people with cognitive/motor impairments. We are completely 
rewriting the code and we need a mature IMAP implementation. Trojitá 
seems to have a nice one :) So our idea is to use the IMAP module of 
Trojitá as our IMAP backend.


As the architecture of Trojitá is a bit complex, I need your help to get 
into it. Basically, I would like to use the IMAP module (alone if 
possible). For now, I'm able to create an ImapAccess object (which I 
believe is the entry point of the IMAP module, am I right?) but I'm a 
bit lost in what to do after that so currently my questions are:

- What is the right workflow to sync emails?
- How do I get notified of incoming emails/changes etc. ?

Thank you in advance for your help.

Best regards,
Matthieu



Re: [trojita] Integration of Trojita IMAP in another project.

2018-03-21 Thread Matthieu Hazon

Hi Kevin,

Thank you for the links. I forgot to mention that we target GNU/Linux 
and Windows at least so I fear these libs won't fit ours needs as they 
rely on the KDE environment.

Anyway, I'll keep an eye on this :)

Best regards,
Matthieu

Le 20.03.2018 19:47, Kevin Krammer a écrit :

Hi Matthieu,

On Samstag, 17. März 2018 14:22:41 CET Matthieu Hazon wrote:

Hi folks,

I'm part of the Mail2Voice project (mail2voice.org), an email client
dedicated for people with cognitive/motor impairments. We are 
completely

rewriting the code and we need a mature IMAP implementation. Trojitá
seems to have a nice one :) So our idea is to use the IMAP module of
Trojitá as our IMAP backend.


Another thing you could look at is the kimap [1] or kimap2 [2] 
libraries.


These have been specifically written to be components for clients.

Cheers,
Kevin

[1] https://cgit.kde.org/kimap.git/
[2] https://cgit.kde.org/kimap2.git/




Re: [trojita] Integration of Trojita IMAP in another project.

2018-03-21 Thread Matthieu Hazon

Hi,
the API which the IMAP code offers is based on Qt's MVC pattern.
Basically, the code exposrt a tree view of the entire IMAP account
(that's the src/Imap/Model/Model.cpp), and there are proxies which
"filter" this model to provide a view of mail folders, e-mails in one
mailbox, message threading, etc. For more details, see [1] (pages
54-61). We also have Doxygen-based ref documentation [2] which might
help a bit.

With kind regards,
Jan

[1] http://trojita.flaska.net/msc-thesis.pdf
[2] 
https://api.kde.org/extragear-api/pim-apidocs/trojita/html/index.html


Hello Jan,

Thank you very much for the hints, I will take a look on this. I'll keep 
you informed of my progress.



Best regards,
Matthieu Hazon