unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Mail files seem to be duplicated
@ 2018-02-16  8:20 Edgar Hipp
  2018-02-21 11:46 ` David Bremner
  0 siblings, 1 reply; 2+ messages in thread
From: Edgar Hipp @ 2018-02-16  8:20 UTC (permalink / raw)
  To: notmuch

Hello,

I am using neomutt + offlineimap + notmuch to handle my email, but it
seems that I have a recurring issue since over a year.

The issue is that when I archive or move email, sometimes (50%
approximately), the file is still in the directory it was in at the
beginning, for example, if I want to move a file to the Archives folder,
it is still in the INBOX directory and seems to be duplicated.

I have bound `S` to archive my email with the following binding : 

```
macro index S "<enter-command>unset resolve<enter><clear-flag>N<enter-command>set resolve<enter><save-message>~/mail/bqk/Archives.2017<enter>"
```

I then hit `$` to sync my mailbox : 

```
macro index $ \
"\
<sync-mailbox>\
<enter>\
"
```

After quitting neomutt, `notmuch new` is automatically called.

However, quite often, when I enter neomutt again on the virtual mail box
bqk : I still see the message in my inbox that I have previously "Archived".

```
virtual-mailboxes "bqk" "notmuch://?query=path:bqk/** and folder:bqk/INBOX"
```

If I search for an email that had this issue : 

```
notmuch show --body=false --format=json 'subject:My custom subject'  | jq .
```

I see following result : 

```
[
  [
    [
      {
        "id": "20180209220332.1.E69088BD4579EA80@emails.acme.co",
        "match": true,
        "excluded": false,
        "filename": [
          "/home/edgar/mail/bqk/INBOX.archive/cur/1518766879_1.2307.acme,U=4151,FMD5=6ec33b7708e41596e6d4f5707101ac47:2,S",
          "/home/edgar/mail/bqk/INBOX.archive/cur/1518766962_1.2307.acme,U=4177,FMD5=6ec33b7708e41596e6d4f5707101ac47:2,S",
          "/home/edgar/mail/bqk/INBOX.archive/cur/1518766964_1.2307.acme,U=4181,FMD5=6ec33b7708e41596e6d4f5707101ac47:2,S",
          "/home/edgar/mail/bqk/INBOX.archive/cur/1518766965_1.2307.acme,U=4183,FMD5=6ec33b7708e41596e6d4f5707101ac47:2,S",
          "/home/edgar/mail/bqk/INBOX.archive/cur/1518766966_0.2307.acme,U=4184,FMD5=6ec33b7708e41596e6d4f5707101ac47:2,S",
          "/home/edgar/mail/bqk/INBOX.archive/cur/1518767387_0.2307.acme,U=4232,FMD5=6ec33b7708e41596e6d4f5707101ac47:2,S"
        ],
        "timestamp": 1518213812,
        "date_relative": "February 09",
        "tags": [
          "inbox"
        ],
        "headers": {
          "Subject": "My custom subject",
          "From": "John doe <no-reply@acme.co>",
          "To": "jane@acme.com",
          "Date": "Fri, 09 Feb 2018 22:03:32 +0000"
        }
      },
      []
    ]
  ]
]
```

In that case, I had to archive the email 6 times until it was really
archived.

As you can see, the email has multiple "filenames". However, they all
are exactly the same (They have the exact same content, I checked with
md5sum).

I also have a running offlineimap that checks email every minute and
calls notmuch afterwards.

My idea is that in some cases, neomutt and notmuch are in a situation
where the file is copied by neomutt to its new location (in the archive
folder), but still present in the inbox directory.

Does notmuch ever write to files ?

Thanks in advance,

Edgar

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

* Re: Mail files seem to be duplicated
  2018-02-16  8:20 Mail files seem to be duplicated Edgar Hipp
@ 2018-02-21 11:46 ` David Bremner
  0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2018-02-21 11:46 UTC (permalink / raw)
  To: Edgar Hipp, notmuch

Edgar Hipp <edgar@bqk.fr> writes:

>         "filename": [
>           "/home/edgar/mail/bqk/INBOX.archive/cur/1518766879_1.2307.acme,U=4151,FMD5=6ec33b7708e41596e6d4f5707101ac47:2,S",
>           "/home/edgar/mail/bqk/INBOX.archive/cur/1518766962_1.2307.acme,U=4177,FMD5=6ec33b7708e41596e6d4f5707101ac47:2,S",
>           "/home/edgar/mail/bqk/INBOX.archive/cur/1518766964_1.2307.acme,U=4181,FMD5=6ec33b7708e41596e6d4f5707101ac47:2,S",
>           "/home/edgar/mail/bqk/INBOX.archive/cur/1518766965_1.2307.acme,U=4183,FMD5=6ec33b7708e41596e6d4f5707101ac47:2,S",
>           "/home/edgar/mail/bqk/INBOX.archive/cur/1518766966_0.2307.acme,U=4184,FMD5=6ec33b7708e41596e6d4f5707101ac47:2,S",
>           "/home/edgar/mail/bqk/INBOX.archive/cur/1518767387_0.2307.acme,U=4232,FMD5=6ec33b7708e41596e6d4f5707101ac47:2,S"
>         ],

Notmuch only renames files to change their mailder flags (after the last
':') so it's hard to see how notmuch would have done this. Other than
that (and notmuch insert, which you'd know if you were using), notmuch
doesn't write or rename files. You can test by running

% notmuch config set maildir.synchronize_flags false

Then notmuch won't rename files at all.

d

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

end of thread, other threads:[~2018-02-21 11:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-16  8:20 Mail files seem to be duplicated Edgar Hipp
2018-02-21 11:46 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).