nmh-workers
[Top] [All Lists]

[Nmh-workers] preventing change of current folder with rcvstore?

2009-08-18 11:34:19

I use procmail to automatically file incoming mail into different folders, 
using rcvstore. This works very well, but rcvstore changes the default folder. 
This can cause problems, as the following scenario illustrates:

        [STEP1]         % scan +unimportant_folder
        [STEP2]         % show last
        [STEP3]         % rmm

The sequence of commands shown above looks normal, but if new mail happens to 
arrive between [STEP2] and [STEP3], and the procmail rule does something like:

        rcvstore +very_important_folder

the running the "rmm" command in [STEP3] has serious unintended consequences.

I think that there might be a way to create a procmail rule that is something 
like:

        ( folder -push +newfolder ; rcvstore ; folder -pop )

That will limit the potential for the folder change problem, but still leaves a 
race condition.

Is there a way to use rcvstore to refile messages to a specified folder without 
changing the default folder?

Thanks,

Mark




_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>