{"action":"created","issue":{"url":"https://api.github.com/repos/lumail/lumail2/issues/140","labels_url":"https://api.github.com/repos/lumail/lumail2/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/lumail/lumail2/issues/140/comments","events_url":"https://api.github.com/repos/lumail/lumail2/issues/140/events","html_url":"https://github.com/lumail/lumail2/issues/140","id":127970524,"number":140,"title":"Fetch message headers only","user":{"login":"gber","id":1668189,"avatar_url":"https://avatars.githubusercontent.com/u/1668189?v=3","gravatar_id":"","url":"https://api.github.com/users/gber","html_url":"https://github.com/gber","followers_url":"https://api.github.com/users/gber/followers","following_url":"https://api.github.com/users/gber/following{/other_user}","gists_url":"https://api.github.com/users/gber/gists{/gist_id}","starred_url":"https://api.github.com/users/gber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gber/subscriptions","organizations_url":"https://api.github.com/users/gber/orgs","repos_url":"https://api.github.com/users/gber/repos","events_url":"https://api.github.com/users/gber/events{/privacy}","received_events_url":"https://api.github.com/users/gber/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2016-01-21T17:01:26Z","updated_at":"2016-01-23T08:35:11Z","closed_at":null,"body":"Looking at `/etc/lumail2/perl.d/get-messages` it appears that when opening an IMAP mailbox every single message is downloaded.\r\nI have several GB of email and mailboxes for mailing lists which contain thousands of messages, I access them via IMAP (currently using mutt) rather than using something like fetchmail or offlineimap because I only read them selectively and don't want to waste bandwidth and disk space on my computers. Also, opening such mailboxes with lumail takes several minutes currently.\r\nMoreover, in case of GMail tags are mapped to IMAP mailboxes, so downloading every single message means that the same message would be downloaded multiple times if it has multiple tags.\r\n\r\nWould it be possible to only fetch and cache the headers and fetch the body only on demand (and possibly without attachments) like other MUAs? \r\n"},"comment":{"url":"https://api.github.com/repos/lumail/lumail2/issues/comments/174161003","html_url":"https://github.com/lumail/lumail2/issues/140#issuecomment-174161003","issue_url":"https://api.github.com/repos/lumail/lumail2/issues/140","id":174161003,"user":{"login":"skx","id":735291,"avatar_url":"https://avatars.githubusercontent.com/u/735291?v=3","gravatar_id":"","url":"https://api.github.com/users/skx","html_url":"https://github.com/skx","followers_url":"https://api.github.com/users/skx/followers","following_url":"https://api.github.com/users/skx/following{/other_user}","gists_url":"https://api.github.com/users/skx/gists{/gist_id}","starred_url":"https://api.github.com/users/skx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skx/subscriptions","organizations_url":"https://api.github.com/users/skx/orgs","repos_url":"https://api.github.com/users/skx/repos","events_url":"https://api.github.com/users/skx/events{/privacy}","received_events_url":"https://api.github.com/users/skx/received_events","type":"User","site_admin":false},"created_at":"2016-01-23T08:35:11Z","updated_at":"2016-01-23T08:35:11Z","body":"OK thanks.  It's obviously something to do with the `CMaildir` handling, but I can't spot anything obvious in the backtrace, and frustratingly the code seems to work as-is for me.\r\n\r\nI'd planned to do the lazy-loading code next, but I guess i need to track this down first."}}