[Users] IMAP push support?

Alexander Vdolainen alex at vapaa.xyz
Fri Jun 30 13:45:04 CEST 2017


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

On Thu, 29 Jun 2017 14:08:58 +0200
Ricardo Mones <ricardo at mones.org> wrote:

> On Thu, Jun 29, 2017 at 04:20:50AM +0300, Alexander Vdolainen wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA256
> > 
> > Hi all,
> > 
> > I'm really missed IMAP push support in claws mail.
> > Could anyone point me with that ? (might be this already implemented
> > and i'm too stupid to find it :) ).
> > 
> > btw, I can try to implement this myself, but it will be nice to have
> > some advice about starting point.  
> 
> You can start your journey here: http://www.claws-mail.org/bug/2212
already did. 
imap idle support with libetpan is relatively easy
Just need a thread with the following: (just an ugly and quickly
written code)

while(1) {
  if (r = mailimap_idle(imap) ) {
      /*something goes wrong: give up?*/
    }             
                  
    int fd;       
    int maxfd;    
    fd_set readfds;
    struct timeval delay;
                  
    fd = mailimap_idle_get_fd(imap);
    FD_ZERO(&readfds);
    FD_SET(fd, &readfds);
    maxfd = fd;   
                  
    delay.tv_sec = 30 * 60; /*ugly, but going from rfc ... */
    delay.tv_usec = 0;
                  
    r = select(maxfd + 1, &readfds, NULL, NULL, &delay);
    if (r == 0) {
      /* timeout */
    }
    else if (r == -1) {
      /*something goes wrong again ... */
    }
    else {
      if (FD_ISSET(fd , &readfds)) {
        /* has something on socket */
        if (r = mailimap_idle_done(imap) ) {
          /*yet another error*/
        }
	/* here we go - process mail required here ...*/
        
      }
    }

}
/*other code ... blablabla*/
> 
> regards,
the question(s) is:
1. are there any description of claws mail client architecture (to
avoid a lot of code view)?
2. could someone point me to related sources in claws code base ?
(otherwise it will take a more time to do so myself)
3. not familiar with GUI (settings should be done within gui code) and
it will be nice if someone will help me with that, is it possible at
the moment ? 
4. are there any problems in claws with multithreading ?

thanks,
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJZVjnFAAoJEHN7EyzMfJO5BrYP/29zzk2Dq5fTQV/qs2pYdb9h
852+q79Me5HNmKAZry1gzo5EUCyTCoNT4JHcYX50nA2na2ggVAS4ZgDqzH2qzCz4
1wE6WJlmjHjA3YObaWPjXhyuGoo8B1grjfV3I3cvKFjI3W59jn7zGxDu00X3xx3h
vrlIRHyIa6eMk5qyLrat8YRAszTcDfH8T3y/htixzjKTFuCwxXspg/yhtxb9eYIY
BN6av9xgs9rtpJIg+BdDCzKOrfFsYagC2n2roHQx1NtsVcqjaqCvnTFOLoCgkus1
5CE5tqejJR0tl0JBmNI/PVFdY6wFz8RXYFVHVpJLskn42NC9FOWg/gxq1PSTXJ8m
P/+kSAp7pZ2Nl6q10HbfyKicMSu9Kisd3qWKLoM+NoBpcRN95cSd8yY2evArosCQ
BDeXi7eALMPGnbpmXwgoawCI095JQ0yEE3uAPRBDFsbw6ce+3Ib9GyR62sKJrmFw
aOutIZmlqOXJITDY7OVs/go4me5VlTQSKkCAG/13KxH9uqyUhtNGPfJ1yovhBMh7
Lab2vrhCtCUR9H7YKy2e+vTTxNDSQJEFGbBPzekHNgOlfVi/czPXRXv1B0vnO4hI
yxxQkDWk5ksK6SNaRPncU58c4ELlihC29UXkX1vxR3M0v+7A2cPn3btayFeXZInG
JWXsvVC61w1yb9m121iH
=L7Fw
-----END PGP SIGNATURE-----


More information about the Users mailing list