nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'all' folder msgs from last 3 weeks; of symlinks?


From: Bakul Shah
Subject: Re: 'all' folder msgs from last 3 weeks; of symlinks?
Date: Tue, 20 Sep 2022 13:28:22 -0700

On Sep 20, 2022, at 1:14 PM, Bakul Shah <bakul@iitbombay.org> wrote:
> 
> On Sep 20, 2022, at 8:18 AM, Tom R <nmh@trodman.com> wrote:
>> 
>> I would be ok with symlinks or hardlinks; but symlinks are better since I 
>> could
>> quickly find which folder the msg first landed in.
> 
> You can use a sequence to keep track of which folder a message came
> from. Then you just have to run a function like
> 
> msg2seq() { grep "\<$1\>" .mh_sequences|sed 's/:.*//'}
> 
> to reverse map a msg to the sequence(s) it is part of. One benefit
> is MH will maintain them properly as you rmm, sortm old messages etc.

Forgot to add: if you remove a message from a source folder,
your all folder will have a dangling symlink. This can be a
pro or a con depending on your PoV! Similarly if you move
messages around in the source folder, the symlinks will point
to the wrong messages.

Another way they help is you can define sequences day1..day31.
Then from cron you just have to delete today's sequence instead of
blowing everything away!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]