Re: proposing "notmuch purge"

Subject: Re: proposing "notmuch purge"

Date: Wed, 15 Jan 2020 07:36:03 +0200

To: Jameson Graef Rollins, Daniel Kahn Gillmor, Notmuch Mail

Cc: Antoine Beaupré

From: Teemu Likonen

Jameson Graef Rollins [2020-01-14T11:55:36-08] wrote:

> Honestly I don't see the point of any user configuration here.  Seems
> likely to only add confusion and possibly improperly deleted messages,
> which would be very bad.
> Just use the "deleted" tag only.  It's already being used in multiple
> place to mean that the message should be deleted.

That is indeed simple. Here is just one more point of view for deleting.

I like "trashcan with expiry time": I manually mark some messages
"deleted" which make them disappear because "deleted" messages are
excluded from searches. The messages are really deleted when they are
older than 30 days.

So I tend to prefer user's own search terms in "notmuch purge". My purge
command would be something like this:

    notmuch purge --no-db-update \
        "(" tag:deleted OR tag:spam ")" AND date:..30days

In my system that kind of operation runs automatically in pre-new hook.
Then new messages are fetched from server and the database is updated.

If "deleted" is hard-coded tag name for unconditional purging operation
the trashcan functionality can be built with some other tag like

///  OpenPGP key: 4E1055DC84E9DFF613D78557719D69D324539450
signature.asc (application/pgp-signature)
notmuch mailing list