Gnus development mailing list
 help / color / mirror / Atom feed
* notmuch is limited to a single local mail store, right?
@ 2016-01-15  2:36 myglc2
  2016-01-15  3:28 ` Eric Abrahamsen
  2016-01-15  5:30 ` notmuch is limited to a single local mail store, right? Adam Sjøgren
  0 siblings, 2 replies; 31+ messages in thread
From: myglc2 @ 2016-01-15  2:36 UTC (permalink / raw)
  To: ding

After more flailing than I care to admit I have notmuch working with
nnir so that I can do 'G G' on a maildir folder populated/syncronized
by, for example, mbsync. Pretty, pretty, pretty nice!

In the process of getting this working, I discovered that, to use
notmuch, you must first consolidate all your mail under a single
directory which also holds the '.nogmuch' index folder.

Why? Because (according to the notmuch man page) '.notmuch-config'
specifies a single 'database.path' to maildir (as opposed to a list of
paths) and 'nnir-notmuch-remove-prefix' is a global variable.

I found it confusing that gnus lets you have multiple maildir folders
fronted by multiple nnmaildir "servers" but nnir + notmuch can search
only one. Or, in other words, 'G G' will work on one maildir group but
fail on the others.

So, now I'm guessing, "I am probably the only one who thinks multiple
maildirs are cool."

Anyway, I can work with this but I would like to check, does my
understanding sound correct to others?

If so, Do you think the gnus doc should clarify the point, and,
where/how would I suggest such a change?

Many thanks, George




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

* Re: notmuch is limited to a single local mail store, right?
  2016-01-15  2:36 notmuch is limited to a single local mail store, right? myglc2
@ 2016-01-15  3:28 ` Eric Abrahamsen
  2016-01-15 12:46   ` myglc2
  2016-01-15  5:30 ` notmuch is limited to a single local mail store, right? Adam Sjøgren
  1 sibling, 1 reply; 31+ messages in thread
From: Eric Abrahamsen @ 2016-01-15  3:28 UTC (permalink / raw)
  To: ding

myglc2 <myglc2@gmail.com> writes:

> After more flailing than I care to admit I have notmuch working with
> nnir so that I can do 'G G' on a maildir folder populated/syncronized
> by, for example, mbsync. Pretty, pretty, pretty nice!
>
> In the process of getting this working, I discovered that, to use
> notmuch, you must first consolidate all your mail under a single
> directory which also holds the '.nogmuch' index folder.
>
> Why? Because (according to the notmuch man page) '.notmuch-config'
> specifies a single 'database.path' to maildir (as opposed to a list of
> paths) and 'nnir-notmuch-remove-prefix' is a global variable.

Actually you can set that variable on individual servers, so each server
removes its own prefix.

You still have the problem that notmuch only indexes from a single
parent directory down, though. Have you already collected all your
various maildir servers under one parent directory?

Of course, you'll probably still run into errors: searching on one
server will cause notmuch to return results from *all* servers, then the
server under point will try to remove its prefix from all the results,
and... I don't know what will happen then!

E




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

* Re: notmuch is limited to a single local mail store, right?
  2016-01-15  2:36 notmuch is limited to a single local mail store, right? myglc2
  2016-01-15  3:28 ` Eric Abrahamsen
@ 2016-01-15  5:30 ` Adam Sjøgren
  2016-01-15  7:49   ` Alan Schmitt
  2016-01-15 12:50   ` myglc2
  1 sibling, 2 replies; 31+ messages in thread
From: Adam Sjøgren @ 2016-01-15  5:30 UTC (permalink / raw)
  To: ding

myglc2 writes:

> I found it confusing that gnus lets you have multiple maildir folders
> fronted by multiple nnmaildir "servers" but nnir + notmuch can search
> only one.

Why? Gnus and notmuch are separate projects with different concepts and
ideas.

If you have separate servers, I guess you can have a separate notmuch
index per server?

I would think that you would lose the ability to search across the
servers/indexes, but maybe that is what you want, when you split them
up?


  Best regards,

    Adam

-- 
 "We get our thursdays from a banana."                        Adam Sjøgren
                                                         asjo@koldfront.dk




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

* Re: notmuch is limited to a single local mail store, right?
  2016-01-15  5:30 ` notmuch is limited to a single local mail store, right? Adam Sjøgren
@ 2016-01-15  7:49   ` Alan Schmitt
  2016-01-15  8:17     ` Adam Sjøgren
  2016-01-15 12:50   ` myglc2
  1 sibling, 1 reply; 31+ messages in thread
From: Alan Schmitt @ 2016-01-15  7:49 UTC (permalink / raw)
  To: ding

[-- Attachment #1: Type: text/plain, Size: 634 bytes --]

On 2016-01-15 06:30, asjo@koldfront.dk (Adam Sjøgren) writes:

> I would think that you would lose the ability to search across the
> servers/indexes, but maybe that is what you want, when you split them
> up?

You can still craft a nnir request that spans over several servers. Here
is what I do to search my two local dovecot servers:

(global-set-key
 (kbd "<apps> M")
 (lambda () (interactive)
   (gnus-group-make-nnir-group nil '((nnir-group-spec . (("nnimap:inria") ("nnimap:local")))))))

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO₂ (Updated January 13, 2016, Mauna Loa Obs.): 401.97 ppm

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

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

* Re: notmuch is limited to a single local mail store, right?
  2016-01-15  7:49   ` Alan Schmitt
@ 2016-01-15  8:17     ` Adam Sjøgren
  2016-01-15 13:03       ` myglc2
  0 siblings, 1 reply; 31+ messages in thread
From: Adam Sjøgren @ 2016-01-15  8:17 UTC (permalink / raw)
  To: ding

Alan writes:

> On 2016-01-15 06:30, asjo@koldfront.dk (Adam Sjøgren) writes:
>
>> I would think that you would lose the ability to search across the
>> servers/indexes, but maybe that is what you want, when you split them
>> up?

> You can still craft a nnir request that spans over several servers. Here
> is what I do to search my two local dovecot servers:

> (global-set-key
>  (kbd "<apps> M")
>  (lambda () (interactive)
>    (gnus-group-make-nnir-group nil '((nnir-group-spec . (("nnimap:inria") ("nnimap:local")))))))

Very cool! - Problem solved :-)


  /A

-- 
 "Fish swim, birds fly,                                       Adam Sjøgren
  daddy's yell, mama's cry                               asjo@koldfront.dk
  old men sit and think
  I drink"




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

* Re: notmuch is limited to a single local mail store, right?
  2016-01-15  3:28 ` Eric Abrahamsen
@ 2016-01-15 12:46   ` myglc2
  2016-01-15 13:12     ` Erik Colson
  0 siblings, 1 reply; 31+ messages in thread
From: myglc2 @ 2016-01-15 12:46 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> myglc2 <myglc2@gmail.com> writes:
>
>> After more flailing than I care to admit I have notmuch working with
>> nnir so that I can do 'G G' on a maildir folder populated/syncronized
>> by, for example, mbsync. Pretty, pretty, pretty nice!
>>
>> In the process of getting this working, I discovered that, to use
>> notmuch, you must first consolidate all your mail under a single
>> directory which also holds the '.nogmuch' index folder.
>>
>> Why? Because (according to the notmuch man page) '.notmuch-config'
>> specifies a single 'database.path' to maildir (as opposed to a list of
>> paths) and 'nnir-notmuch-remove-prefix' is a global variable.
>
> Actually you can set that variable on individual servers, so each server
> removes its own prefix.

Thanks, you are right. But as you point out below, it is possibly
delusional to do so.

> You still have the problem that notmuch only indexes from a single
> parent directory down, though. Have you already collected all your
> various maildir servers under one parent directory?

Not yet. I am checking my assumptions first. Didn't want to collect them
if I didn't have to.

> Of course, you'll probably still run into errors: searching on one
> server will cause notmuch to return results from *all* servers, then the
> server under point will try to remove its prefix from all the results,
> and... I don't know what will happen then!
>
> E
Right, this is the crux of the problem, and why it seems that, for
practical use, one would want to consolidate mail under a single folder.




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

* Re: notmuch is limited to a single local mail store, right?
  2016-01-15  5:30 ` notmuch is limited to a single local mail store, right? Adam Sjøgren
  2016-01-15  7:49   ` Alan Schmitt
@ 2016-01-15 12:50   ` myglc2
  2016-01-15 14:25     ` Peter Münster
                       ` (2 more replies)
  1 sibling, 3 replies; 31+ messages in thread
From: myglc2 @ 2016-01-15 12:50 UTC (permalink / raw)
  To: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> myglc2 writes:
>
>> I found it confusing that gnus lets you have multiple maildir folders
>> fronted by multiple nnmaildir "servers" but nnir + notmuch can search
>> only one.
>
> Why? Gnus and notmuch are separate projects with different concepts and
> ideas.

Right, of course.

> If you have separate servers, I guess you can have a separate notmuch
> index per server?

notmuch does not support making more than one index.

> I would think that you would lose the ability to search across the
> servers/indexes, but maybe that is what you want, when you split them
> up?

I was thinking I wanted to split them up for backup and other purposes.




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

* Re: notmuch is limited to a single local mail store, right?
  2016-01-15  8:17     ` Adam Sjøgren
@ 2016-01-15 13:03       ` myglc2
  2016-01-16  3:56         ` myglc2
  0 siblings, 1 reply; 31+ messages in thread
From: myglc2 @ 2016-01-15 13:03 UTC (permalink / raw)
  To: ding

asjo@koldfront.dk (Adam Sjøgren) writes:

> Alan writes:
>
>> On 2016-01-15 06:30, asjo@koldfront.dk (Adam Sjøgren) writes:
>>
>>> I would think that you would lose the ability to search across the
>>> servers/indexes, but maybe that is what you want, when you split them
>>> up?
>
>> You can still craft a nnir request that spans over several servers. Here
>> is what I do to search my two local dovecot servers:
>
>> (global-set-key
>>  (kbd "<apps> M")
>>  (lambda () (interactive)
>>    (gnus-group-make-nnir-group nil '((nnir-group-spec
>>  . (("nnimap:inria")
>>     ("nnimap:local")))))))

Thanks, but, practically speaking, this approach can not work with two
maildir stores and notmuch, because notmuch can only index one of them.

I guess it should work if a second search engine (e.g. namazu) is used
for the second maildir. This seems a bit silly to recommend. I will see
how it works if/when I get namazu working.




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

* Re: notmuch is limited to a single local mail store, right?
  2016-01-15 12:46   ` myglc2
@ 2016-01-15 13:12     ` Erik Colson
  2016-01-15 16:43       ` myglc2
  0 siblings, 1 reply; 31+ messages in thread
From: Erik Colson @ 2016-01-15 13:12 UTC (permalink / raw)
  To: myglc2; +Cc: ding

Hi..

I've followed this thread and although I can understand your technical
problem, I still am questioning myself about why 1 user would want two
or more separate Maildir structures on a single system ?

best
-- 
erik colson



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

* Re: notmuch is limited to a single local mail store, right?
  2016-01-15 12:50   ` myglc2
@ 2016-01-15 14:25     ` Peter Münster
  2016-01-15 19:19     ` Adam Sjøgren
  2016-01-15 20:21     ` Adam Sjøgren
  2 siblings, 0 replies; 31+ messages in thread
From: Peter Münster @ 2016-01-15 14:25 UTC (permalink / raw)
  To: ding

On Fri, Jan 15 2016, myglc2 wrote:

> notmuch does not support making more than one index.

What about:
NOTMUCH_CONFIG=here  notmuch
NOTMUCH_CONFIG=there notmuch
?

-- 
           Peter




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

* Re: notmuch is limited to a single local mail store, right?
  2016-01-15 13:12     ` Erik Colson
@ 2016-01-15 16:43       ` myglc2
  2016-02-06  0:06         ` gnus async prefetch and nnimap Erik Colson
  0 siblings, 1 reply; 31+ messages in thread
From: myglc2 @ 2016-01-15 16:43 UTC (permalink / raw)
  To: ding

Erik Colson <eco@ecocode.net> writes:

> I've followed this thread and although I can understand your technical
> problem, I still am questioning myself about why 1 user would want two
> or more separate Maildir structures on a single system ?

Hi Erik,

Thanks for the question. I want to sync multiple email accounts into
local stores. I was thinking each local store would be a "virtual
server" in *Server*.

Since I have multiple accounts with different modes of use, I imagine
the benefits of this scheme would be to allow different and independent
ways of syncing, storing, backing up, indexing and searching the local
stores.

Are there downsides to this approach (other than that notmuch doesn't
support it) that I am missing?

Or are there benefits to putting them all in one maildir that I am
missing?

Thanks - George





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

* Re: notmuch is limited to a single local mail store, right?
  2016-01-15 12:50   ` myglc2
  2016-01-15 14:25     ` Peter Münster
@ 2016-01-15 19:19     ` Adam Sjøgren
  2016-01-15 20:21     ` Adam Sjøgren
  2 siblings, 0 replies; 31+ messages in thread
From: Adam Sjøgren @ 2016-01-15 19:19 UTC (permalink / raw)
  To: ding

myglc2 writes:

>> If you have separate servers, I guess you can have a separate notmuch
>> index per server?

> notmuch does not support making more than one index.

Uhm, you don't have to tell one notmuch instance about the other?

Just run notmuch once against one "server" (using one configuration),
and then run it against the other "server" (using a second
configuration).

The two notmuch indexes won't know about eachother, of course, but
nothing stops you from doing this - just use the --config=FILE command
line option.

>> I would think that you would lose the ability to search across the
>> servers/indexes, but maybe that is what you want, when you split them
>> up?

> I was thinking I wanted to split them up for backup and other purposes.

That makes sense - I was trying to ask you about when you search for
something, do you want to search only within a single "server"?

If so, having a notmuch index for each "server" will not be a problem.
If you want to search across "servers", you'll need something like what
Alan Schmitt wrote.


  Best regards,

    Adam

-- 
 "Sleepwalking!" "Nightmare!"                                 Adam Sjøgren
 "Homocidal psycho jungle cat!"                          asjo@koldfront.dk




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

* Re: notmuch is limited to a single local mail store, right?
  2016-01-15 12:50   ` myglc2
  2016-01-15 14:25     ` Peter Münster
  2016-01-15 19:19     ` Adam Sjøgren
@ 2016-01-15 20:21     ` Adam Sjøgren
  2016-01-16  3:47       ` myglc2
  2 siblings, 1 reply; 31+ messages in thread
From: Adam Sjøgren @ 2016-01-15 20:21 UTC (permalink / raw)
  To: ding

myglc2 writes:

>> If you have separate servers, I guess you can have a separate notmuch
>> index per server?

> notmuch does not support making more than one index.

I think you are overinterpreting in this statement.

>> I would think that you would lose the ability to search across the
>> servers/indexes, but maybe that is what you want, when you split them
>> up?

> I was thinking I wanted to split them up for backup and other purposes.

Makes sense to me :-)


  Best regards,

    Adam

-- 
 "I think geniuses should be given special                    Adam Sjøgren
  considerations."                                       asjo@koldfront.dk




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

* Re: notmuch is limited to a single local mail store, right?
  2016-01-15 20:21     ` Adam Sjøgren
@ 2016-01-16  3:47       ` myglc2
  0 siblings, 0 replies; 31+ messages in thread
From: myglc2 @ 2016-01-16  3:47 UTC (permalink / raw)
  To: ding

Peter Münster <pmlists@free.fr> writes:

> On Fri, Jan 15 2016, myglc2 wrote:
>
>> notmuch does not support making more than one index.
>
> What about:
> NOTMUCH_CONFIG=here  notmuch
> NOTMUCH_CONFIG=there notmuch
> ?

asjo@koldfront.dk (Adam Sjøgren) writes:

> On Fri, Jan 15 2016, myglc2 wrote:
>
>> notmuch does not support making more than one index.
>
> I think you are overinterpreting in this statement.

OOPS! Hey, many thanks for straightening me out on this.

So... I tried passing notmuch config in as a switch like so ...

;; notmuch on 2nd test maildir folder
  (add-to-list 'gnus-secondary-select-methods
	       '(nnmaildir "foobar.2"
			   (directory "~/Maildir/foobar.2")
			   (nnir-search-engine notmuch)
			   (nnir-notmuch-remove-prefix
			    "/home/glc/Maildir/foobar.2/")
			   (nnir-notmuch-additional-switches
			    '("--config=/home/glc/.notmuch-config.2")
			    )
			   )
	       )

... and discovered two issues. When I followed the help setting the
switches ...

  ;; nnir-notmuch-additional-switches is a variable defined in ‘nnir.el’.
  ;; Its value is nil
  ;;
  ;; Documentation:
  ;; *A list of strings, to be given as additional arguments to notmuch.
  ;;
  ;; Note that this should be a list.  I.e., do NOT use the following:
  ;;     (setq nnir-notmuch-additional-switches "-i -w") ; wrong
  ;; Instead, use this:
  ;;     (setq nnir-notmuch-additional-switches '("-i" "-w"))

... there was a spurious 'quote( )' passed to notmuch. So ... I removed
the leading quote, and the argument list shown in the message buffer
looked better. So maybe the help should be changed to read ...

  ;; Instead, use this:
  ;;     (setq nnir-notmuch-additional-switches ("-i" "-w"))

However, The order in which the additional switches are passed ...


notmuch args: search --format=text --output=files --config=/home/glc/.notmuch-config.2 olivia
Massaging notmuch output...done
Search produced empty results.

... and as constructed by this nnir.el code ...

      (let* ((cp-list `( ,nnir-notmuch-program
                         nil            ; input from /dev/null
                         t              ; output
                         nil            ; don't redisplay
                         "search"
                         "--format=text"
                         "--output=files"
                         ,@(nnir-read-server-parm 'nnir-notmuch-additional-switches server)
                         ,qstring       ; the query, in notmuch format
                         ))

... made notmuch unhappy. So I 'fixed' nnir-run-notmuch by changing the
order ...

      (let* ((cp-list `( ,nnir-notmuch-program
                         nil            ; input from /dev/null
                         t              ; output
                         nil            ; don't redisplay
                         ,@(nnir-read-server-parm 'nnir-notmuch-additional-switches server)
                         "search"
                         "--format=text"
                         "--output=files"
                         ,qstring       ; the query, in notmuch format
                         ))

... which made notmuch happy ...

notmuch args: --config=/home/glc/.notmuch-config.2 search --format=text
--output=files olivia Massaging notmuch output...done

So... Bottom line, a gnus config like this ...

;; notmuch on 2nd test maildir folder
  (add-to-list 'gnus-secondary-select-methods
	       '(nnmaildir "foobar.2"
			   (directory "~/Maildir/foobar.2")
			   (nnir-search-engine notmuch)
			   (nnir-notmuch-program "notmuch")
			   (nnir-notmuch-remove-prefix
			    "/home/glc/Maildir/foobar.2/")
			   (nnir-notmuch-additional-switches
			    ("--config=/home/glc/.notmuch-config.2")
			    )
			   )
	       )

... with the minor change to nnir.el shown above, allows multiple
notmuch indexes.

BTW, I also tried the 'NOTMUCH_CONFIG=here notmuch' scheme suggested by
Peter hoping it might not require any code changes. I tried this ...

  ;; notmuch on 3rdd test maildir folder
  (add-to-list 'gnus-secondary-select-methods
  	       '(nnmaildir "foobar.3"
  			   (directory "~/Maildir/foobar.3")
  			   (nnir-search-engine notmuch)
			   ;; Note: this fails because 'call-process'
			   ;; punts on the environmental var
  			   (nnir-notmuch-program
			    "NOTMUCH_CONFIG=${HOME}/.notmuch-config.3 notmuch")
  			   (nnir-notmuch-remove-prefix
  			    "/home/glc/Maildir/foobar.3/")
  			   )
  	       )

But I discovered that a global value of nnir-notmuch-program is used by
nnir-run-notmuch. I did a little hack to pick up the server-specific
value like so ...

      (let* ((cp-list `(,(nnir-read-server-parm 'nnir-notmuch-program server)
                         nil            ; input from /dev/null
                         t              ; output
                         nil            ; don't redisplay
                         ,@(nnir-read-server-parm 'nnir-notmuch-additional-switches server)
                         "search"
                         "--format=text"
                         "--output=files"
                         ,qstring       ; the query, in notmuch format
                         ))

... but then ...

                (apply 'call-process cp-list))))

... produced this error ...

c-append-to-state-cache: Searching for program: No such file or
directory, NOTMUCH_CONFIG=${HOME}/.notmuch-config.3 notmuch

So... how do one pass an environmental from an init file into a process?

Many thanks, - George




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

* Re: notmuch is limited to a single local mail store, right?
  2016-01-15 13:03       ` myglc2
@ 2016-01-16  3:56         ` myglc2
  0 siblings, 0 replies; 31+ messages in thread
From: myglc2 @ 2016-01-16  3:56 UTC (permalink / raw)
  To: ding

myglc2 <myglc2@gmail.com> writes:

> asjo@koldfront.dk (Adam Sjøgren) writes:
>
>> Alan writes:
>>
>>> On 2016-01-15 06:30, asjo@koldfront.dk (Adam Sjøgren) writes:
>>>
>>>> I would think that you would lose the ability to search across the
>>>> servers/indexes, but maybe that is what you want, when you split them
>>>> up?
>>
>>> You can still craft a nnir request that spans over several servers. Here
>>> is what I do to search my two local dovecot servers:
>>
>>> (global-set-key
>>>  (kbd "<apps> M")
>>>  (lambda () (interactive)
>>>    (gnus-group-make-nnir-group nil '((nnir-group-spec
>>>  . (("nnimap:inria")
>>>     ("nnimap:local")))))))
>
> Thanks, but, practically speaking, this approach can not work with two
> maildir stores and notmuch, because notmuch can only index one of them.

With helpful guidance from others, I have discovered that this statement
is fundamentally wrong. Sorry.

Notmuch can actually handle multiple stores, and, with a minor patch to
nnir.el, described in a separate post, your approach can be applied to
multiple maildir stores indexed by notmuch.




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

* gnus async prefetch and nnimap
  2016-01-15 16:43       ` myglc2
@ 2016-02-06  0:06         ` Erik Colson
  2016-02-06  1:13           ` Eric Abrahamsen
  0 siblings, 1 reply; 31+ messages in thread
From: Erik Colson @ 2016-02-06  0:06 UTC (permalink / raw)
  To: ding

Hi,

I was playing with asynch prefetch and got it to work for nntp
newsgroups. However it doesn't seem to work on nnimap groups. Any reason
for this ? Or am I missing something ?

best
-- 
erik colson



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

* Re: gnus async prefetch and nnimap
  2016-02-06  0:06         ` gnus async prefetch and nnimap Erik Colson
@ 2016-02-06  1:13           ` Eric Abrahamsen
  2016-02-06  1:15             ` Eric Abrahamsen
  0 siblings, 1 reply; 31+ messages in thread
From: Eric Abrahamsen @ 2016-02-06  1:13 UTC (permalink / raw)
  To: ding

Erik Colson <eco@ecocode.net> writes:

> Hi,
>
> I was playing with asynch prefetch and got it to work for nntp
> newsgroups. However it doesn't seem to work on nnimap groups. Any reason
> for this ? Or am I missing something ?

Asynchronicity isn't enabled for nnimap -- I don't know if that's just
because no one went and enabled it, or if there's some fundamental
reason it won't work with IMAP. If you're adventurous, I suppose you
could add:

(deffoo nntp-asynchronous-p ()
  t)

To nnimap.el, and recompile/reload/restart, and see what happens. It
would make me nervous!

Eric




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

* Re: gnus async prefetch and nnimap
  2016-02-06  1:13           ` Eric Abrahamsen
@ 2016-02-06  1:15             ` Eric Abrahamsen
  2016-08-01 21:29               ` IMAP changes timestamp when moving an article to another group Erik Colson
  0 siblings, 1 reply; 31+ messages in thread
From: Eric Abrahamsen @ 2016-02-06  1:15 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Erik Colson <eco@ecocode.net> writes:
>
>> Hi,
>>
>> I was playing with asynch prefetch and got it to work for nntp
>> newsgroups. However it doesn't seem to work on nnimap groups. Any reason
>> for this ? Or am I missing something ?
>
> Asynchronicity isn't enabled for nnimap -- I don't know if that's just
> because no one went and enabled it, or if there's some fundamental
> reason it won't work with IMAP. If you're adventurous, I suppose you
> could add:
>
> (deffoo nntp-asynchronous-p ()
>   t)

Bah, should have been nnimap-asynchronous-p, of course.




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

* IMAP changes timestamp when moving an article to another group
  2016-02-06  1:15             ` Eric Abrahamsen
@ 2016-08-01 21:29               ` Erik Colson
  2016-08-01 23:49                 ` Greg Troxel
  0 siblings, 1 reply; 31+ messages in thread
From: Erik Colson @ 2016-08-01 21:29 UTC (permalink / raw)
  To: ding

Hello,

When I use gnus-summary-move-article [Bm] to move an article into
another group on a dovecot imap server, the timestamp in other clients
gets changed to actual date/time. The header of the article still
represents the correct timestamp though (and so does gnus). But the
timestamp is faulty when accessing the group through Mail.app on my Mac.

Is this dovecot related ? or can I configure gnus somehow to not change
the timestamp ? For info, when moving mail between groups from within
Mail.app everything is handled correctly (also in gnus).

Thanks for help !
-- 
erik colson



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

* Re: IMAP changes timestamp when moving an article to another group
  2016-08-01 21:29               ` IMAP changes timestamp when moving an article to another group Erik Colson
@ 2016-08-01 23:49                 ` Greg Troxel
  2016-08-05 19:21                   ` Steinar Bang
  0 siblings, 1 reply; 31+ messages in thread
From: Greg Troxel @ 2016-08-01 23:49 UTC (permalink / raw)
  To: Erik Colson; +Cc: ding

[-- Attachment #1: Type: text/plain, Size: 1364 bytes --]


Erik Colson <eco@ecocode.net> writes:

> When I use gnus-summary-move-article [Bm] to move an article into
> another group on a dovecot imap server, the timestamp in other clients
> gets changed to actual date/time. The header of the article still
> represents the correct timestamp though (and so does gnus). But the
> timestamp is faulty when accessing the group through Mail.app on my Mac.

I have noticed this as well, but I was never clear on whether the
received date was wrong or if it was just that clients other than gnus
were sorting on the wrong date.

This seems to be the IMAP received tiemstamp:

http://serverfault.com/questions/588618/maintain-email-timestamp-when-transferring-between-email-servers-using-an-email

http://www.dovecot.org/list/dovecot/2008-July/032165.html


> Is this dovecot related ? or can I configure gnus somehow to not change
> the timestamp ? For info, when moving mail between groups from within
> Mail.app everything is handled correctly (also in gnus).

As I understand it from the dovecot mail message above, gnus should
probably use APPEND when moving and set the date to match the source
message.

Another view is that the current behavior is right because the message's
received date is the time it was copied into the account.

But, I think preserving the received date on copy is probably more
useful overall.




[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 180 bytes --]

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

* Re: IMAP changes timestamp when moving an article to another group
  2016-08-01 23:49                 ` Greg Troxel
@ 2016-08-05 19:21                   ` Steinar Bang
  2016-08-16 13:22                     ` Erik Colson
  0 siblings, 1 reply; 31+ messages in thread
From: Steinar Bang @ 2016-08-05 19:21 UTC (permalink / raw)
  To: ding

>>>>> Greg Troxel <gdt@lexort.com>:

> But, I think preserving the received date on copy is probably more
> useful overall.

Agreed.  

Or actually, I would say it even stronger: preserving the received date
on copy is the only correct behaviour.




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

* Re: IMAP changes timestamp when moving an article to another group
  2016-08-05 19:21                   ` Steinar Bang
@ 2016-08-16 13:22                     ` Erik Colson
  2017-09-05 16:14                       ` Steinar Bang
  0 siblings, 1 reply; 31+ messages in thread
From: Erik Colson @ 2016-08-16 13:22 UTC (permalink / raw)
  To: ding

Steinar Bang <sb@dod.no> writes:

>>>>>> Greg Troxel <gdt@lexort.com>:
>
>> But, I think preserving the received date on copy is probably more
>> useful overall.
>
> Agreed.  
>
> Or actually, I would say it even stronger: preserving the received date
> on copy is the only correct behaviour.

Hello.

This would indeed solve my problem.
How can I file this as a feature request ?

best
-- 
erik colson



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

* Re: IMAP changes timestamp when moving an article to another group
  2016-08-16 13:22                     ` Erik Colson
@ 2017-09-05 16:14                       ` Steinar Bang
  2017-09-09  7:47                         ` Steinar Bang
  0 siblings, 1 reply; 31+ messages in thread
From: Steinar Bang @ 2017-09-05 16:14 UTC (permalink / raw)
  To: ding

>>>>> On Tue, 16 Aug 2016 15:22:46 +0200, Erik Colson <eco@ecocode.net> said:
> Steinar Bang <sb@dod.no> writes:
>>>>>>> Greg Troxel <gdt@lexort.com>:

>>> But, I think preserving the received date on copy is probably more
>>> useful overall.

>> Agreed.  

>> Or actually, I would say it even stronger: preserving the received date
>> on copy is the only correct behaviour.

> This would indeed solve my problem.
> How can I file this as a feature request ?


Does anyone know what happened to this issue?

I haven't dared expire or move stuff in my nnimap folders for the last
year or so...




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

* Re: IMAP changes timestamp when moving an article to another group
  2017-09-05 16:14                       ` Steinar Bang
@ 2017-09-09  7:47                         ` Steinar Bang
  2017-09-09 15:12                           ` Eric Abrahamsen
  0 siblings, 1 reply; 31+ messages in thread
From: Steinar Bang @ 2017-09-09  7:47 UTC (permalink / raw)
  To: ding

>>>>> Steinar Bang <sb@dod.no>:


> Does anyone know what happened to this issue?

> I haven't dared expire or move stuff in my nnimap folders for the last
> year or so...

To summarize: When expiring, or moving with "B m" messages between
nnimap on a dovecot server, the date is displayed wrongly in other IMAP
clients.

The Date: header on the message itself is unchanged, but the
INTERNALDATE gets the time of the move/copy operation.

Dovecot allows the INTERNALDATE to be specified during a copy (see Timo
Siriainens last reply text in [1]), and the feature request is that nnimap
specifices the INTERNALDATE during a copy.

I've looked at the git log of nnimap.el and it doesn't look like
anything related to this has been done since august 2016[2].

In fact, these two changes from march 2016 may be the cause of the date
not being preserved on move/expiry, since Timo Siriainen seems to
indicate that dovecot by default preserves the INTERNALDATE in a MOVE
between folders on the same server (see Timo Siriainens first reply text
in [1]), from the git log of nnimap.el:

commit d5427e71da28856c5e43396a37ffd0c906947499
Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
Date:   Mon Mar 14 20:23:30 2016 +0100

    Disable MOVE more for Dovecot

    * lisp/gnus/nnimap.el (nnimap-process-expiry-targets): Also
    disable MOVE when expirying.
    (nnimap-split-incoming-mail): And when splitting mail.

commit 8ed27bdf88cab134c26f3609c4d11c574f74705c
Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
Date:   Mon Mar 14 20:21:02 2016 +0100

    Don't use MOVE on Dovecot

    * lisp/gnus/nnimap.el (nnimap-request-move-article): Don't use
    MOVE on Dovecot, since it's broken in many versions.
    (nnimap-quirks): Mark MOVE on Dovecot as non-working.


References:
[1] <https://www.dovecot.org/list/dovecot/2008-July/032170.html>
[2] <http://git.savannah.gnu.org/cgit/emacs.git/log/lisp/gnus/nnimap.el>





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

* Re: IMAP changes timestamp when moving an article to another group
  2017-09-09  7:47                         ` Steinar Bang
@ 2017-09-09 15:12                           ` Eric Abrahamsen
  2017-09-10 10:03                             ` Steinar Bang
  0 siblings, 1 reply; 31+ messages in thread
From: Eric Abrahamsen @ 2017-09-09 15:12 UTC (permalink / raw)
  To: ding

Steinar Bang <sb@dod.no> writes:

>>>>>> Steinar Bang <sb@dod.no>:
>
>
>> Does anyone know what happened to this issue?
>
>> I haven't dared expire or move stuff in my nnimap folders for the last
>> year or so...
>
> To summarize: When expiring, or moving with "B m" messages between
> nnimap on a dovecot server, the date is displayed wrongly in other IMAP
> clients.
>
> The Date: header on the message itself is unchanged, but the
> INTERNALDATE gets the time of the move/copy operation.
>
> Dovecot allows the INTERNALDATE to be specified during a copy (see Timo
> Siriainens last reply text in [1]), and the feature request is that nnimap
> specifices the INTERNALDATE during a copy.

I looked at the link, but I still don't really see where he's saying
that you can specify the INTERNALDATE. The IMAP specs certainly don't
indicate that any additional arguments are possible with a MOVE command.
You can specify a date with APPEND, but the only time Gnus uses that is
when replacing an article, not MOVEing (so far as I can tell)...




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

* Re: IMAP changes timestamp when moving an article to another group
  2017-09-09 15:12                           ` Eric Abrahamsen
@ 2017-09-10 10:03                             ` Steinar Bang
  2017-09-14 22:29                               ` Eric Abrahamsen
  0 siblings, 1 reply; 31+ messages in thread
From: Steinar Bang @ 2017-09-10 10:03 UTC (permalink / raw)
  To: ding

>>>>> Eric Abrahamsen <eric@ericabrahamsen.net>:

> I looked at the link, but I still don't really see where he's saying
> that you can specify the INTERNALDATE.

You're right.  I misread, he says that about the APPEND command.

> The IMAP specs certainly don't indicate that any additional arguments
> are possible with a MOVE command.

No, that was mbox-specific implementation on part of dovecot: if the
move command is used, the file is just moved from one directory to the
other (ie. on a GNU/linux filesystem: the inode is untouched) and mtime
is preserved, and therefore INTERNALDATE is preserved.

However in March 2016 in the git history of nnimap.el there were some
changes where Gnus stopped using MOVE on dovecot.

> You can specify a date with APPEND, but the only time Gnus uses that
> is when replacing an article, not MOVEing (so far as I can tell)...

Yes, I saw that when I was reading the specs of COPY yesterday (after I
had posted the message you're responding to).

However dovecot could (and really should) pick the date out of the Date
field of the source message when doing a COPY and use that as the mtime
of the new mbox file. 

Currently, I'm guessing, when dovecot w/mbox does a COPY, the mtime of
the message file in the mbox folder will become time the file was
created.




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

* Re: IMAP changes timestamp when moving an article to another group
  2017-09-10 10:03                             ` Steinar Bang
@ 2017-09-14 22:29                               ` Eric Abrahamsen
  2017-09-15 15:42                                 ` Steinar Bang
  0 siblings, 1 reply; 31+ messages in thread
From: Eric Abrahamsen @ 2017-09-14 22:29 UTC (permalink / raw)
  To: ding

Steinar Bang <sb@dod.no> writes:

>>>>>> Eric Abrahamsen <eric@ericabrahamsen.net>:
>
>> I looked at the link, but I still don't really see where he's saying
>> that you can specify the INTERNALDATE.
>
> You're right.  I misread, he says that about the APPEND command.
>
>> The IMAP specs certainly don't indicate that any additional arguments
>> are possible with a MOVE command.
>
> No, that was mbox-specific implementation on part of dovecot: if the
> move command is used, the file is just moved from one directory to the
> other (ie. on a GNU/linux filesystem: the inode is untouched) and mtime
> is preserved, and therefore INTERNALDATE is preserved.
>
> However in March 2016 in the git history of nnimap.el there were some
> changes where Gnus stopped using MOVE on dovecot.
>
>> You can specify a date with APPEND, but the only time Gnus uses that
>> is when replacing an article, not MOVEing (so far as I can tell)...
>
> Yes, I saw that when I was reading the specs of COPY yesterday (after I
> had posted the message you're responding to).
>
> However dovecot could (and really should) pick the date out of the Date
> field of the source message when doing a COPY and use that as the mtime
> of the new mbox file. 
>
> Currently, I'm guessing, when dovecot w/mbox does a COPY, the mtime of
> the message file in the mbox folder will become time the file was
> created.

Beats me, I guess... Is there a configuration knob you can twiddle in Dovecot?




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

* Re: IMAP changes timestamp when moving an article to another group
  2017-09-14 22:29                               ` Eric Abrahamsen
@ 2017-09-15 15:42                                 ` Steinar Bang
  2017-09-15 21:52                                   ` Eric Abrahamsen
  0 siblings, 1 reply; 31+ messages in thread
From: Steinar Bang @ 2017-09-15 15:42 UTC (permalink / raw)
  To: ding

>>>>> Eric Abrahamsen <eric@ericabrahamsen.net>:
> Steinar Bang <sb@dod.no> writes:

>> Currently, I'm guessing, when dovecot w/mbox does a COPY, the mtime
>> of the message file in the mbox folder will become time the file was
>> created.

Yes it will.  I just asked on the dovecot mailing list.

> Beats me, I guess... Is there a configuration knob you can twiddle in
> Dovecot?

I don't know. But I'm guessing that there isn't...?

And if there isn't, the only ways to preserve INTERNALDATE on folder
moves with nnimap in Gnus on dovecot with maildir, are:

 1. Go back to using MOVE for dovecot, ie. reverting the March 2016
    changes to Gnus:
     http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/gnus/nnimap.el?id=d5427e71da28856c5e43396a37ffd0c906947499
     http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/gnus/nnimap.el?id=8ed27bdf88cab134c26f3609c4d11c574f74705c

 2. Use APPEND instead of COPY so that INTERNALDATE can be specified 




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

* Re: IMAP changes timestamp when moving an article to another group
  2017-09-15 15:42                                 ` Steinar Bang
@ 2017-09-15 21:52                                   ` Eric Abrahamsen
  2018-04-11 20:25                                     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 31+ messages in thread
From: Eric Abrahamsen @ 2017-09-15 21:52 UTC (permalink / raw)
  To: ding

Steinar Bang <sb@dod.no> writes:

>>>>>> Eric Abrahamsen <eric@ericabrahamsen.net>:
>> Steinar Bang <sb@dod.no> writes:
>
>>> Currently, I'm guessing, when dovecot w/mbox does a COPY, the mtime
>>> of the message file in the mbox folder will become time the file was
>>> created.
>
> Yes it will.  I just asked on the dovecot mailing list.
>
>> Beats me, I guess... Is there a configuration knob you can twiddle in
>> Dovecot?
>
> I don't know. But I'm guessing that there isn't...?
>
> And if there isn't, the only ways to preserve INTERNALDATE on folder
> moves with nnimap in Gnus on dovecot with maildir, are:
>
>  1. Go back to using MOVE for dovecot, ie. reverting the March 2016
>     changes to Gnus:
>      http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/gnus/nnimap.el?id=d5427e71da28856c5e43396a37ffd0c906947499
>      http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/gnus/nnimap.el?id=8ed27bdf88cab134c26f3609c4d11c574f74705c
>
>  2. Use APPEND instead of COPY so that INTERNALDATE can be specified 

Hmm, the comments don't really say *what* brokenness the quirks were
meant to fix. I wouldn't feel confident at all in saying what the right
thing to do is. Maybe Lars will chime in...




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

* Re: IMAP changes timestamp when moving an article to another group
  2017-09-15 21:52                                   ` Eric Abrahamsen
@ 2018-04-11 20:25                                     ` Lars Ingebrigtsen
  2018-04-11 22:08                                       ` Eric Abrahamsen
  0 siblings, 1 reply; 31+ messages in thread
From: Lars Ingebrigtsen @ 2018-04-11 20:25 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Hmm, the comments don't really say *what* brokenness the quirks were
> meant to fix. I wouldn't feel confident at all in saying what the right
> thing to do is. Maybe Lars will chime in...

Uhm uhm uhm ding ding chime.  I seem to vaguely recall that a version of
Dovecot was completely 100% broken for MOVE, but I don't recall any
further details.  The person who wrote those checkin messages should get
their act together; geez.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



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

* Re: IMAP changes timestamp when moving an article to another group
  2018-04-11 20:25                                     ` Lars Ingebrigtsen
@ 2018-04-11 22:08                                       ` Eric Abrahamsen
  0 siblings, 0 replies; 31+ messages in thread
From: Eric Abrahamsen @ 2018-04-11 22:08 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: ding

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Hmm, the comments don't really say *what* brokenness the quirks were
>> meant to fix. I wouldn't feel confident at all in saying what the right
>> thing to do is. Maybe Lars will chime in...
>
> Uhm uhm uhm ding ding chime.  I seem to vaguely recall that a version of
> Dovecot was completely 100% broken for MOVE, but I don't recall any
> further details.  The person who wrote those checkin messages should get
> their act together; geez.

I guess at some point it would be nice to fine-tune behavior a little
more for the various servers (though you're not supposed to do that),
but it might wait until finer-grained overrides are possible.



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

end of thread, other threads:[~2018-04-11 22:08 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-15  2:36 notmuch is limited to a single local mail store, right? myglc2
2016-01-15  3:28 ` Eric Abrahamsen
2016-01-15 12:46   ` myglc2
2016-01-15 13:12     ` Erik Colson
2016-01-15 16:43       ` myglc2
2016-02-06  0:06         ` gnus async prefetch and nnimap Erik Colson
2016-02-06  1:13           ` Eric Abrahamsen
2016-02-06  1:15             ` Eric Abrahamsen
2016-08-01 21:29               ` IMAP changes timestamp when moving an article to another group Erik Colson
2016-08-01 23:49                 ` Greg Troxel
2016-08-05 19:21                   ` Steinar Bang
2016-08-16 13:22                     ` Erik Colson
2017-09-05 16:14                       ` Steinar Bang
2017-09-09  7:47                         ` Steinar Bang
2017-09-09 15:12                           ` Eric Abrahamsen
2017-09-10 10:03                             ` Steinar Bang
2017-09-14 22:29                               ` Eric Abrahamsen
2017-09-15 15:42                                 ` Steinar Bang
2017-09-15 21:52                                   ` Eric Abrahamsen
2018-04-11 20:25                                     ` Lars Ingebrigtsen
2018-04-11 22:08                                       ` Eric Abrahamsen
2016-01-15  5:30 ` notmuch is limited to a single local mail store, right? Adam Sjøgren
2016-01-15  7:49   ` Alan Schmitt
2016-01-15  8:17     ` Adam Sjøgren
2016-01-15 13:03       ` myglc2
2016-01-16  3:56         ` myglc2
2016-01-15 12:50   ` myglc2
2016-01-15 14:25     ` Peter Münster
2016-01-15 19:19     ` Adam Sjøgren
2016-01-15 20:21     ` Adam Sjøgren
2016-01-16  3:47       ` myglc2

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).