Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* nnimap workflow examples?
@ 2020-04-24  7:21 Garjola Dindi
  2020-04-26 22:47 ` Jose A. Ortega Ruiz
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Garjola Dindi @ 2020-04-24  7:21 UTC (permalink / raw)
  To: info-gnus-english

Hi,

I have been using offlineimap [1] for years to get mail into gnus, but
since offlineimap stores messages in maildir format it has started to
become rather slow.

I have tried nnimap and it is much faster!

However, I would like to be able to store mail locally so I can read it
offline (I keep org-mode links in the notes I take while going through
my inbox).

I am looking for examples of configurations or workflows that I could use.

Thanks.

G.

Footnotes:
[1]  https://en.wikipedia.org/wiki/OfflineIMAP

-- 


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nnimap workflow examples?
  2020-04-24  7:21 nnimap workflow examples? Garjola Dindi
@ 2020-04-26 22:47 ` Jose A. Ortega Ruiz
  2020-04-27  2:20 ` 황병희
  2020-04-27 16:19 ` Eric Abrahamsen
  2 siblings, 0 replies; 5+ messages in thread
From: Jose A. Ortega Ruiz @ 2020-04-26 22:47 UTC (permalink / raw)
  To: info-gnus-english


Hi Garjola,

On Fri, Apr 24 2020, Garjola Dindi wrote:

[...]

> I am looking for examples of configurations or workflows that I could
> use.

Here goes what i do, since i do thinks a tad differently that what i've
seen explained in the available tutorials.  As you're about to see, it's
kind of complicated, and i don't expect many people to use it in the
same way, but there are some bits and pieces that i discovered over the
years and that might be useful by themselves.

 - I keep my local email using dovecot smptp server.  I configure it to
   use a maildir directory in my home (~/var/mail), and all local mails
   eventually end there, although Gnus access them exclusively via
   nnimap (to localhost).
 - As an aside, the fact that ~/var/mail is a regular maildir allows me
   to have notifications of new mails and the like independently of
   dovecot or Gnus (i use a xmobar monitor, and sometimes a little emacs
   lib i wrote that in turn uses inotify).
 - To fetch mail from remote imap servers (in my case a gmail account
   for work and protonmail via its bridge), i use fetchmail
 - I tell fetchmail to deliver the fetched mails using dovecot's mda.
   This is an example using cli flags, but the same can be done in
   fetchmailrc

      mda="/usr/lib/dovecot/dovecot-lda -a"

      function fetch_work () {
        fetchmail --ssl --sslproto auto --folder $1 $2 $3 \
                  --mda "$mda jao+work/${1,,}" \
                  --user jao@bigml.com imap.gmail.com
      }

      fetch_work INBOX --keep
      fetch_work support --nokeep --fetchall

    Here, i'm fetching mail from a gmail INBOX and telling fetchmail to
    deliver it to dovecot with envelope addresses
    jao+work/inbox@localhost, and fetching mail from a gmail "folder"
    called support and sending it to jao+work/support@locahost.  "jao"
    is my local username.

    Also, in the first case i'm keeping emails in the remote server and
    in the second deleting them when i download them.

 - In dovecot, i have a sieve filter that sends mail directed to
   jao+FOO to the local inbox FOO.  so those mails above go to local
   imap inboxes work/inbox and work/support.  That's what Gnus sees
   when it connects to the local imap server: a work/inbox and a
   work/support.

 - This can be extended to as many remote imap folders and servers as
   you want (i have two servers and a handful of folders in each).

 - I also have local sieve filters to put mail fetched from the remote
   server in different local imap boxes.  I prefer the filtering being
   doing by dovecot because that way may email notifiers (which look at
   the inbox maildirs) don't depend on a gnus fetch: i get a
   notification as soon as dovecot puts the mail there (usually
   instructed by fetchmail, asynchronosuly, but also local mail
   deliveries go there).

 - To search mail locally, one can use the regular nnimap search in
   Gnus against the local dovecot server.  I also use in paralell
   ivy-notmuch: i tell notmuch to (re)index ~/var/mail after each
   fetchmail round (that's in a cron job), and the perform searches
   typically with ivy-notmuch)... i've got a little bit of elisp that
   goes then from a notmuch result to the corresponding mail in Gnus.

 - I use postfix to deliver email using different remote SMTP servers
   (multiplexing on the mail's From: address), so emacs sends all mails
   to just to the local MTA (postfix), and it asynchronously takes care
   of dispatching the mail (that way, sending an email is always almost
   instantaneous).

It's simpler than it looks :)

HTH,
jao
-- 
Once you hear the details of victory, it is hard to distinguish it
from a defeat. -Jean-Paul Sartre, writer and philosopher (1905-1980)


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nnimap workflow examples?
  2020-04-24  7:21 nnimap workflow examples? Garjola Dindi
  2020-04-26 22:47 ` Jose A. Ortega Ruiz
@ 2020-04-27  2:20 ` 황병희
  2020-04-27 16:19 ` Eric Abrahamsen
  2 siblings, 0 replies; 5+ messages in thread
From: 황병희 @ 2020-04-27  2:20 UTC (permalink / raw)
  To: info-gnus-english

Garjola Dindi <garjola@garjola.net> writes:

> ... I would like to be able to store mail locally so I can read it
> offline (I keep org-mode links in the notes I take while going through
> my inbox).

How about getmail? Personally i am downloading by each(special) label
for Gmail' IMAP. Then Gnus open the messages via ndoc. So cool^^^ 

Sincerely, Gnus' fan Byung-Hee

-- 
^고맙습니다 _地平天成_ 감사합니다_^))//


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nnimap workflow examples?
  2020-04-24  7:21 nnimap workflow examples? Garjola Dindi
  2020-04-26 22:47 ` Jose A. Ortega Ruiz
  2020-04-27  2:20 ` 황병희
@ 2020-04-27 16:19 ` Eric Abrahamsen
  2020-04-28 14:46   ` Garjola Dindi
  2 siblings, 1 reply; 5+ messages in thread
From: Eric Abrahamsen @ 2020-04-27 16:19 UTC (permalink / raw)
  To: Garjola Dindi; +Cc: info-gnus-english

Garjola Dindi <garjola@garjola.net> writes:

> Hi,
>
> I have been using offlineimap [1] for years to get mail into gnus, but
> since offlineimap stores messages in maildir format it has started to
> become rather slow.
>
> I have tried nnimap and it is much faster!
>
> However, I would like to be able to store mail locally so I can read it
> offline (I keep org-mode links in the notes I take while going through
> my inbox).
>
> I am looking for examples of configurations or workflows that I could use.

In addition to what's been said, I would recommend a combination of a
local dovecot server, accessed via localhost, and isync (the executable
is called "mbsync") for syncing it to your remote server. If your remote
server also happens to be dovecot, you can use dovecot's own dsync
program to do the syncing.

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: nnimap workflow examples?
  2020-04-27 16:19 ` Eric Abrahamsen
@ 2020-04-28 14:46   ` Garjola Dindi
  0 siblings, 0 replies; 5+ messages in thread
From: Garjola Dindi @ 2020-04-28 14:46 UTC (permalink / raw)
  To: info-gnus-english

Jao, Byung-Hee and Eric,

Thanks for your ansers. I will have to investigate dovecot.

Since I have several IMAP accounts, some of which on the same server, I
have to figure out how to configure dovecot to do that.

Actually, offlineimap is great for that. Maybe I can try to configure it
to store the local copy as IMAP instead of maildir, which may be
analogous to the dovecot solution which has been suggested here.

Thanks for the hints!

G.

On Mon 27-Apr-2020 at 18:19:29 +02, Eric Abrahamsen <eric@ericabrahamsen.net> wrote: 
> Garjola Dindi <garjola@garjola.net> writes:
>
>> Hi,
>>
>> I have been using offlineimap [1] for years to get mail into gnus, but
>> since offlineimap stores messages in maildir format it has started to
>> become rather slow.
>>
>> I have tried nnimap and it is much faster!
>>
>> However, I would like to be able to store mail locally so I can read it
>> offline (I keep org-mode links in the notes I take while going through
>> my inbox).
>>
>> I am looking for examples of configurations or workflows that I could use.
>
> In addition to what's been said, I would recommend a combination of a
> local dovecot server, accessed via localhost, and isync (the executable
> is called "mbsync") for syncing it to your remote server. If your remote
> server also happens to be dovecot, you can use dovecot's own dsync
> program to do the syncing.
>
> _______________________________________________
> info-gnus-english mailing list
> info-gnus-english@gnu.org
> https://lists.gnu.org/mailman/listinfo/info-gnus-english
-- 


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-28 14:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24  7:21 nnimap workflow examples? Garjola Dindi
2020-04-26 22:47 ` Jose A. Ortega Ruiz
2020-04-27  2:20 ` 황병희
2020-04-27 16:19 ` Eric Abrahamsen
2020-04-28 14:46   ` Garjola Dindi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).