gauteh / lieer

Fast email-fetching and sending and two-way tag synchronization between notmuch and GMail
http://lieer.gaute.vetsj.com
Other
494 stars 60 forks source link

Not custom indexing headers in Notmuch #238

Closed shajra closed 1 year ago

shajra commented 1 year ago

I think I have Lieer set up enough that I can use it. Now I'm just trying to polish the rough edges. I'm really happy this project exists.

Here's my ~/.config/notmuch/default/config:

[database]
path=/home/myuser/var/mail

[index]
header.List=List-Id
header.SneakAddr=X-Sneakemail-Address
header.SneakFrom=X-Sneakemail-From

[maildir]
synchronize_flags=true

[new]
ignore=/.*[.](json|lock|bak)$/
tags=new

[search]
exclude_tags=deleted;spam

The relevant part to this issue is the [index] stanza, which lists a few custom headers to index beyond the standard set. I use these emails rather regularly for a lot of my email. Unfortunately, these headers don't seem to be indexed when calling gmi sync.

It seems like the only way I can get my custom headers to index is by calling something like notmuch reindex tag:new. After that, I need to call notmuch new after that so that my post-new hook can work against my custom indexed headers.

To complete the picture, here's my .gmaileer.json file:

{
  "account": "me",
  "drop_non_existing_label": false,
  "file_extension": "",
  "ignore_empty_history": false,
  "ignore_remote_labels": [
    "CATEGORY_FORUMS",
    "CATEGORY_PROMOTIONS",
    "CATEGORY_UPDATES",
    "CATEGORY_SOCIAL",
    "CATEGORY_PERSONAL"
  ],
  "ignore_tags": [
    "new"
  ],
  "local_trash_tag": "trash",
  "remove_local_messages": true,
  "replace_slash_with_dot": false,
  "timeout": 600
}

Does my usage of Lieer seem right? Is this issue just a missing feature? Or should I try configuring things differently?

shajra commented 1 year ago

Maybe this ticket can be closed... I noticed that Nixpkgs was holding be back to the previous release of 1.3, and 1.4 has been recently released.

I upgraded to 1.4, and now I don't have to do the explicit notmuch reindex. The reindex seems to be taken care of as part of the addition of the mail into the Notmuch database.

I do still have to do a notmuch new after the gmi sync to get my personal tagging on the mail. Is that normal operation with Lieer? Or should I expect my post-new hook to be triggered by gmi sync? If not, then definitely feel free to close this ticket.

gauteh commented 1 year ago

Nice, must have been fixed by the newer notmuch bindings. You need to call your post-new hooks manually or do whatever you do there in the same place where you call gmi sync.