Re: Preferred way to get imap emails

2019-07-30 Thread Pankaj Jangid
On Tue, Jul 30, 2019 at 02:57:26PM -0500, Derek Martin wrote:
> Joining any community requires to at least some extent that you gain
> that community's trust.  Your posts thusfar have not earned you that.
> 
May be over time, I'll gain it. :-) all well now.


-- 
Pankaj
Planet Earth. 

""
A nasty looking dwarf throws a knife at you.


signature.asc
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-30 Thread Pankaj Jangid
On Tue, Jul 30, 2019 at 02:52:27PM -0500, Derek Martin wrote:
> > Honestly speaking, I have tried a couple of tools - offlineimap, mbsync
> > and fetchmail. All are flawed. 
> 
> I don't know what you think the flaws are with this, but I can say
> that I use fetchmail + procmail for this purpose myself at work for
> reasons I won't get into here.  I've been doing it for many years,
> and find it to have no particular flaws.  Together these tools are
> extremely powerful and very flexible.  It may just be that you have
> not yet discovered how best to use such tools to accomplish your
> goals and need to spend a bit more time learning them.

This could be a probability. It is just 2 weeks that I have restarted
using these tools again after ~20 years. 'mbsync' wasn't there at that
time. But it is working Okay as of now. Sometimes the sync fails. I am
discussing those issue in their mailing list.

Thanks for your detailed reply, Derek.

-- 
Pankaj
Planet Earth. 

""
There's nothing disgusting about it [the Companion].  It's just another
life form, that's all.  You get used to those things.
-- McCoy, "Metamorphosis", stardate 3219.8


signature.asc
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-30 Thread Derek Martin
On Tue, Jul 30, 2019 at 03:00:32AM +0530, Pankaj Jangid wrote:
> On Mon, Jul 29, 2019 at 01:50:54PM -0700, Kevin J. McCarthy wrote:
> > If you want to participate in development, then please do so by starting
> > small and showing me I can trust your patches.  After you've done that, we
> > can talk about larger changes.
> > 
> This is really encouraging. 

But to be very clear, it is not meant to be.  You came in saying you
want Mutt to handle a protocol in a way that is expressly against the
way that protocol is intended to be used, by adding features to Mutt
which are counter to its design philosophy.  You should not expect
encouragment for that.

Joining any community requires to at least some extent that you gain
that community's trust.  Your posts thusfar have not earned you that.

-- 
Derek D. Martinhttp://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.



pgpanUGB_PAap.pgp
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-30 Thread Derek Martin
On Tue, Jul 30, 2019 at 01:47:35AM +0530, Pankaj Jangid wrote:
> On Mon, Jul 29, 2019 at 03:13:37PM -0400, Dan Ritter wrote:
> > IMAP is, explicitly, a mail protocol for clients to do the
> > minimal amount of fetching necessary. You can do a full sync on
> > top of it, but that's not what it's there for.
> 
> A lot has changed since then. I remember I used to pop everything
> because the mailserver quota was less than 10mb (20 years back). And
> then take backup of local emails on floppy drives.
> 
> Now we check emails on mobiles, browser and obviously *mutt*. There must
> be some inclusive intuitive changes now.

But none of this really affects how IMAP works, or should work.  If
anything, it's a recommendation for using IMAP as intended.

As far as I can tell, your whole motivation is to avoid a bit of
latency as each message is downloaded for display, by downloading all
the messages ahead of time (and I guess storing them in some local
cache?  Or something)...  But that's sort of the antithesis of IMAP,
as Dan indicated.  It requires a potentially lengthy wait while all of
the relevant message bodies are downloaded, which IMAP was expressly
designed to avoid.

As I said already, if you're on a fast, low-latency connection to your
IMAP server, generally you won't notice this latency, and this is
probably the case for the vast majority of e-mail users (who typically
are using IMAP at work, or at home, on a local LAN, OR to their ISP's
servers, over a fast broadband connection on the same network).  So I
conclude that is not your situation.  If you're not in that situation,
there are already solutions available to you:  

 1. Fetch the messages yourself and read them locally.
Fetchmail and mbsync were both designed for exactly this.
 2. Accept that the latency is just something you have to deal with.
 3. Investigate an alternative provider with whom you have a better
connection.

> Honestly speaking, I have tried a couple of tools - offlineimap, mbsync
> and fetchmail. All are flawed. 

I don't know what you think the flaws are with this, but I can say
that I use fetchmail + procmail for this purpose myself at work for
reasons I won't get into here.  I've been doing it for many years,
and find it to have no particular flaws.  Together these tools are
extremely powerful and very flexible.  It may just be that you have
not yet discovered how best to use such tools to accomplish your
goals and need to spend a bit more time learning them.

There's no need for Mutt to do this, and it's rather against its
design philosophy.  Given that, I wouldn't guess you'd have much luck
getting such a feature accepted by the Mutt development community,
particularly since the primary maintainer has already basically said
so.

That said, I haven't used Mutt's IMAP functionality myself in many
years, and it has been completely rewritten since then.  It could be
the case that it might be possible to optimize the way Mutt handles
the fetch and display of the message, such that it only reads enough
of the message to fill up the display window, and then continues
reading the rest of the message.  But for all I know it already does
that.  And of course in cases where the message is encoded in such a
way that reading the whole message is required to decode any of it
(I'm thinking encryption, for example), such an optimization will not
work.  Surely Kevin would know and could comment further.

[My understanding is that it is technically possible to decrypt
messages encoded with asymmetric encryption in pieces, but neither
GnuPG nor OpenSSL do this, and Mutt's behavior is dependent on
theirs.]

-- 
Derek D. Martinhttp://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.



pgpeDOsO3IxVD.pgp
Description: PGP signature


Re: Unsubscribing from mailing-list threads (was: Preferred way to get imap emails)

2019-07-30 Thread Grant Edwards
On 2019-07-30, José María Mateos  wrote:
> On Tue, Jul 30, 2019 at 10:08:02AM -0400, Mark H. Wood wrote:
>
>> You may want to examine some netnews clients for ideas. They tend to
>> have exactly this: a database of killed threads, easily augmented with
>> a simple keystroke.
>
> This. Having used slrn in the past, I was surprised mutt didn't have 
> some kind of killfile mechanism readily available (or, if it's 
> available, I have completely missed it).

That's one of the reasons I use slrn rather than mutt for following
mailing lists (including this one).

-- 
Grant Edwards   grant.b.edwardsYow! Quick, sing me the
  at   BUDAPEST NATIONAL ANTHEM!!
  gmail.com



Re: Unsubscribing from mailing-list threads (was: Preferred way to get imap emails)

2019-07-30 Thread José María Mateos
On Tue, Jul 30, 2019 at 10:08:02AM -0400, Mark H. Wood wrote:

> You may want to examine some netnews clients for ideas. They tend to
> have exactly this: a database of killed threads, easily augmented with
> a simple keystroke.

This. Having used slrn in the past, I was surprised mutt didn't have 
some kind of killfile mechanism readily available (or, if it's 
available, I have completely missed it).

Cheers,

-- 
José María (Chema) Mateos || https://rinzewind.org/


Re: Unsubscribing from mailing-list threads (was: Preferred way to get imap emails)

2019-07-30 Thread Mark H. Wood
On Tue, Jul 30, 2019 at 07:40:02AM +0200, Matthias Apitz wrote:
> El día martes, julio 30, 2019 a las 06:36:35a. m. +0200, Francesco Ariis 
> escribió:
> 
> > On Tue, Jul 30, 2019 at 06:31:42AM +0200, Matthias Apitz wrote:
> > >
> > > I'm a mutt user for many years. From time to time I do miss a feature in
> > > mutt to mark a given thread as "do not present any mail of this thread
> > > anymore, just collapse them and mark for deletion on exit".
> > >
> > > This is such a thread I would mark as this.
> > 
> > Maybe this link can be of interest
> > 
> > http://ariis.it/static/articles/mutt-ml/page.html
> 
> Thanks for this pointer. The doc describes exactly the problem. But, the
> proposed solution with a macro deleting threads which follow the rule
> (copied from the doc):
> 
> "Threads with only replies means threads where the originating post
> isn’t present; if it is not present is because we deleted it; if we
> deleted it we didn’t like it and we don’t want replies to it, too."
> 
> is not good. Sometimes (many times) I have saved the original post of a
> "good" thread in some place, for example into the mbox file ~/Mail/mutt and 
> so the
> above pattern would touch/delete a "good" thread also as a "bad" one.
> 
> A solution must be based on some kind of a local "database" file of threads 
> marked as
> "bad" threads (perhaps as patterns) and one must actively store the given
> "bad" thread into it, for example with M and then a D would
> later, even in the next mutt session, read this "database" file and delete
> all threads from the actual mailbox for all patterns in it.

You may want to examine some netnews clients for ideas.  They tend to
have exactly this: a database of killed threads, easily augmented with
a simple keystroke.

-- 
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu


signature.asc
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-30 Thread Pankaj Jangid
On Tue, Jul 30, 2019 at 03:05:15PM +0200, Marcus C. Gottwald wrote:
> Fetch them as soon as new mail becomes visible or once after entering
> a folder? Maybe the latter can get achieved using a folder-hook (or a
> manually executed key press) triggering the execution of a macro along
> the lines of:
> 
>~N ~z <10K ~b whatever
>all
>
> 
> The idea is that Mutt will need to look at the email bodies (~b) and
> will have to fetch them in order to be able to look at them.

I am surprized at the remarkable ways in which *mutt* can be configured.
Great answer. Thanks. I'll try this and report.

Regards.

-- 
Pankaj
Planet Earth. 

""
The light at the end of the tunnel is the headlight of an approaching train.


signature.asc
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-30 Thread Marcus C. Gottwald


Pankaj Jangid wrote (Sat 2019-Jul-27 20:58:20 +0530):

> My 2nd question is - is there a way to pre-fetch all the emails in inbox.

Fetch them as soon as new mail becomes visible or once after entering
a folder? Maybe the latter can get achieved using a folder-hook (or a
manually executed key press) triggering the execution of a macro along
the lines of:

   ~N ~z <10K ~b whatever
   all
   

The idea is that Mutt will need to look at the email bodies (~b) and
will have to fetch them in order to be able to look at them.

Cheers, Marcus

-- 
   Marcus C. Gottwald  ··  https://cheers.de



Re: Unsubscribing from mailing-list threads (was: Preferred way to get imap emails)

2019-07-30 Thread Samir Benmendil

On Jul 30, 2019 at 7:40, Matthias Apitz wrote:
A solution must be based on some kind of a local "database" file of 
threads marked as "bad" threads (perhaps as patterns) and one must 
actively store the given "bad" thread into it, for example with M 
and then a D would later, even in the next mutt session, read 
this "database" file and delete all threads from the actual mailbox 
for all patterns in it.


Would it be possible to keep this information in the email by, say, 
adding a header to it. And have mutt mark any message whose parent 
contains this header as read.


Something like this as a macro or hook (untested):

   ~h X-Mark-Thread-Read\n

An external tool can probably add the header if mutt can't do it.

One could also (ab)use the spam detection mechanism

   spam "X-Mark-Thread-Read" "100/NotInterested"

I'm reading this out of the NeoMutt manual, I suppose Mutt has similar 
functionality.




I Cc'ed the author of the article: fa...@ariis.it
Please keep him/her in Cc when you reply.

matthias

--
Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub


signature.asc
Description: PGP signature


Re: Unsubscribing from mailing-list threads (was: Preferred way to get imap emails)

2019-07-29 Thread Francesco Ariis
Hello Matthias,

On Tue, Jul 30, 2019 at 07:40:02AM +0200, Matthias Apitz wrote:
> I Cc'ed the author of the article: fa...@ariis.it
> Please keep him/her in Cc when you reply.

Big smile, the author and the poster are in this case the
same person: myself. :P

> Thanks for this pointer. The doc describes exactly the problem. But, the
> proposed solution with a macro deleting threads which follow the rule
> (copied from the doc):
> 
> "Threads with only replies means threads where the originating post
> isn’t present; if it is not present is because we deleted it; if we
> deleted it we didn’t like it and we don’t want replies to it, too."
> 
> is not good. Sometimes (many times) I have saved the original post of a
> "good" thread in some place, for example into the mbox file ~/Mail/mutt and 
> so the
> above pattern would touch/delete a "good" thread also as a "bad" one.
> 
> A solution must be based on some kind of a local "database" file of threads 
> marked as
> "bad" threads (perhaps as patterns) and one must actively store the given
> "bad" thread into it, for example with M and then a D would
> later, even in the next mutt session, read this "database" file and delete
> all threads from the actual mailbox for all patterns in it.

Useful remarks! Indeed a 100% solution *has* to pass from some kind
of database/list of good/bad threads. For not, marking a message
as "important" saves the thread (even if broken) from touch/delete;
this alleviates the pain in some cases.
-F


Re: Unsubscribing from mailing-list threads (was: Preferred way to get imap emails)

2019-07-29 Thread Matthias Apitz
El día martes, julio 30, 2019 a las 06:36:35a. m. +0200, Francesco Ariis 
escribió:

> On Tue, Jul 30, 2019 at 06:31:42AM +0200, Matthias Apitz wrote:
> >
> > I'm a mutt user for many years. From time to time I do miss a feature in
> > mutt to mark a given thread as "do not present any mail of this thread
> > anymore, just collapse them and mark for deletion on exit".
> >
> > This is such a thread I would mark as this.
> 
> Maybe this link can be of interest
> 
> http://ariis.it/static/articles/mutt-ml/page.html

Thanks for this pointer. The doc describes exactly the problem. But, the
proposed solution with a macro deleting threads which follow the rule
(copied from the doc):

"Threads with only replies means threads where the originating post
isn’t present; if it is not present is because we deleted it; if we
deleted it we didn’t like it and we don’t want replies to it, too."

is not good. Sometimes (many times) I have saved the original post of a
"good" thread in some place, for example into the mbox file ~/Mail/mutt and so 
the
above pattern would touch/delete a "good" thread also as a "bad" one.

A solution must be based on some kind of a local "database" file of threads 
marked as
"bad" threads (perhaps as patterns) and one must actively store the given
"bad" thread into it, for example with M and then a D would
later, even in the next mutt session, read this "database" file and delete
all threads from the actual mailbox for all patterns in it.

I Cc'ed the author of the article: fa...@ariis.it
Please keep him/her in Cc when you reply.

matthias

-- 
Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub


Unsubscribing from mailing-list threads (was: Preferred way to get imap emails)

2019-07-29 Thread Francesco Ariis
On Tue, Jul 30, 2019 at 06:31:42AM +0200, Matthias Apitz wrote:
>
> I'm a mutt user for many years. From time to time I do miss a feature in
> mutt to mark a given thread as "do not present any mail of this thread
> anymore, just collapse them and mark for deletion on exit".
>
> This is such a thread I would mark as this.

Maybe this link can be of interest

http://ariis.it/static/articles/mutt-ml/page.html


Re: Preferred way to get imap emails

2019-07-29 Thread Matthias Apitz


I'm a mutt user for many years. From time to time I do miss a feature in
mutt to mark a given thread as "do not present any mail of this thread
anymore, just collapse them and mark for deletion on exit".

This is such a thread I would mark as this.

matthias

-- 
Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
May, 9: Спаси́бо освободители! Thank you very much, Russian liberators!


Re: Preferred way to get imap emails

2019-07-29 Thread Pankaj Jangid
On Mon, Jul 29, 2019 at 01:50:54PM -0700, Kevin J. McCarthy wrote:
> If you want to participate in development, then please do so by starting
> small and showing me I can trust your patches.  After you've done that, we
> can talk about larger changes.
> 
This is really encouraging. 

-- 
Pankaj
Planet Earth. 

""
The last time somebody said, "I find I can write much better with a word
processor.", I replied, "They used to say the same thing about drugs."
-- Roy Blount, Jr.


signature.asc
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-29 Thread Kevin J. McCarthy

On Tue, Jul 30, 2019 at 01:47:35AM +0530, Pankaj Jangid wrote:

I may start it's implementation after a philosophical debate here.


Please don't.  You've been here all of, what, less than two weeks? 
You've shown a lack of understanding of basic mutt concepts, and spent 
far more time talking than listening.


As of right now, I certainly won't waste my time looking at invasive 
patches from you.


If you want to participate in development, then please do so by starting 
small and showing me I can trust your patches.  After you've done that, 
we can talk about larger changes.


Thank you,

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-29 Thread Pankaj Jangid
On Mon, Jul 29, 2019 at 03:13:37PM -0400, Dan Ritter wrote:
> Mail used to come from servers to clients via POP. It was
> essentially a full-push of a mailbox. Bidirectional sync was
> not a good idea.

> IMAP is, explicitly, a mail protocol for clients to do the
> minimal amount of fetching necessary. You can do a full sync on
> top of it, but that's not what it's there for.

A lot has changed since then. I remember I used to pop everything
because the mailserver quota was less than 10mb (20 years back). And
then take backup of local emails on floppy drives.

Now we check emails on mobiles, browser and obviously *mutt*. There must
be some inclusive intuitive changes now.

> Mutt implements both POP and IMAP, and doesn't implement
> sync-everything-over-IMAP. There are tools for that, and if you
> want them, it's reasonable to point you at the specialist tools
> and say, look: they do their jobs well.

Honestly speaking, I have tried a couple of tools - offlineimap, mbsync
and fetchmail. All are flawed. That is what lead me to start this thread
in the first place. 'mutt' has a clean implementation. And it implements
protocols very well. If there is a simple configuration option to manage
this that would be great. I may start it's implementation after a
philosophical debate here.

set imap_prefetch = yes/no

This could be a good idea to completely do away with other tools which
are no longer maintained. 

> If you want to add full IMAP mailbox syncing to mutt, you will
> need to either do it well enough that people agree it's better
> than the existing tools, or convince somebody else to do it in
> a way that is that much better.
> 
I completely agree on this.

-- 
Pankaj
Planet Earth. 

""
The light at the end of the tunnel is the headlight of an approaching train.


signature.asc
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-29 Thread Pankaj Jangid
On Mon, Jul 29, 2019 at 12:54:04PM -0500, Derek Martin wrote:
> Because this again is how IMAP works--you're meant to read the message
> off the server, and it's downloaded on demand.  If you had to
> pre-fetch all the messages, this could take a very long time,
> especially if you were looking at an extremely large mailbox for the
> first time, and it contained very large messages.  With typically
> short messages on fast networks, you usually should not notice much
> delay, and with larger messages you only incur the wait time when you
> actually want to look at the message.  If you have a high latency
> connection, it may be worth pre-syncing and reading locally.
> 
Fair enough reasons. But still I feel that if mutt implements 'imap'
then it should include the features like prefetching. Some kind of
strategy could be though of about which emails to fetch first. My take
is unread messages should be pre-fetched first.

> If you want to pre-sync your mailbox and read it locally, that would
> be why you would use fetchmail, mbsync, etc..  Mutt doesn't need to do
> that for you since there are already plenty of things that do.
> 
There are plenty of things for fetching. Agree. But the same logic may
apply to the mutt's imap implementation also. Why do it? 

-- 
Pankaj
Planet Earth. 

""
If you don't drink it, someone else will.


signature.asc
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-29 Thread Derek Martin
On Sat, Jul 27, 2019 at 10:58:22PM +0530, Pankaj Jangid wrote:
> > > I have configured cache so it doesn't happen everytime with the same
> > > email. My 2nd question is - is there a way to pre-fetch all the
> > > emails in inbox.
> > 
> > I don't think so -- not without using something like offline-imap.
> > 
> 
> Is there any specific reason this was not done? This is probably related
> to some design decisions.

Because this again is how IMAP works--you're meant to read the message
off the server, and it's downloaded on demand.  If you had to
pre-fetch all the messages, this could take a very long time,
especially if you were looking at an extremely large mailbox for the
first time, and it contained very large messages.  With typically
short messages on fast networks, you usually should not notice much
delay, and with larger messages you only incur the wait time when you
actually want to look at the message.  If you have a high latency
connection, it may be worth pre-syncing and reading locally.

If you want to pre-sync your mailbox and read it locally, that would
be why you would use fetchmail, mbsync, etc..  Mutt doesn't need to do
that for you since there are already plenty of things that do.

-- 
Derek D. Martinhttp://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.



pgpMLj1gG90Bc.pgp
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-29 Thread Pankaj Jangid
On Mon, Jul 29, 2019 at 12:32:42PM -0500, Derek Martin wrote:
> > The only problem with mbsync is that it doesn't have a "daemon
> > mode", so I had to write a script that runs it every N seconds.
> > But that's a trivial complaint.
> 
> There are any number of solutions to this, but... cron?  It's probably
> much more reliable than a script.

Agree. A daemon is something that continuously listens for request and
responds as one arrives. Here, we just want to periodically invoke one
command. Cron is best suited for this. UNIX philosophy and D-R-Y
principle also emphasize on that.

-- 
Pankaj
Planet Earth. 

""
By failing to prepare, you are preparing to fail.


signature.asc
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-29 Thread Derek Martin
On Sat, Jul 27, 2019 at 02:57:20PM -0600, Akkana Peck wrote:
> The only problem with mbsync is that it doesn't have a "daemon
> mode", so I had to write a script that runs it every N seconds.
> But that's a trivial complaint.

There are any number of solutions to this, but... cron?  It's probably
much more reliable than a script.

-- 
Derek D. Martinhttp://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.



pgp3Re_UfdWAS.pgp
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-28 Thread Pankaj Jangid
> > Homebrew. And isync provides a daemon by the same name. I just had to
> > 
> > brew services start isync
> 
> That service is not part of isync but of the packaging [1].
> 
> Personally, I'm using the systemd service + timer from [2] on Linux. If
> you read [1], it shows that they do exactly the same thing, creating a
> service that runs in specific intervals, on macOS.
> 
> ---
> [1] https://github.com/Homebrew/homebrew-core/blob/master/Formula/isync.rb
> [2] https://wiki.archlinux.org/index.php/Isync#Automatic_synchronization

Yes. It is the hombrew team that has done it. Thanks for sharing these
links.

-- 
Pankaj
Planet Earth. 

""
Laugh, and the world ignores you.  Crying doesn't help either.


signature.asc
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-28 Thread lists
On Sun, Jul 28, 2019 at 08:44:09AM +0530, Pankaj Jangid wrote:
> I don't know which distribution you are on. Right now I am on macOS and
> installed mbsync using Homebrew. mbsync comes under isync package in
> Homebrew. And isync provides a daemon by the same name. I just had to
> 
> brew services start isync

That service is not part of isync but of the packaging [1].

Personally, I'm using the systemd service + timer from [2] on Linux. If
you read [1], it shows that they do exactly the same thing, creating a
service that runs in specific intervals, on macOS.

---
[1] https://github.com/Homebrew/homebrew-core/blob/master/Formula/isync.rb
[2] https://wiki.archlinux.org/index.php/Isync#Automatic_synchronization


Re: Preferred way to get imap emails

2019-07-28 Thread Patrick Shanahan
* Erik Christiansen  [07-28-19 04:06]:
> On 28.07.19 12:21, Cameron Simpson wrote:
> > On 27Jul2019 22:40, Pankaj Jangid  wrote:
> > > On Sat, Jul 27, 2019 at 11:41:52AM -0400, Patrick Shanahan wrote:
> > > > I still use fetchmail and with imap accounts including google.  and
> > > > have no problem.
> > > > 
> > > Probably I'll try it again. This was my favourite tool. But then I check
> > > that there is no change in the repository since very long. I was worried
> > > if this is still maintained or not.
> > 
> > Maybe it is stable :-)
> 
> Indeed, with all of us using it happy and content.
> 
> My use of fetchmail and procmail differs from Matthias' only in the
> omission of spamassassin, and having procmail deliver to about ten
> inboxes, one for each list, one for family, and the default. Mutt then
> presents them in the priority order I have selected, so that I first see what
> I need to see, without having to wade through two thousand mails in one
> nightmare jungle after a fortnight out on the farm. (I am at a loss to
> comprehend how it is possible to deal with one chaotic dump, especially
> without having a heart attack or failing to respond to important mail,
> lost in the flood.)
> 
> Instead of spamassassin, I've made do with a bunch of procmail recipes,
> which only let about one spam per week through. Another recipe weeds a
> high traffic list, dumping stuff that won't interest me.

I do the same for years except I utilize spamassassin.

-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  @ptilopteri
http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri
Photos: http://wahoo.no-ip.org/piwigo   paka @ IRCnet freenode


Re: Preferred way to get imap emails

2019-07-28 Thread Erik Christiansen
On 28.07.19 12:21, Cameron Simpson wrote:
> On 27Jul2019 22:40, Pankaj Jangid  wrote:
> > On Sat, Jul 27, 2019 at 11:41:52AM -0400, Patrick Shanahan wrote:
> > > I still use fetchmail and with imap accounts including google.  and
> > > have no problem.
> > > 
> > Probably I'll try it again. This was my favourite tool. But then I check
> > that there is no change in the repository since very long. I was worried
> > if this is still maintained or not.
> 
> Maybe it is stable :-)

Indeed, with all of us using it happy and content.

My use of fetchmail and procmail differs from Matthias' only in the
omission of spamassassin, and having procmail deliver to about ten
inboxes, one for each list, one for family, and the default. Mutt then
presents them in the priority order I have selected, so that I first see what
I need to see, without having to wade through two thousand mails in one
nightmare jungle after a fortnight out on the farm. (I am at a loss to
comprehend how it is possible to deal with one chaotic dump, especially
without having a heart attack or failing to respond to important mail,
lost in the flood.)

Instead of spamassassin, I've made do with a bunch of procmail recipes,
which only let about one spam per week through. Another recipe weeds a
high traffic list, dumping stuff that won't interest me.

Erik


Re: Preferred way to get imap emails

2019-07-27 Thread Pankaj Jangid
On Sun, Jul 28, 2019 at 12:21:47PM +1000, Cameron Simpson wrote:
> On 27Jul2019 22:40, Pankaj Jangid  wrote:
> > On Sat, Jul 27, 2019 at 11:41:52AM -0400, Patrick Shanahan wrote:
> > > I still use fetchmail and with imap accounts including google.  and
> > > have no problem.
> > > 
> > Probably I'll try it again. This was my favourite tool. But then I check
> > that there is no change in the repository since very long. I was worried
> > if this is still maintained or not.
> 
> Maybe it is stable :-)
> 
> 
> Offlineimap seems to work (according to what I hear on the offlineimap list;
> I keep meaning to give it a proper try), which is good for keeping the IMAP
> folders and your local folder in sync.
> 
I am trying out mbsync now. It is running as a service and working
smoothly till now. I configured it yesterday night. I am observing it
for 2-3 days.

> Regarding offlineimap quitting, had you considered running it as a cron job
> in once-off mode?
> 
Yes it was running as services but after the notebook goes into sleep it
doesn't work as expected. I have to restart service. I am on macOS.
Everytime it wakes up I must issue this command

brew services restart offlineimap


-- 
Pankaj
Planet Earth. 

""
I'm meditating on the FORMALDEHYDE and the ASBESTOS leaking into my
PERSONAL SPACE!!


signature.asc
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-27 Thread Pankaj Jangid
On Sat, Jul 27, 2019 at 02:57:20PM -0600, Akkana Peck wrote:
> > > I have getmail working pulling email from my gmail account using imap
> > > and it only grabs the new mail for me each time I run it and I open up
> > > mutt and go through the email then mutt purges what I deleted as it
> > > exits.
> > > 
> > That's a good choice if you just want to read inbox and clear up junk. I
> > wanted to have all my IMAP folders synced locally. I am trying out
> > mbsync. Let's see how it goes.
> 
> I've had the best luck with mbsync; it worked much better for me
> than offlineimap or mailsync.
> 
> The only problem with mbsync is that it doesn't have a "daemon
> mode", so I had to write a script that runs it every N seconds.
> But that's a trivial complaint.
> 
I don't know which distribution you are on. Right now I am on macOS and
installed mbsync using Homebrew. mbsync comes under isync package in
Homebrew. And isync provides a daemon by the same name. I just had to

brew services start isync

It is working fine as of now. Let's see how it goes after a few sleep
and wakeup cycles of my macbook.

-- 
Pankaj
Planet Earth. 

""
There was once a programmer who worked upon microprocessors.  "Look at
how well off I am here," he said to a mainframe programmer who came to visit,
"I have my own operating system and file storage device.  I do not have to
share my resources with anyone.  The software is self-consistent and
easy-to-use.  Why do you not quit your present job and join me here?"
The mainframe programmer then began to describe his system to his
friend, saying: "The mainframe sits like an ancient sage meditating in the
midst of the data center.  Its disk drives lie end-to-end like a great ocean
of machinery.  The software is a multi-faceted as a diamond and as convoluted
as a primeval jungle.  The programs, each unique, move through the system
like a swift-flowing river.  That is why I am happy where I am."
The microcomputer programmer, upon hearing this, fell silent.  But the
two programmers remained friends until the end of their days.
-- Geoffrey James, "The Tao of Programming"


signature.asc
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-27 Thread Cameron Simpson

On 27Jul2019 22:40, Pankaj Jangid  wrote:

On Sat, Jul 27, 2019 at 11:41:52AM -0400, Patrick Shanahan wrote:
I still use fetchmail and with imap accounts including google.  and 
have no problem.



Probably I'll try it again. This was my favourite tool. But then I check
that there is no change in the repository since very long. I was worried
if this is still maintained or not.


Maybe it is stable :-)

I use getmail to pull my personal (self hosted) inbox, and my GMail 
account forwards to that. So it all funnels to my laptop, where I file 
it.


However, that means your email isn't in the upstream IMAP mail tree, 
which may make accessing it otherwise (eg on a phone) tricky. My 
personal hack for this is to have a distinct IMAP account for the phone, 
and my filing system forwards important stuff to that as it is seen. And 
my mutt "F" macro (normally flag-message) flags the message and also 
forwards a copy to the phone mailbox.


Offlineimap seems to work (according to what I hear on the offlineimap 
list; I keep meaning to give it a proper try), which is good for keeping 
the IMAP folders and your local folder in sync.


Regarding offlineimap quitting, had you considered running it as a cron 
job in once-off mode?


Cheers,
Cameron Simpson 


Re: Preferred way to get imap emails

2019-07-27 Thread Akkana Peck
Pankaj Jangid writes:
> On Sat, Jul 27, 2019 at 12:41:21PM -0400, Jude DaShiell wrote:
> > I have getmail working pulling email from my gmail account using imap
> > and it only grabs the new mail for me each time I run it and I open up
> > mutt and go through the email then mutt purges what I deleted as it
> > exits.
> > 
> That's a good choice if you just want to read inbox and clear up junk. I
> wanted to have all my IMAP folders synced locally. I am trying out
> mbsync. Let's see how it goes.

I've had the best luck with mbsync; it worked much better for me
than offlineimap or mailsync.

The only problem with mbsync is that it doesn't have a "daemon
mode", so I had to write a script that runs it every N seconds.
But that's a trivial complaint.

...Akkana


Re: Preferred way to get imap emails

2019-07-27 Thread Pankaj Jangid
On Sat, Jul 27, 2019 at 12:41:21PM -0400, Jude DaShiell wrote:
> I have getmail working pulling email from my gmail account using imap
> and it only grabs the new mail for me each time I run it and I open up
> mutt and go through the email then mutt purges what I deleted as it
> exits.
> 
That's a good choice if you just want to read inbox and clear up junk. I
wanted to have all my IMAP folders synced locally. I am trying out
mbsync. Let's see how it goes.

-- 
Pankaj
Planet Earth. 

""
The more I see of men the more I admire dogs.
-- Mme De Sevigne, 1626-1696


signature.asc
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-27 Thread Pankaj Jangid
On Sat, Jul 27, 2019 at 04:24:53PM -, Grant Edwards wrote:
> I've been using mutt with Gmail for 10-15 years, and I just point mutt
> at Gmail's IMAP server and leave all of the email on that server.
> [That sounds like what you have now.]
> 
Yes. Using this configuration right now.

> Yep, that's how IMAP works.  I guess I'm lucky that my network
> connection is fast enough that it doesn't bother me.
> 
The speed is okay. But still there is half a second of lag as compared
to local mbox files. Local emails open in a snap.

> > I have configured cache so it doesn't happen everytime with the same
> > email. My 2nd question is - is there a way to pre-fetch all the
> > emails in inbox.
> 
> I don't think so -- not without using something like offline-imap.
> 

Is there any specific reason this was not done? This is probably related
to some design decisions.

-- 
Pankaj
Planet Earth. 

""
Everybody gets free BORSCHT!


signature.asc
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-27 Thread Pankaj Jangid
On Sat, Jul 27, 2019 at 06:19:10PM +0200, Matthias Apitz wrote:
> I always use fetchmail and pass the mails locally through
> sendmail --> procmail --> SpamAssassin --> /var/mail/guru
>\-> /var/mail/spam
> to get the SPAM filtered out and to get all my mails to my FreeBSD
> laptop. I have *all* my mails since back to 1998 on my local storage.
> 
Since 1998 ☉_☉ . SSDs are too costly for that as of now. I would love to
have all my emails on my box. Definitely. Waiting for SSD prices to fall
significantly.

-- 
Pankaj
Planet Earth. 

""
You will soon forget this.


signature.asc
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-27 Thread Pankaj Jangid
On Sat, Jul 27, 2019 at 11:41:52AM -0400, Patrick Shanahan wrote:
> 
> I still use fetchmail and with imap accounts including google.  and have
> no problem.
> 
Probably I'll try it again. This was my favourite tool. But then I check
that there is no change in the repository since very long. I was worried
if this is still maintained or not.

-- 
Pankaj
Planet Earth. 

""
Vermouth always makes me brilliant unless it makes me idiotic.
-- E.F. Benson


signature.asc
Description: PGP signature


Re: Preferred way to get imap emails

2019-07-27 Thread Jude DaShiell
I have getmail working pulling email from my gmail account using imap
and it only grabs the new mail for me each time I run it and I open up
mutt and go through the email then mutt purges what I deleted as it
exits.

On Sat, 27 Jul 2019, Grant Edwards wrote:

> Date: Sat, 27 Jul 2019 12:24:53
> From: Grant Edwards 
> To: mutt-users@mutt.org
> Subject: Re: Preferred way to get imap emails
>
> On 2019-07-27, Pankaj Jangid  wrote:
>
> > I have very recently switched back to mutt. My 1st question is - is
> > the preferred way to get imap emails in the mutt inbox.
>
> I've been using mutt with Gmail for 10-15 years, and I just point mutt
> at Gmail's IMAP server and leave all of the email on that server.
> [That sounds like what you have now.]
>
> > [...]
>
> > I tried to configure mutt with imap settings. It is functionally
> > working fine but each email is separately downloaded when I open it.
>
> Yep, that's how IMAP works.  I guess I'm lucky that my network
> connection is fast enough that it doesn't bother me.
>
> > I have configured cache so it doesn't happen everytime with the same
> > email. My 2nd question is - is there a way to pre-fetch all the
> > emails in inbox.
>
> I don't think so -- not without using something like offline-imap.
>
> --
> Grant
>
>
>
>
>

-- 



Re: Preferred way to get imap emails

2019-07-27 Thread Grant Edwards
On 2019-07-27, Pankaj Jangid  wrote:

> I have very recently switched back to mutt. My 1st question is - is
> the preferred way to get imap emails in the mutt inbox.

I've been using mutt with Gmail for 10-15 years, and I just point mutt
at Gmail's IMAP server and leave all of the email on that server.
[That sounds like what you have now.]

> [...]

> I tried to configure mutt with imap settings. It is functionally
> working fine but each email is separately downloaded when I open it.

Yep, that's how IMAP works.  I guess I'm lucky that my network
connection is fast enough that it doesn't bother me.

> I have configured cache so it doesn't happen everytime with the same
> email. My 2nd question is - is there a way to pre-fetch all the
> emails in inbox.

I don't think so -- not without using something like offline-imap.

--
Grant






Re: Preferred way to get imap emails

2019-07-27 Thread Matthias Apitz
El día sábado, julio 27, 2019 a las 08:58:20p. m. +0530, Pankaj Jangid escribió:

> Hi,
> 
> I have very recently switched back to mutt. My 1st question is -
> is the preferred way to get imap emails in the mutt inbox. 12 years back
> I used to fetch everything using fetchmail, using POP3. But now I have a
> Gmail account and Gmail is mostly optimised for IMAP usage. IMAP works
> flawlessly on mobile also. Back then we used POP3 because internet
> bandwidth was a big issue.
> 
> I read about offlineimap. Tried to use it on my machine. But it stops
> fetching email when the system goes into sleep. Without restarting
> offlineimap service it doesn't work. And lately it has started giving
> errors also while fetching from Gmail.
> 
> I tried to configure mutt with imap settings. It is functionally working
> fine but each email is separately downloaded when I open it. I have
> configured cache so it doesn't happen everytime with the same email. My
> 2nd question is - is there a way to pre-fetch all the emails in inbox.

I always use fetchmail and pass the mails locally through
sendmail --> procmail --> SpamAssassin --> /var/mail/guru
   \-> /var/mail/spam
to get the SPAM filtered out and to get all my mails to my FreeBSD
laptop. I have *all* my mails since back to 1998 on my local storage.

matthias


-- 
Matthias Apitz, ✉ g...@unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
May, 9: Спаси́бо освободители! Thank you very much, Russian liberators!


Re: Preferred way to get imap emails

2019-07-27 Thread Patrick Shanahan
* Pankaj Jangid  [07-27-19 11:29]:
> Hi,
> 
> I have very recently switched back to mutt. My 1st question is -
> is the preferred way to get imap emails in the mutt inbox. 12 years back
> I used to fetch everything using fetchmail, using POP3. But now I have a
> Gmail account and Gmail is mostly optimised for IMAP usage. IMAP works
> flawlessly on mobile also. Back then we used POP3 because internet
> bandwidth was a big issue.
> 
> I read about offlineimap. Tried to use it on my machine. But it stops
> fetching email when the system goes into sleep. Without restarting
> offlineimap service it doesn't work. And lately it has started giving
> errors also while fetching from Gmail.
> 
> I tried to configure mutt with imap settings. It is functionally working
> fine but each email is separately downloaded when I open it. I have
> configured cache so it doesn't happen everytime with the same email. My
> 2nd question is - is there a way to pre-fetch all the emails in inbox.

I still use fetchmail and with imap accounts including google.  and have
no problem.

-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  @ptilopteri
http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri
Photos: http://wahoo.no-ip.org/piwigo   paka @ IRCnet freenode


Preferred way to get imap emails

2019-07-27 Thread Pankaj Jangid
Hi,

I have very recently switched back to mutt. My 1st question is -
is the preferred way to get imap emails in the mutt inbox. 12 years back
I used to fetch everything using fetchmail, using POP3. But now I have a
Gmail account and Gmail is mostly optimised for IMAP usage. IMAP works
flawlessly on mobile also. Back then we used POP3 because internet
bandwidth was a big issue.

I read about offlineimap. Tried to use it on my machine. But it stops
fetching email when the system goes into sleep. Without restarting
offlineimap service it doesn't work. And lately it has started giving
errors also while fetching from Gmail.

I tried to configure mutt with imap settings. It is functionally working
fine but each email is separately downloaded when I open it. I have
configured cache so it doesn't happen everytime with the same email. My
2nd question is - is there a way to pre-fetch all the emails in inbox.

-- 
Pankaj
Planet Earth. 

""
It's a lot of fun being alive ... I wonder if my bed is made?!?


signature.asc
Description: PGP signature