Subject: Leading From line

From: Vinod Peris <[email-masked]>
Date: Fri, 07 Apr 1995 10:06:21 -0400

I seem to have trouble with the leading From line. First I could not
get the procmail -f - to work satisfactorily. It adds a line of the
following form
      >From sender  Fri Apr  7 09:42:14 1995
which comes in the message body of the mail, when I use mh to read it.
I did make root the owner of procmail. I am using AIX v3.

I do not really care about generating the leading From line in my
mail, so I took the -f - switch out, however the mail that is
automatically filed in MH folders still has the
		  From ....
leading line in it. Is there some way around this ?

Thanks.

--Vinod

---

From: Vinod Peris <[email-masked]>
Date: Fri, 07 Apr 1995 15:33:24 -0400

>>>>> "VP" == Vinod Peris <[email-masked]> writes:

    VP> I do not really care about generating the leading From line in
    VP> my mail, so I took the -f - switch out, however the mail that
    VP> is automatically filed in MH folders still has the From ....
    VP> leading line in it. Is there some way around this ?

I found  a solution to this problem by using formail as a filter
in my .procmailrc.  Here is a sample recipe that takes the mail coming
from this mailing-list and automatically files in an mh-folder called
procmail, after deleting the initial "From postmaster...." line that
MH does not like.

		  :0
		  * (^To|^Cc:.*)[email-masked]
		  | formail -I"From " | /usr/lib/mh/rcvstore +procmail

I would like to know if there is a better way to do this. Also what is
the lockfile that is used now? I recall reading that there is no need
for lockfiles when storing in directories, but how is procmail to know
that I am actually storing the mail in a directory.

Any comments will be appreciated.

Thanks,

--Vinod

---

From: [email-masked] (David W. Tamkin)
Date: Sat, 8 Apr 1995 18:37:13 -0500 (CDT)

Vinod Peris asked,

| 		  :0
| 		  * (^To|^Cc:.*)[email-masked]
| 		  | formail -I"From " | /usr/lib/mh/rcvstore +procmail
| 
| I would like to know if there is a better way to do this. Also what is
| the lockfile that is used now? I recall reading that there is no need
| for lockfiles when storing in directories, but how is procmail to know
| that I am actually storing the mail in a directory.

There is no lockfile used there; none is requested (no second colon on
the flag line).

Procmail doesn't know that it's storing to a directory, only that it is
piping to one program that will pipe to another, so it calls $SHELL to
handle the action line.  rcvstore should know that the destination is a 
directory by simply statting it or some similar process.

Where you read that no local lockfiles are needed when procmail stores mail
to a directory, that was for the case when procmail does the filing itself
and the destination name already exists, like this:

   :0
   * condition
   directoryname

Procmail checks to see whether that name is a file or a directory and
proceeds accordingly.  None of that comes into play here, though.  Procmail
sees a SHELLMETA (the second pipe character) on the action line and just
feeds the letter to

   $SHELL -c 'formail -I"From " | /usr/lib/mh/rcvstore +procmail'

and lets formail and rcvstore worry about doing their jobs.

---

From: Vinod Peris <[email-masked]>
Date: Mon, 10 Apr 1995 17:10:00 -0400

I am using rcvstore to file messages in MH folders, since I
want to filter out the "From " line in the beginning before filing
the message in the folder.

I notice that procmail is a rather small binary
(84K on my system), of around the same size as rcvstore. Since
procmail does many more things than rcvstore, which basically only
creates a unique file to hold the mail in an MH folder, I was wondering if
procmail internally calls rcvstore to file mail in MH folders or
whether rcvstore is just plain inefficient?

Any comments or alternative solutions are welcome.

Thanks,

--Vinod