Editing Improving Modest email sync reliability

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 73: Line 73:
== offlineimap to read emails when no network connection is available ==  
== offlineimap to read emails when no network connection is available ==  
-
While one major advantage to IMAP protocol is being able to directly and remotely access emails on an account, when you don't have any network connection, you just can't access them... A workaround is to use a tool like [http://wiki.github.com/jgoerzen/offlineimap/ OfflineIMAP], which can synchronize an IMAP account with a local maildir.
+
While one major advantage to IMAP protocol is to being able to directly and remotely access emails on an account, when you don't have any network connection, you just can access them... A workaround is to use a tool like [http://wiki.github.com/jgoerzen/offlineimap/ OfflineIMAP], which can synchronize an IMAP account with a local maildir.
This sync occurs both ways: changes on IMAP account will propagate to maildir, changes on maildir will propagate to IMAP account. This ensure what you'll locally read will also be marked as read on the IMAP server.
This sync occurs both ways: changes on IMAP account will propagate to maildir, changes on maildir will propagate to IMAP account. This ensure what you'll locally read will also be marked as read on the IMAP server.
-
In order to use offlineimap, I had to get last sources including patches to select only emails not olders than X days. This will prevent getting *all* emails from the server (headers and bodies)... offlineimap package is available from extra-devel repository (optified to save some rootfs space). Install it as root:
+
In order to use offlineimap, I had to get last sources including patches to select only emails not olders than X days. This will prevent getting *all* emails from the server (headers and bodies)... You'll find a link at the end of this page to download a very quick & dirty deb package for offlineimap. Install it as root:
  sudo gainroot
  sudo gainroot
-
  apt-get install offlineimap
+
  dpkg -i offlineimap_6.2.1_all.deb
  exit
  exit
Line 118: Line 118:
<source lang="bash">
<source lang="bash">
#!/bin/bash
#!/bin/bash
-
offlineimap 2>&1 | tee /tmp/offlineimap.log
+
PYTHONPATH=/scratchbox/tools/lib/python2.3/site-packages /scratchbox/tools/bin/offlineimap 2>&1 | tee /tmp/offlineimap.log
echo Last run: `/bin/date`
echo Last run: `/bin/date`
</source>
</source>
Line 160: Line 160:
If only Modest could directly access our local maildir... Since it only support POP and IMAP account, we could install a local IMAP server, serving our maildir. Modest would then access this local IMAP server. This way, the remote sync part is delegated to offlineimap, while we can still use GUI front-ends. You'll still need to tell Modest to sync to the local maildir to check new emails. A short interval, 5 min, will ensure it'll be able to sync (since it's local, there's no network related issue anymore).
If only Modest could directly access our local maildir... Since it only support POP and IMAP account, we could install a local IMAP server, serving our maildir. Modest would then access this local IMAP server. This way, the remote sync part is delegated to offlineimap, while we can still use GUI front-ends. You'll still need to tell Modest to sync to the local maildir to check new emails. A short interval, 5 min, will ensure it'll be able to sync (since it's local, there's no network related issue anymore).
-
So, there are many IMAP server out there, I found dovecot to be easy to package and use. dovecot can be found in extra-devel (also optified to save rootfs space). Install it as root
+
So, there are many IMAP server out there, I found dovecot to be easy to package and use. See end of page for a link to deb file. Install it as root
  sudo gainroot
  sudo gainroot
-
  apt-get install dovecot
+
  dpkg -i dovecot_1.2.11-1_armel.deb
  exit
  exit
Line 267: Line 267:
* ...
* ...
-
== Where to find packages ? ==
+
== Links ==
-
 
+
-
dovecot, muut, msmtp and offlineimap used to be available from the following links:
+
* [http://dl.dropbox.com/u/7090003/dovecot_1.2.11-1_armel.deb dovecot_1.2.11-1_armel.deb]
* [http://dl.dropbox.com/u/7090003/dovecot_1.2.11-1_armel.deb dovecot_1.2.11-1_armel.deb]
Line 275: Line 273:
* [http://dl.dropbox.com/u/7090003/mutt_1.5.20-2_armel.deb mutt_1.5.20-2_armel.deb]
* [http://dl.dropbox.com/u/7090003/mutt_1.5.20-2_armel.deb mutt_1.5.20-2_armel.deb]
* [http://dl.dropbox.com/u/7090003/offlineimap_6.2.1_all.deb offlineimap_6.2.1_all.deb]
* [http://dl.dropbox.com/u/7090003/offlineimap_6.2.1_all.deb offlineimap_6.2.1_all.deb]
-
 
-
I've also created and uploaded deb packages for dovecot and offlineimap to extra-devel repository for convenience. You should prefer install them from extra-devel, as these packages are cleaner and optified (they install in /opt, not in / rootfs).
 
Line 283: Line 279:
Cheers,
Cheers,
-
Seb
 
-
 
-
== modest & offlineimap "shortcut" ==
 
-
 
-
I am currently experimenting with this setup:
 
-
 
-
* offlineimap synchronizes normally (as above)
 
-
* the local repository looks like this
 
-
 
-
type = Maildir
 
-
localfolders = ~/.modest/local_folders/
 
-
 
-
* just to be safe, the remote repository does a nametrans: 'x' + foldername
 
-
* the end result is, that I can see synchronized folders in modest
 
-
 
-
Does anybody see a problem with this? It seems to work as it should.
 
-
 
-
* it seems that modest sees new mails as new only when you enter the folder, not in the folder overview (which would mean that in the long run, having built-in offline storage is better)
 
-
 
-
Gruss,
 
-
Christian
 
-
 
-
 
-
I don't know if it's the best place to comment but I tried to symlink ~/Mail/... with ~/.modest/local_folders/ and there were troubles (modest trying to create directory again ? I can't remember for sure). But this is interesting and could remove unnecessary complexity with dovecot. I'll try this setup !
 
-
 
-
Thanks & Cheers
 
Seb
Seb
[[Category:HowTo]]
[[Category:HowTo]]

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)