-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moving mails tagged as deleted #309
Comments
Can you describe in more detail what you expect to happen and what in fact does happen when you move your (per tag) deleted mail with afew and sync it with mbsync? |
Hey, notmuch search --output=files --format=text0 --limit=1 date:..1Y and not tag:unread and not tag:inbox and not tag:to-me and not tag:flagged and not tag:replied | xargs -0 rm |
@GuillaumeSeren sure, that's how you delete locally in a notmuch set-up. Alternatively, have "afew" move those files to a folder where the server deletes them after some time. I understood @vikasrawal 's question differently, as if afew's move would clear a trash flag or such. notmuch syncs some maildir flags with tags but explicitely excludes the trash flag. mbsync syncs the flags, but the exact handling depends on a couple of mbsync config choices. |
is it possible that you forgot the "rename" option to the move plugin? |
Is it even possible to move all mail tagged "deleted" to a Trash folder? As I understand from the docs, you would need to setup a rule for every single maildir.. I happen to have 1000+ maildirs, so that is kind of unusable ;) |
Hello, In afew, you can tag / move mails (see https://afew.readthedocs.io/en/latest/move_mode.html?highlight=mailmover#configuration-section), So here to propagate a mail deletion, you just delete the file and then sync again (mbsync). |
Yes, that's when you delete them locally using notmuch/xarg/rm. An alternative would be moving them to a trash/30dtrash folder and let the imap server do the purging. And this is where @ecocode 's question comes in: Is it possible to move all mail tagged But I think for this and similar purposes it would be beneficial to have a "slow/manual" mode of the mover, something like:
which moves all mail matching |
Michael J Gruber ***@***.***> writes:
But I think for this and similar purposes it would be beneficial to have a "slow/manual" mode of the mover, something like:
```
afew -M <folder> <query>
```
which moves all mail matching `<query>` to `<folder>`. afew has all the logic already (searching, file renaming, moving). This mode can be slow depending on the scope of the query but would cover the mentioned use case as well as all cases where you do a one-off reorganisation of your local mail store (to be synced up in a follow-up step).
that would be exactly what I'd need ;)
for now I wrote a (quick & dirty) fish script handling this
best
--
erik colson
|
Hey,
Yes but that would be a nice optimisation of the move filter. if you consider a small config like: MyMail/INBOX = 'tag:spam':MyMail/spam 'tag:sent':MyMail/sent 'not tag:inbox':MyMail/archive 'tag:trash':MyMail/trash
MyMail/archive = 'tag:inbox':MyMail/INBOX 'tag:spam':MyMail/spam 'tag:sent':MyMail/sent 'tag:trash':MyMail/trash
MyMail/spam = 'NOT tag:spam':MyMail/INBOX 'tag:sent':MyMail/sent 'tag:trash':MyMail/trash
MyMail/sent = 'NOT tag:sent':MyMail/INBOX 'tag:spam':MyMail/spam 'tag:trash':MyMail/trash
MyMail/trash = 'tag:inbox':MyMail/INBOX 'tag:spam and not tag:trash':MyMail/spam 'tag:sent and not tag:trash':MyMail/sent Would become MyMail/* = 'tag:spam':MyMail/spam 'tag:sent':MyMail/sent 'not tag:inbox':MyMail/archive 'tag:trash':MyMail/trash
MyMail/archive = 'tag:inbox':MyMail/INBOX
MyMail/spam = 'NOT tag:spam':MyMail/INBOX
MyMail/sent = 'NOT tag:sent':MyMail/INBOX
MyMail/trash = 'tag:spam and not tag:trash':MyMail/spam 'tag:sent and not tag:trash':MyMail/sent |
I use mbsync to sync emails, and afew is used to move mails tagged as "deleted" to the Trash folders. But this seems to create the problem that mbsync does not correctly identify mails and propagate mail deletion.
Is this a known problem? Should I not use afew to deal with deleted mails?
The text was updated successfully, but these errors were encountered: