Malcolm Jackson | 1 Nov 12:38 1996
Picon
Picon

MH - 2 folders at once?


 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!

  So how do I do it? Any help appreciated.

  Regards,

     Mal.
malcolm.jackson <at> nottingham.ac.uk

Rune Mossige | 1 Nov 14:45 1996

Re: Expiring users, how to do that?

Alan,
This seems to be almost exactly what I have been looking for.

But, there is just one small thing I would have liked to add:

I want mail to non-existent, or deleted, or removed, users to also be
forwarded to this user's manager, to prevent important e-mail to be
missed. Is that easy to add?

------------------------------------------------------------
Rune Mossige, Systems Support		Tel : +47 515 98 922
Western Geophysical, Stavanger, Norway	Fax : +47 515 98 999
Rune.Mossige <at> norway.waii.com		Priv: +47 514 24 771
                                      Mobile: +47 908 71 024

On Thu, 31 Oct 1996, Alan K. Stebbens wrote:

> > I'd like to implement a softer way of deleting users. Previously, I just
> > removed their account as soon as they left, causing all mail to them to
> > bounce.
> 
> It is better to have the departing users provide you with a forwarding
> address.  This behaviour is analogous to how "snail" mail operates: when
> you move, you must provide the Post Office with a new address, or you
> lose your mail (actually, the new occupants get it).
> 
> I have a forwarding recipe file that I've been developing, and which is
> not completely tested; if you wish to try it out, and fix any bugs, it
> would be great.
> 
(Continue reading)

Philip Guenther | 1 Nov 15:53 1996
Picon

Re: MH - 2 folders at once?

Malcolm Jackson <cczmjj <at> unix.ccc.nottingham.ac.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 <at> 
$HOME/Mail/ixin/. $HOME/Mail/dtp/.

This has three advantages:
1) It uses links, not copies
(Continue reading)

Alan K. Stebbens | 1 Nov 19:53 1996
Picon

Re: MH - 2 folders at once?

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

That's correct.  rcvstore stores a message into *a* folder.  Also,
rcvstore, being an MH command uses MH folder syntax "+FOLDER", and
doesn't use procmail syntax for an MH folder "FOLDER/."  In your recipe
above, you are mixing the syntaxes.

>   So how do I do it? Any help appreciated.

Well, you can do it the procmail way, or the MH way.  Procmail can file
a message into multiple folders at the same time, using hard-links to
keep storage usage down. 

(Continue reading)

David W. Tamkin | 1 Nov 23:23 1996
Picon

Re: MH - 2 folders at once?

Alan Stebbens suggested the following to Malcolm Jackson:

| With MH, you must file a message into a folder, and then refile it to
| the other folders.   Here's an example:
| 
|     PATH=$PATH:/usr/local/lib/mh
| 
|     :0:$M/ixin.lock
|     * ^Sender:.*owner-ixion
|     | rcvstore +ixin ; refile last -link -src +ixin +dtp
| 
| This method is not bullet-proof however.  There is a small window of
| time during which the state of the +ixin folder could change causing the
| meaning of "last" to not be the most recently arrived message.  It is a
| small window of time, but computers are amazingly fast and quick to make
| the most of even a small opportunity :^).

Now, I know nothing about MH, so this is an honest (if naive) question:

Would a `w' or `W' flag (so that procmail would hold onto the local lockfile
until the shell that runs rcvstore and refile exits) take care of the race
condition risk?  Or what about this so that both MH directories get locks?

  :0
  * ^Sender:.*owner-ixion
  {
   LOCKFILE=$M/dtp.lock

    :0W:$M/ixin.lock
    | rcvstore +ixin ; refile last -link -src +ixin +dtp
(Continue reading)

Alan K. Stebbens | 2 Nov 00:13 1996
Picon

Re: MH - 2 folders at once?

    > Alan Stebbens suggested the following to Malcolm Jackson:
    > 
    > | With MH, you must file a message into a folder, and then refile it to
    > | the other folders.   Here's an example:
    > | 
    > |     PATH=$PATH:/usr/local/lib/mh
    > | 
    > |     :0:$M/ixin.lock
    > |     * ^Sender:.*owner-ixion
    > |     | rcvstore +ixin ; refile last -link -src +ixin +dtp
    > | 
    > | This method is not bullet-proof however.  There is a small window of
    > | time during which the state of the +ixin folder could change causing the
    > | meaning of "last" to not be the most recently arrived message.  It is a
    > | small window of time, but computers are amazingly fast and quick to make
    > | the most of even a small opportunity :^).
    > 
    > Now, I know nothing about MH, so this is an honest (if naive) question:
    > 
    > Would a `w' or `W' flag (so that procmail would hold onto the local lockfile
    > until the shell that runs rcvstore and refile exits) take care of the race
    > condition risk?  Or what about this so that both MH directories get locks?

The race condition exists between the "rcvstore" command and the
"refile" command on the command line.  And, it is not a race condition
between multiple instantiations of procmail; rather, it is a condition
between the human and the computer.  While the computer is observing the
locking protocols, the human does not.

Look at the time line below:
(Continue reading)

Karl Simanonok | 2 Nov 00:33 1996
Picon
Picon

NETSCAPE MAIL SERVER

Hello,

My ISP runs Netscape's Mail Server, version 1.1, which apparently does not
use .forward files for forwarding.  Can anyone tell me how to install
Procmail without a .forward file under Netscape?

Regards,

Karl S.

Alan K. Stebbens | 2 Nov 00:36 1996
Picon

Re: Altering the Subject?

    > Why did this fail with the extranious flags message?
    > :0 fw
    > * ! ^Subject: *\[$list\] *
    > * ! ^Subject: *re: *
    > {
    > 	SUBJ=`formail -zx Subject:`   # extract the subject
    > 	:0
    > 	| formail -I "Subject: [$list] $SUBJ"
    > }

Jason,

1. The 'f' flag is only useful on a filtering *action* recipe, not a
   nested block recipe.

2. When you use a variable in a condition, you must prefix the condition
   with a '$' flag:

    * $! ^Subject: $some-variable

   will work, but

    * ! ^Subject: $some-variable

   will not.

3. The second condition is not necessary.  If you wish to match a
   subject which is tagged, and which is not a reply, use this
   condition:

(Continue reading)

Matthew N. Reichman | 2 Nov 01:28 1996
X-Face
Picon

Simple question: How does one set up an 'or' recipe?

Attachment: text/enriched, 737 bytes
Alan K. Stebbens | 2 Nov 01:56 1996
Picon

Re: Altering the Subject?

    > Actually, I got the (|) sequence to work, but never worked was having
    > the block after the initial filter
    > 
    > The verbose log looks like this on a failure
    > procmail: Assigning "SUBJ=Fri Nov  1 16:23:31 PST 1996"
    > procmail: Match on ! "^Subject: *\[testing\]"
    > procmail: Match on ! "^Subject: *re:"
    > procmail: Executing " formail -I "Subject: [$list] $SUBJ""
    > procmail: [15442] Fri Nov  1 16:23:35 1996
    > procmail: Assigning "LASTFOLDER= formail -I "Subject: [$list] $SUBJ""
    >  Subject: Fri Nov  1 16:23:31 PST 1996
    >   Folder:  formail -I "Subject: [$list] $SUBJ"				    394
    > 
    > SUBJ=`formail -zx Subject:`   # extract the subject
    > :0 w
    > * $! ^Subject: (Re:|*\[$list\])
    > {
    > 	:0 w
    > 	| formail -I "Subject: [$list] $SUBJ"
    > }

Jason,

This recipe is wrong: 

1. the '*' is misplaced; it should be after the blank following the
   colon, meaning "an arbitrary number of blanks".  I'm sorry if I had
   originally typed it this way.

2. the flags on the second recipe should be "fhW", where "fh" means
   "filter the headers", and "W" means wait for a successful result.

Also, If you have procmail 3.10 or 3.11, you can combine the subject
extraction by using the match pattern "\/" and then the MATCH variable
like this:

    :0 fhW
    * $!^Subject: *(Re:|\[$list\])
    * ^Subject: *\/[^ ].*
    | formail -I"Subject: [$list] $MATCH"

I hope this helps.
___________________________________________________________
Alan Stebbens <aks <at> sgi.com>      http://reality.sgi.com/aks


Gmane