nmh-workers
[Top] [All Lists]

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

2009-08-18 12:14:06


In the message dated: Tue, 18 Aug 2009 10:45:50 CDT,
The pithy ruminations from rader(_at_)hep(_dot_)wisc(_dot_)edu on 
<Re: [Nmh-workers] preventing change of current folder with rcvstore? > were:
=> 
=> I think you have a weird rcvstore?!  Mine doesn't change the
=> default folder.


Hmmmm......

        /usr/libexec/nmh/rcvstore
        rcvstore -- nmh-1.3 [compiled on x86-4 at Thu Jun 19 13:40:10 EDT 2008]


Hmmm.....

        [bergman(_at_)mirchi .procmail]$ folder +junk
        junk+ has 3 messages  (1-3);        (others).
        [bergman(_at_)mirchi .procmail]$ echo hello | /usr/libexec/nmh/rcvstore 
+inbox
        [bergman(_at_)mirchi .procmail]$ folder
        junk+ has 3 messages  (1-3);        (others).
        [bergman(_at_)mirchi .procmail]$ echo hello | procmail
        [bergman(_at_)mirchi .procmail]$ folder
        junk+ has 3 messages  (1-3);        (others).
        [bergman(_at_)mirchi .procmail]$ 


You're absolutely correct.

[Scratches head]

So, what's causing the default folder to change? I assumed that it was 
rcvstore, as called by procmail, but that's clearly not the case.

Thanks,

Mark


=> 
=> [avoiding work]  
=> 
=> steve
=> --
=> 
=> bash$ folders | grep +
=> inbox+           has   19 messages  ( 1-  20); cur= 17.
=> bash$ echo hallo | /usr/local/lib/rcvstore +junk
=> you have new mail
=> bash$ folders | grep +
=> inbox+           has   19 messages  ( 1-  20); cur= 17.
=> bash$ scan +junk | tail -1
=> scan: eof encountered in field "hallo"
=> ??Format error (message 124) in component 1
=>  124  Tue 08/18* To:                 | 
=> 
=> 
=>  > ---- Original Message ----
=>  > From: bergman(_at_)merctech(_dot_)com
=>  > 
=>  > 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 conditio
=> n.
=>  > 
=>  > 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
=>  > 
=> 





_______________________________________________
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>