Comments (9)
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?
from afew.
Hey,
what I do is a custom query with xarg like this (probably stolen from arch wiki https://wiki.archlinux.org/title/Notmuch#Permanently_delete_emails)
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
from afew.
@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.
from afew.
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 it possible that you forgot the "rename" option to the move plugin?
from afew.
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 ;)
from afew.
Hello,
sorry for the delay.
In afew, you can tag / move mails (see https://afew.readthedocs.io/en/latest/move_mode.html?highlight=mailmover#configuration-section),
but afew does talk directly to the imap server this usually done with mbsync or other sync tool.
So here to propagate a mail deletion, you just delete the file and then sync again (mbsync).
from afew.
Hello, sorry for the delay.
In afew, you can tag / move mails (see https://afew.readthedocs.io/en/latest/move_mode.html?highlight=mailmover#configuration-section), but afew does talk directly to the imap server this usually done with mbsync or other sync tool.
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 trash
to a trash folder, using afew? And the answer is "no" (unless you set up config for all folders).
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).
from afew.
from afew.
Hey,
Is it possible to move all mail tagged trash to a trash folder, using afew? And the answer is "no" (unless you set up config for all folders).
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
from afew.
Related Issues (20)
- make afew idempotent HOT 1
- Filter mails from addresses in a list contained in a file? HOT 3
- Handling multiple matches in HeaderMatchingFilter HOT 3
- Maintaining a folder/tag parity HOT 3
- MailMover configuration accepts a regex folder, but fails silently HOT 4
- FolderTagSync, a simplified mechanism maintaining 1-1 coorespondence between maildir folders and tags. HOT 8
- kill filter could be optimized HOT 5
- Error run afew -tn HOT 1
- M$ Office365 spam filter HOT 1
- Multi-account MailMover HOT 2
- `python setup.py build_sphinx` is removed in the Sphinx 7 HOT 1
- Feature request: Remove all tags matching regex "list/.*" only when the tag "spam" is present
- Tagging by plus addressing
- error: unrecognized arguments: --learn HOT 1
- How about tagging a new release HOT 9
- Fix for installing on MacOS HOT 1
- CI pipeline only tests Python version 3.8 HOT 5
- Issue on python-3.12 with configparser removed from python HOT 4
- ListMailsFilter uses only the list-label HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from afew.