afewmail / afew

an initial tagging script for notmuch mail
ISC License
325 stars 98 forks source link

MailMover - new feature min_age #269

Closed c-alpha closed 4 years ago

c-alpha commented 4 years ago

It would be great if if there were a min_age switch to the MailMover.

My use case is that I'd like to keep recent things on the IMAP server (I'm using mbsync), so current information is still available on my smartphone and other devices, and only move things to the "big storage" on my laptop after it's - say - a week or two old.

GuillaumeSeren commented 4 years ago

Hey @c-alpha , hum I think the easy way is passing a notmuch query to afew.

The harder way, is to expose a new user parameter for the mailmover, that would require implementing a new test for this usage, but there already, a test for the mailmover, so nothing completely new, just check the max_age param.

ryantate commented 4 years ago

Guillaume Seren notifications@github.com writes:

Hey @c-alpha , hum I think the easy way is passing a notmuch query to afew.

Indeed, I keep recent things on the imap server like so:

[MailMover]

(...snip...)

account-imap/INBOX = 'date:..100days':account-archive/INBOX

account-imap/Sent = 'date:..100days':account-archive/Sent

...etc

c-alpha commented 4 years ago

Ah, the query, of course. Too obvious to see for me apparently!

In that light... the max_age parameter would seem somewhat superfluous, too? But I guess it's just history.

GuillaumeSeren commented 4 years ago

Hey,

In that light... the max_age parameter would seem somewhat superfluous, too? But I guess it's just history.

Maybe, but the way I see it is more a security / protective option, then if the user want they can override this (I think most do).

You also have the issue with the server over quota, if you move too much mail at once, which can lock you out from sync for a while.