Open ploum opened 2 years ago
@ploum I believe you might need a few more steps. I solved this with Gmail by using the following approach:
-m
flag before running mbsync
afew
with the -m
flag again, and ideally, before that, tag all your emails again.See: https://github.com/benmezger/dotfiles/blob/main/dot_config/afew/config
Ideally, you need to filter for the folder instead. If the email is in the deleted folder, for example, remove all other tags and keep the +deleted flag.
Hey, sorry to be late.
I do the same, so yes it can be done, it is not synchronous so new mails are not tagged / sorted etc, but it is good to have the imap storage to be close that the notmuch state.
Before each sync I use the MailMover to move the according to some rules like:
# Perso
Perso/INBOX = 'tag:spam':Perso/spam 'tag:sent':Perso/sent 'not tag:inbox':Perso/archive 'tag:trash':Perso/trash
Perso/archive = 'tag:inbox':Perso/INBOX 'tag:spam':Perso/spam 'tag:sent':Perso/sent 'tag:trash':Perso/trash
Perso/spam = 'NOT tag:spam':Perso/INBOX 'tag:sent':Perso/sent 'tag:trash':Perso/trash
Perso/sent = 'NOT tag:sent':Perso/INBOX 'tag:spam':Perso/spam 'tag:trash':Perso/trash
Perso/trash = 'tag:inbox':Perso/INBOX 'tag:spam and not tag:trash':Perso/spam 'tag:sent and not tag:trash':Perso/sent
As I still also access mail through my webmail, I’m trying to configure notmuch/afew in order to maintain a tag/folder parity.
-> If a mail is moved in a folder on the webmail, it should have the old folder tag removed and a the new folder tag added in notmuch.
-> If a mail is taggued with "archive", it should be moved to the archive folder (yes, my folders are really simples : inbox, sent and archives).
I thought that, with afew, this would be quite easy to implement. But, after spending several days on it, I still don’t make a lot of progress. I’ve settled so far with only one FolderNameFilter to make debugging easy.
If a folder is seen as "inbox" by notmuch then archived on the webmail, it will keep its inbox tag forever. (same happen for any folder)
Is there a way to achieve that with afew?
I’ve the feeling that this might be a common usecase and thus should be advertised more clearly in the documentation