elizagamedev / mujmap

Bridge for synchronizing email and tags between JMAP and notmuch
GNU General Public License v3.0
63 stars 11 forks source link

Can we ignore certain tags for syncing? #50

Open duckwork opened 1 year ago

duckwork commented 1 year ago

My notmuch database pulls email from my personal (via mujmap) as well as two work accounts (via lieer). When I try to sync changes with mujmap, it tries to create tags related to work on my Fastmail account and fails.

While debugging while it fails would be useful (I can paste a trace with -vvv if needed), ideally I wouldn't be syncing those tags to Fastmail at all. What do you think about adding a configuration option to ignore certain tags from sync altogether?

If this feature already exists or is possible another way, I do apologize for the duplicate issue!

duckwork commented 1 year ago

Actually the problem might be in applying the changes to the notmuch database. I'm honestly not sure how to proceed here, but it could be something with my notmuch config. I'll keep this issue open until i figure it out if I can :)

elizagamedev commented 1 year ago

I think I see what's happening here. mujmap unconditionally creates mailboxes for the set of all tags that exist in its database, period, regardless of whether or any mail entries it owns contains them. There are two ways to approach this that jump out to me.

  1. The most correct way--only create tags for mail that mujmap owns. For large databases, this might impact performance, but I'm not sure by how much. It could be an optionally-enabled feature.
  2. As you suggested, add an option to just ignore certain tags altogether. This is probably a useful option regardless of whether 1 is implemented or not.

Since the second option is easier, I might do that one first, and then go back to 1 and implement that as well. Thank you for the issue report :)

duckwork commented 1 year ago

Awesome, thank you so much!