Open digitalsignalperson opened 11 months ago
I think this should be configurable. You have to look in the notmuch api for how to add and remove the file from the message, or possibly even remove and re-add the message to the database. The database should be consistent after a gmi run.
I'm trying this out for my setup: https://github.com/digitalsignalperson/lieer/commit/ce3922fc04094d90459e851959241e724ae25540
When the gmail recycling bin is cleared,
gmi pull
will move the deleted files from{account}/mail/cur/{filename}
to{account}/deleted/cur/{filename}
, which is outside of what is detected by lieer, but still kept in the notmuch database, and with an additionaldeleted
tag. Anotmuch new
is still required after pull for notmuch to give something likeNo new mail. Detected 2 file renames.
, otherwise the nextgmi push
will complain withremote: could not find remote message:
for these moved files. I couldn't figure out if there is an equivalent tonotmuch new
with the python bindings, or if there is another method in the python api to change a file's path.This is a little different from
--no-remove-local-messages
, because I actually want to keep everything in sync with remote, but want insurance against accidental deletions or messages going poof on gmail side somehow. So this acts as an archive or recycling bin of sorts that I can either ignore, or go review and clear out periodically.Let me know if some form of this would be suitable for a PR or have any thoughts