dyne / JaroMail

Terminal UI email client to download, filter, search and archive messages off-line
https://dyne.org/software/jaro-mail
GNU General Public License v3.0
103 stars 9 forks source link

jaro fetch hangs with imap.gmail.com #17

Closed parazyd closed 8 years ago

parazyd commented 8 years ago

Noticed that using a gmail account with jaromail makes jaromail hang on jaro fetch jaro output:

 (*) Jaro Mail v4.0 running on GNU/Linux
  .  System in /usr/local/share/jaromail
 [D] Loading zlib: /usr/local/share/jaromail/zlibs/publish
 [D] Loading zlib: /usr/local/share/jaromail/zlibs/helpers
 [D] Loading zlib: /usr/local/share/jaromail/zlibs/stats
 [D] Loading zlib: /usr/local/share/jaromail/zlibs/keyring
 [D] Loading zlib: /usr/local/share/jaromail/zlibs/addressbook
 [D] Loading zlib: /usr/local/share/jaromail/zlibs/imap
 [D] Loading zlib: /usr/local/share/jaromail/zlibs/zuper
 [D] Loading zlib: /usr/local/share/jaromail/zlibs/filters
 [D] Loading zlib: /usr/local/share/jaromail/zlibs/maildirs
 [D] Loading zlib: /usr/local/share/jaromail/zlibs/search
 [D] Loading zlib: /usr/local/share/jaromail/zlibs/accounts
 [D] Loading zlib: /usr/local/share/jaromail/zlibs/parse
 [D] Loading zlib: /usr/local/share/jaromail/zlibs/locking
 [D] Loading zlib: /usr/local/share/jaromail/zlibs/email
 [D] Loading zlib: /usr/local/share/jaromail/zlibs/zuper.init
 [D] Zuper 0.2 initialized
 [D] 9 global variables registered
 [D] 6 global arrays registered
  .  full set of auxiliary functions loaded
 [D] Zuper 0.2 initialized
 [D] 9 global variables registered
 [D] 6 global arrays registered
 [D] Rm binary: wipe -f -s -q -R /dev/urandom
 [D] Mutt binary: /bin/mutt
 [D] Notmuch binary: /bin/notmuch
 [D] Alot binary: /bin/alot
 [D] All debug messages ON
 [D] fetch
 [D] read_account looking for gmail
 [D] name: xxx@gmail.com 
 [D] email: xxx@gmail.com
 [D] login: xxx@gmail.com
 [D] host: 
 [D] port: 
 [D] imap: imap.gmail.com
 [D] imap port: 993
 [D] smtp: smtp.gmail.com
 [D] smtp port: 465
 [D] trans: TLS1
 [D] certfile: 
 [D] cert: check
 [D] auth: plain
 [D] options: keep 
 [D] folders: 
 [D] exclude: 
 [D] nm_setup
  .  notmuch setup unread
 (*) Fetching email for account gmail
 [D] Test if we are online
 [D] trying to connect imap.gmail.com port 993
  .  Host imap.gmail.com responds on port 993
 [D] ask_password
  .  retrieving login credentials for xxx@gmail.com (gmail)
  .  username 'xxx@gmail.com' on host 'imap.gmail.com'
 [D] keyring path: jaromail/xxx@gmail.com/imap.gmail.com
  .  looking for password in secret-tool
  .  saved password found in keyring
 [D] imap_list_folders()
 [D] run_imap_query
 [D] running tls imap query via openssl, encrypted
  .  13 folders found
 [D] fetch folders: INBOX Personal Receipts Travel Work / / / / / / / /

Here it starts hanging. When I interrupt with Ctrl-C, I get some more output:

[D] endgame INT
 [D] destructor: _ztmp_destructor
 [D] _ztmp_destructor
 [D] endgame INT
 [D] destructor: _ztmp_destructor
 [D] _ztmp_destructor
 [D] fetchmail returns 0
  .  please wait while downloading mails to incoming...

Hangs again. Then I interrupt it again:

[D] endgame INT
 [D] destructor: _ztmp_destructor
 [D] _ztmp_destructor
 [D] update_filters
 (*) Updating filters...
 [D] newlock /home/parazyd/Mail/cache/filters
 [D] lock /home/parazyd/Mail/cache/filters
 [D] insert filter rules in the cache
 [D] to: <announce@archlinux> -> zz.archann
 [D] maildir already exists: /home/parazyd/Mail/zz.archann
 [D] to: <arch-dev-public@archlinux> -> zz.archdev
 [D] maildir already exists: /home/parazyd/Mail/zz.archdev
 [D] to: <arch-general@archlinux> -> zz.archgen
 [D] maildir already exists: /home/parazyd/Mail/zz.archgen
 [D] to: <arch-projects@archlinux> -> zz.archproj
 [D] maildir already exists: /home/parazyd/Mail/zz.archproj
 [D] to: <arch-security@archlinux> -> zz.archsec
 [D] maildir already exists: /home/parazyd/Mail/zz.archsec
 [D] to: <bitcoin-dev@> -> zz.bitcoindev
 [D] maildir already exists: /home/parazyd/Mail/zz.bitcoindev
 [D] to: <twitter.com> -> zz.social
 [D] maildir already exists: /home/parazyd/Mail/zz.social
 [D] to: <linkedin.com> -> zz.social
 [D] maildir already exists: /home/parazyd/Mail/zz.social
 [D] to: <plus.google.com> -> zz.social
 [D] maildir already exists: /home/parazyd/Mail/zz.social
 [D] to: <youtube.com> -> zz.social
 [D] maildir already exists: /home/parazyd/Mail/zz.social
 [D] to: <wmt-noreply@google> -> zz.social
 [D] maildir already exists: /home/parazyd/Mail/zz.social
 [D] to: <facebook> -> zz.social
 [D] maildir already exists: /home/parazyd/Mail/zz.social
 [D] compile the list of own addresses and aliases
 [D] unlocking and compiling the cache
 [D] unlock /home/parazyd/Mail/cache/filters
 [D] pidcheck /home/parazyd/Mail/cache/filters
 [D] pidcheck: 12292
 [D] /home/parazyd/Mail/cache/filters lock belongs to us
 [D] recursive reload
 [D] filter_maildir
 (*) Filtering maildir: incoming (1 mails}
 [D] update_notmuch
 (*) Updating notmuch indexes
 [D] nm_setup
  .  notmuch setup 
 [D] notmuch new
 [D] lock /home/parazyd/Mail/cache/notmuch
No new mail.
 [D] unlock /home/parazyd/Mail/cache/notmuch
 [D] pidcheck /home/parazyd/Mail/cache/notmuch
 [D] pidcheck: 12292
 [D] /home/parazyd/Mail/cache/notmuch lock belongs to us
 [D] endgame EXIT
 [D] destructor: _ztmp_destructor
 [D] _ztmp_destructor

This time the script exits. While using openssl by itself, I can login fine to gmail's IMAP and use all the folders.

Using:

jaromil commented 8 years ago

also solved with latest imap fix