Improving Modest email sync reliability

(Accessing a IMAP GMail account using mutt)
Line 8: Line 8:
I basically faced all these problems, but synchronization is the top most important one for me. This page is about trying to improve Modest email sync reliability and exploring other ways to read/write emails on N900. It mainly focuses on dealing with IMAP from a GMail account, but may be extended to other IMAP, and even other protocols such as POP.
I basically faced all these problems, but synchronization is the top most important one for me. This page is about trying to improve Modest email sync reliability and exploring other ways to read/write emails on N900. It mainly focuses on dealing with IMAP from a GMail account, but may be extended to other IMAP, and even other protocols such as POP.
 +
 +
== Disclaimer ==
 +
 +
Following instructions are provided as-is. Use them as you like and at your own risk. I'm not responsible of any emails losses or anything like that. You've been warned.
 +
 +
== Prerequisites ==
 +
 +
Before diving into details, you should be comfortable writing commands on terminal, editing files, etc... some basic Linux usage is required.
 +
 +
Because we'll write a lot, you may want to access your N900 through [[SSH]]. In order to do this, you'll need to deal with [[USB_networking]] between your PC and your phone.
 +
 +
Finally, you should know how to access your IMAP account, that is, all parameters should been known to work to avoid any doubts when testing your connection.
== Accessing a IMAP GMail account using mutt ==
== Accessing a IMAP GMail account using mutt ==
-
So my first try was accessing my GMail account using mutt. There have been discussions about this here, though I couldn't find a deb package file for mutt in different repository. I had to create a new one, including some needed compilation option. This deb file can be found, attached to this page.
+
So my first try was accessing my GMail account using mutt. There have been discussions about this here, though I couldn't find a deb package file for mutt in different repository. I had to create a new one, including some needed compilation option:
 +
 
 +
* slang: allowing 256 terminal colors, reported to work better than curses
 +
* hcache: header caching enable, preventing always accessing remote IMAP account to list emails
 +
* imap: because we want to access an IMAP account...
 +
* ssl: because this IMAP account is an IMAPS account (using SSL encryption)
 +
 
 +
This deb file can be found, attached to this page.
 +
 
 +
First, copy mutt deb file to your N900 (scp, mail, etc...) and install it as root:
 +
 
 +
sudo fakeroot
 +
dpkg -i mutt_1.5.20-2_armel.deb
 +
 
 +
You then need to write your .muttrc file to setup your IMAP account connection. Here's my basic muttrc file I used to access my Gmail account:
 +
 
 +
# General
 +
set move=no
 +
set quit=ask-yes
 +
set timeout=15
 +
auto_view text/html
 +
set realname="Sebastien Lelong"
 +
 +
# IMAP
 +
set imap_authenticators="login"
 +
set imap_passive="no"
 +
set imap_user = 'username'
 +
set imap_pass = 'password'
 +
set spoolfile = imaps://imap.gmail.com:993/INBOX
 +
set folder = imaps://imap.gmail.com:993
 +
set record="imaps://imap.gmail.com/[Gmail]/Sent Mail"
 +
set maildir_trash = yes
 +
set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"
 +
set header_cache = yes
 +
set smtp_url = smtp://username@gmail.com@smtp.gmail.com:587/
 +
set smtp_pass = "password"
 +
 
 +
Replace username and password as needed. Launch mutt:
 +
 
 +
mutt
 +
 
 +
you'll be asked to confirm something about a certificate, then mutt will access your IMAP account and retrieve headers for all your emails. Yes, all headers (but not emails content...) ! There may be an option to only retrieve last email headers, but I just don't know it. This can take quite a lot of time and kills your dataplan...
 +
== offlineimap to read emails when no network connection is available ==  
== offlineimap to read emails when no network connection is available ==  

Revision as of 10:01, 10 June 2010

Lots of complains have been reported regarding Modest N900 email client. Particularly when it comes to sync emails. Quoting link title DaveQB:

  1. It takes about 20mins to check my email.
  2. It uses 100% cpu for the entire time it is checking.
  3. Email that is read, deleted etc are not updated on the server-side, so when I check on a different client later, nothing I did on the N900 is reflected.
  4. You can't do any searching.
  5. It doesn't respect subscribed folder settings on the server

I basically faced all these problems, but synchronization is the top most important one for me. This page is about trying to improve Modest email sync reliability and exploring other ways to read/write emails on N900. It mainly focuses on dealing with IMAP from a GMail account, but may be extended to other IMAP, and even other protocols such as POP.

Contents

Disclaimer

Following instructions are provided as-is. Use them as you like and at your own risk. I'm not responsible of any emails losses or anything like that. You've been warned.

Prerequisites

Before diving into details, you should be comfortable writing commands on terminal, editing files, etc... some basic Linux usage is required.

Because we'll write a lot, you may want to access your N900 through SSH. In order to do this, you'll need to deal with USB_networking between your PC and your phone.

Finally, you should know how to access your IMAP account, that is, all parameters should been known to work to avoid any doubts when testing your connection.

Accessing a IMAP GMail account using mutt

So my first try was accessing my GMail account using mutt. There have been discussions about this here, though I couldn't find a deb package file for mutt in different repository. I had to create a new one, including some needed compilation option:

  • slang: allowing 256 terminal colors, reported to work better than curses
  • hcache: header caching enable, preventing always accessing remote IMAP account to list emails
  • imap: because we want to access an IMAP account...
  • ssl: because this IMAP account is an IMAPS account (using SSL encryption)

This deb file can be found, attached to this page.

First, copy mutt deb file to your N900 (scp, mail, etc...) and install it as root:

sudo fakeroot
dpkg -i mutt_1.5.20-2_armel.deb

You then need to write your .muttrc file to setup your IMAP account connection. Here's my basic muttrc file I used to access my Gmail account:

# General
set move=no
set quit=ask-yes
set timeout=15
auto_view text/html
set realname="Sebastien Lelong"

# IMAP
set imap_authenticators="login"
set imap_passive="no"
set imap_user = 'username'
set imap_pass = 'password'
set spoolfile = imaps://imap.gmail.com:993/INBOX
set folder = imaps://imap.gmail.com:993
set record="imaps://imap.gmail.com/[Gmail]/Sent Mail"
set maildir_trash = yes
set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"
set header_cache = yes
set smtp_url = smtp://username@gmail.com@smtp.gmail.com:587/
set smtp_pass = "password"

Replace username and password as needed. Launch mutt:

mutt

you'll be asked to confirm something about a certificate, then mutt will access your IMAP account and retrieve headers for all your emails. Yes, all headers (but not emails content...) ! There may be an option to only retrieve last email headers, but I just don't know it. This can take quite a lot of time and kills your dataplan...


offlineimap to read emails when no network connection is available

todo

Adding dovecot IMAP server to let Modest accessing emails locally

todo