procmail
[Top] [All Lists]

Re: MH - 2 folders at once?

1996-11-01 07:55:47
Malcolm Jackson <cczmjj(_at_)unix(_dot_)ccc(_dot_)nottingham(_dot_)ac(_dot_)uk> 
writes:
All I'd like to do, is have a mail message dropped into two folders.

Here is my original recipe:

:0:$M/ixin/.lock
* ^Sender.*owner-ixion
| /usr/local/lib/mh/rcvstore +ixin

 I tried:

:0:$M/ixin/.lock
* ^Sender.*owner-ixion
| /usr/local/lib/mh/rcvstore +ixin/. +dtp/.

but my log file says:

procmail: Executing "/usr/local/lib/mh/rcvstore,+ixin/.,+myix/."
rcvstore: only one folder at a time!

Well, the easiest way is to not use rcvstore:


# I find "Return-Path:" to be preferable to "Sender:" or "From:", as it
# contains the envelope sender which tends to be more reliable for matching.
:0
* ^Return-Path:.*owner-ixion@
$HOME/Mail/ixin/. $HOME/Mail/dtp/.


This has three advantages:
1) It uses links, not copies
2) It doesn't needs locks
3) It's built into procmail and is thus much faster

On the otherhand, it doesn't support the Unseen-Sequence: stuff that
rcvstore does.  But think about it: mh doesn't do any locking of the
.mh_sequences file.  If you do a show while rcvstore is running, you
won't lose any mail, but your any sequences you have may be lost.  The
only ways to fix this are by either wrapping show in a shell script
that locks the folder, or by hacking the source to show directly.
While there's been talk of the latter in the past, no one has devoted
the time necessary to do it.  The former choice is probably
unacceptable given that show may be left running for minutes (or
days!).  Stopping delivery for as long as you're reading a message may
not be acceptable.

If you _really_ want the unseen sequence, you'll have to either
a) call rcvstore multiple times, and end up with multiple copies; or
b) add to the unseen sequences yourself by calling mark multiple times.

Ick.

Philip Guenther

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