[Top][All Lists]

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

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

From: bergman
Subject: [Nmh-workers] preventing change of current folder with rcvstore?
Date: Tue, 18 Aug 2009 11:33:51 -0400

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 

        ( 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?



reply via email to

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