maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Modest patch: offline IMAP support (https://talk.maemo.org/showthread.php?t=55771)

matthew_exon 2010-06-10 14:11

Modest patch: offline IMAP support
 
I've always been annoyed by the standard Maemo mail readers' inability to cache mail for offline reading.

For me, the real value of a pocketable computer is when I'm travelling overseas: that's the only time I spend long periods without access to my computer. But when I'm travelling I don't have Internet access - at best, maybe I can manage an unreliable wifi connection for half an hour. Nokia continues to insist that the tablets are "always on", and therefore offline caching (of web pages, maps, emails, etc etc) is unnecessary, so my tablet is constantly failing me precisely when I need it most. If only Android or iOS were any better I'd switch in a snap, but of course they're even worse!

But anyway, better to light a candle than curse the darkness, so...

These patched binaries allow me to cache my email, at least. Actually I just switched on functionality that has been present in Modest and Tinymail since the projects were started, but functionality that was broken and disabled. Frustrating to know that it was so close to working all this time!

http://mat.exon.name/modest/

I don't intend to support these at all, and no doubt the next release of Tinymail and/or Modest will obliterate the functionality. If you're interested in a more permanent solution, here's the critical bug report:

http://tinymail.org/trac/tinymail/ticket/91

gordonshowers 2010-06-10 17:52

Re: Modest patch: offline IMAP support
 
I used a slightly awkward workaround. I had set a rule on each email account to copy all mail to an "archive to phone" gmail account, and added that gmail account to modest on my phone. Then from modest I used the "move message" option to move each message to a folder on the memory card. You can also select the phone memory.

If only there was a "copy message" command as well as move, I wouldn't have needed the intermediate archiving gmail account.

Edit: Thanks a lot matthew_exon, I can now delete my intermediate gmail account!

manavs 2010-06-10 18:06

Re: Modest patch: offline IMAP support
 
I am assuming there would be a considerable speed increase when opening/browsing those imap folders as they would be pulled from the cache? Or will this only help with reading mail offline?

matthew_exon 2010-06-11 06:48

Re: Modest patch: offline IMAP support
 
Oh yeah, almost forgot, the big speed improvement is the other advantage of this :-) No need to be in offline mode, it's always faster.

ruskie 2010-06-11 08:27

Re: Modest patch: offline IMAP support
 
I'll stick to a non-caching imap client. But still great for those that want it.. it should be an opiton in the official client(no not enabled or disabled) but actually asked for each account.

Have you considered pushing the entire patch upstream?

matthew_exon 2010-06-11 11:35

Re: Modest patch: offline IMAP support
 
The whole thing depends on the bug in Tinymail being fixed. Until that happens, pushing the patch upstream will just result in memory leaks.

dack001 2010-06-11 11:40

Re: Modest patch: offline IMAP support
 
Nice!
May i ask where those mails are chached?
In the 2 gig ineternal or on the big fat-partition?

hawaii 2010-06-11 14:33

Re: Modest patch: offline IMAP support
 
Installing the patched package removes the generic-pr package, FWIW.

Best not to confuse with original packages so using +offline was a good thing, if anybody wants to sort it; simply edit the control file and use the original versions so nothing is conflicting. with the PR package expects.

Thank you very much for patching and packaging this.

hawaii 2010-06-11 15:15

Re: Modest patch: offline IMAP support
 
Seems to change the font in a reply window for some reason? Related?

pelago 2010-06-11 15:21

Re: Modest patch: offline IMAP support
 
Many thanks for this. Maybe the package and executable should be called "modest-community" or similar, to allow it to sit side-by-side with the official modest, if that will help avoid upgrade problems. It would also more easily allow users to compare and switch between the two versions.

I wonder if there are other community-created modest or tinymail patches that could be added to this version. Of course, these things should be pushed upstream, but it would be nice to be able to use fixed versions without having to wait for Nokia to release the next PR.

matthew_exon 2010-06-11 16:57

Re: Modest patch: offline IMAP support
 
dack001: it's in ~/.modest/cache, in the 2gb internal partition, so that's a good point, best not to let it grow too big!

matthew_exon 2010-06-11 17:22

Re: Modest patch: offline IMAP support
 
What's generic-pr? I certainly didn't look for any dependency problems, it's a "works for me" thing.

I don't want to start a fork of Modest or Tinymail or anything, I just had an itch that needed scratching. Email clients are especially vulnerable to feature creep, and open source makes it worse. Keeping Modest usable means turning to people and saying "That essential feature which is a no-brainer to include? We're not including it, go buy a Blackberry". If "modest-community" ever happened, I for one probably wouldn't use it!

The bug in Tinymail is different though. Fixing it doesn't add bloat, on the contrary it exercises unused code and keeps bitrot at bay. So that's the bit I think is worth pushing.

dack001 2010-06-11 17:41

Re: Modest patch: offline IMAP support
 
:(
Quote:

Originally Posted by matthew_exon (Post 710846)
dack001: it's in ~/.modest/cache, in the 2gb internal partition, so that's a good point, best not to let it grow too big!


Thank your for your answer!

To bad, that means i can't use it. Atm i have ca 1 gig of emails in my main folder and its still growing :(
Wouldn't it be possible to relocate the cache to the FAT-Partition?
But i fear this might cause some problems if one would open the mail folder while the N900 is connected to the pc.

Looks as if i have to stick with easy-debians claws-mail a little longer.

matthew_exon 2010-06-11 18:04

Re: Modest patch: offline IMAP support
 
I'd be surprised if something like this didn't work, although I don't have time to test it myself:

mv ~/.modest/cache ~/MyDocs/
ln -s ~/MyDocs/cache ~/.modest/

No doubt dramas will ensue if you try to use the mail client while the USB cable is plugged in and mass storage mode enabled, but in general I'd think that should work. Also, it seems safe to just blow away the entire cache directory and restart from scratch, it's just a cache after all.

cashclientel 2010-06-22 10:27

Re: Modest patch: offline IMAP support
 
Is this going to make it into the repos?

matthew_exon 2010-06-24 11:03

Re: Modest patch: offline IMAP support
 
No, this is not going into the repos, not unless the Tinymail team fix that bug.

zgold550 2010-06-25 05:59

Re: Modest patch: offline IMAP support
 
Hm, it seems your site might be down Mat? I'm very anxious to try our your fixes :)

matthew_exon 2010-06-28 09:22

Re: Modest patch: offline IMAP support
 
Sorry about that, damn thing goes up and down more often than <insert ribald humour here>.

Should be running now.

maartenmk 2010-06-28 13:47

Re: Modest patch: offline IMAP support
 
Quote:

Originally Posted by pelago (Post 710637)
Many thanks for this. Maybe the package and executable should be called "modest-community" or similar, to allow it to sit side-by-side with the official modest, if that will help avoid upgrade problems. It would also more easily allow users to compare and switch between the two versions.

I wonder if there are other community-created modest or tinymail patches that could be added to this version. Of course, these things should be pushed upstream, but it would be nice to be able to use fixed versions without having to wait for Nokia to release the next PR.

Good point. There is another patched version, see http://talk.maemo.org/showthread.php?t=56634
It would make sense to combine the efforts, but that is up to the authors of course.

Trestry 2011-07-14 22:16

Re: Modest patch: offline IMAP support
 
Could somebody explain how to install thus?

matthew_exon 2011-07-14 23:45

Re: Modest patch: offline IMAP support
 
If you mean the offline imap patches, I tried to explain the process as simply as I could at the top of this page:

http://mat.exon.name/modest/

Is there something confusing there?

hawaii 2011-07-15 02:17

Re: Modest patch: offline IMAP support
 
Nothing confusing at all. I've been using them for 6+ months with no issues. Thanks for your work.

Trestry 2011-07-17 15:56

Re: Modest patch: offline IMAP support
 
The problem is that I am using the CSSU. The CSSU provides an updated version of modest. When I try apt-get install modest, I get the message that modest is already the newest version.

Can you provide the deb file please?

hawaii 2011-07-17 21:39

Re: Modest patch: offline IMAP support
 
There are binary packages on his site.

Trestry 2011-07-17 22:42

Re: Modest patch: offline IMAP support
 
The only thing I can find is the .diff file, but I don't know how to install it.
Can you provide a link to the .deb?

matthew_exon 2011-07-17 23:02

Re: Modest patch: offline IMAP support
 
The .debs are here:

http://apt.exon.name/pool/main/m/modest/

But I would probably recommend against mixing CSSU and this version of Modest. Anything fixed in the CSSU version won't be fixed in my version.

Trestry 2011-07-17 23:25

Re: Modest patch: offline IMAP support
 
Thank you very much!

It would be great if your patch could be included in the CSSU. That way we get a version of modest with latest fixes from the CSSU and the offline imap fix.

jerryfreak 2011-07-17 23:31

Re: Modest patch: offline IMAP support
 
i second this.

CSSU is a great effort, and modest needs to be all it can be!

matthew_exon 2011-07-17 23:40

Re: Modest patch: offline IMAP support
 
Oh, forgot to mention that you also need the patched .debs of Tinymail:

http://apt.exon.name/pool/main/t/tinymail/

matthew_exon 2011-07-17 23:52

Re: Modest patch: offline IMAP support
 
I asked for the offline IMAP stuff to be merged into the official trunk several times, and never got a friendly response, so I gave up. Recently pali asked for it to be merged into the CSSU and he also doesn't seem to have had much success.

I'm afraid I've all but given up on open source generally and am looking forward to buying a non-Maemo smart phone. Until then my patched version is good enough for me.

rajil.s 2011-07-18 00:58

Re: Modest patch: offline IMAP support
 
The patches have been merged in CSSU.

matthew_exon 2011-07-18 10:44

Re: Modest patch: offline IMAP support
 
Well that is good news. Thanks!

erendorn 2011-07-18 13:15

Re: Modest patch: offline IMAP support
 
That's really cool!
Will the setting (caching or not) will be availlable to users?
Will it automatically cache every single mail, or can we set limits?

ikerrg 2012-09-25 07:47

Re: Modest patch: offline IMAP support
 
Thanks for the good job!!

Why the option is named "mcenfladvsetupofflinesync"? Why not "Offline IMAP sync"?

Copernicus 2012-09-25 09:04

Re: Modest patch: offline IMAP support
 
Quote:

Originally Posted by ikerrg (Post 1271870)
Thanks for the good job!!

Why the option is named "mcenfladvsetupofflinesync"? Why not "Offline IMAP sync"?

Well, from what I can tell, this offline imap sync patch is of the "quick and dirty" kind. Not only is that option not given a human-readable name, the patch also simply dumps all of your email into the "opt" directory. Without checking how much space is available. So, if you've got a lot of mail, you may end up filling the entire partition...

ikerrg 2012-09-25 09:59

Re: Modest patch: offline IMAP support
 
Quote:

Originally Posted by Copernicus (Post 1271896)
Well, from what I can tell, this offline imap sync patch is of the "quick and dirty" kind. Not only is that option not given a human-readable name, the patch also simply dumps all of your email into the "opt" directory. Without checking how much space is available. So, if you've got a lot of mail, you may end up filling the entire partition...

I have installed the "stable" CSSU 4.1. It should not include a patch of this kind if it is not 99% safe. And obviously, it should be correctly named. Currently it looks like a too early patch.

reinob 2012-09-25 10:54

Re: Modest patch: offline IMAP support
 
@ikerrg,

Treat all CSSU stuff as highly experimental. Stable vs Testing doesn't (in my opinion) mean anything.

My solution for offline IMAP is to use offlineimap to synchronize with my IMAP account (for now, gmail) as well as dovecot as local IMAP server. Modest only connects to this local server (address "127.0.0.1") so that e-mails are always available.

The only thing I yet have to solve is that:
(1) dovecot wakes up the CPU more than it should,
(2) modest doesn't show INBOX unless it detects you are connected. sort kills the idea of offline e-mail.

I use alpine instead of modest. Works perfectly.

iceskateclog 2013-12-08 09:29

Re: Modest patch: offline IMAP support
 
Had two gmail accounts with offline support and my /home/user got 100% full.

Just a heads up for those, who like me, blindly, enabled offline IMAP support option in Modest and forgot :)

pichlo 2013-12-08 09:53

Re: Modest patch: offline IMAP support
 
Can't you symlink /home/user/.modest/cache to a directory in MyDocs?

iceskateclog 2013-12-08 11:16

Re: Modest patch: offline IMAP support
 
I was afraid of problems when connecting as Mass Storage.

Anyway, made myself some problems. Deleted user/.modest contents, now when I start "modest -s" and try to check email, I get Segmentation fault.

Account and all settings are there.

Maybe someone has an idea? Is it worth pursuing a bug or should I recreate accounts from scratch as described in http://talk.maemo.org/showthread.php?t=88219 ?


All times are GMT. The time now is 21:19.

vBulletin® Version 3.8.8