[comp.mail.mh] Problems using slocal

bobd@bobd.hf.intel.com (Bob Dietrich) (04/09/91)

I recently brought up 6.7.1 on SysV 3.2.2 (386 cpu) and decided to be more
efficient by having slocal filter some of my mail as it arrived. However,
there seems to be a problem with appending mail to my default mailbox. It
appears that slocal locks the mailbox (/usr/mail/bobd in my case) when the
program starts, and when it then tries to append to this file, it fails
because the lock is set. This behavior occurs with and without LOCKF
versions of slocal and inc. And yes, inc and rcvstore are owned by group
"mail" and group SUID. Did I build MH wrong? Is my .maildelivery file
wrong? Any suggestions (other than using a second mailbox)? Thanks.

				Bob Dietrich
				Intel Corporation, Hillsboro, Oregon
				(503) 696-4270  (FAX: 696-4210)
		usenet:		bobd@bobd.intel.com
		  or		uunet!intelhf!ijf1!bobd
		  or		tektronix!ogccse!omepd!ijf1!bobd
		  or		tektronix!psu-cs!omepd!ijf1!bobd
==========================
Configuration:
version: MH 6.7.1 #4[UCI] (bobd) of Wed Mar 27 11:38:13 PST 1991
options: [SYS5] [SYS5DIR] [TYPESIG=void] [SHADOW] [SOCKETS] [BIND] [ATZ]
         [TZNAME] [MORE='"/usr/bin/more"'] [FOLDPROT='"0700"'] [DUMB]
         [MHRC] [WHATNOW] [NOMHSEQ] [MHE] [RPATHS] [SBACKUP='"#"']
         [SENDMTS] [SMTP] [SPRINTFTYPE=int]
==========================
My .maildelivery file:
Subject	Omega		pipe	A	"/usr/local/lib/mh/rcvstore +omega"
Subject	"Stock Prices"	pipe	A	"/usr/local/lib/mh/rcvstore +stock"
Subject	"Stock Prices"	pipe	A	"$HOME/bin/xshowstock"
default	-		file	?	/usr/mail/bobd
==========================
Test message (file testmail):
To: bobd@bobd
Subject: test mail for slocal
--------
foo bar.
==========================
Result of executing "cat testmail | /usr/local/lib/mh/slocal -verbose -debug":
temporary file "/tmp/slocala07250" selected
addr="bobd" user="bobd" info="" file="/tmp/slocala07250"
sender="L^A^D" mbox="/usr/mail/bobd" home="/usr2/bobd" from=""
ddate="Delivery-Date: Thu, 11 Apr 91 11:48:38 PDT
" now=11:48
vec[0]: "Subject"
vec[1]: "Omega"
vec[2]: "pipe"
vec[3]: "A"
vec[4]: "/usr/local/lib/mh/rcvstore +omega"
vars[3]: name="reply-to" value=""
hdrs[0]: name="source" value=""
hdrs[1]: name="addr" value="bobd"
hdrs[2]: name="Return-Path" value="L^A^D"
hdrs[3]: name="Reply-To" value="L^A^D"
hdrs[4]: name="From" value="L^A^D"
hdrs[5]: name="Sender" value="L^A^D"
hdrs[6]: name="To" value=" bobd@bobd
"
hdrs[7]: name="cc" value="L^A^D"
hdrs[8]: name="Resent-Reply-To" value="L^A^D"
hdrs[9]: name="Resent-From" value="L^A^D"
hdrs[10]: name="Resent-Sender" value="L^A^D"
hdrs[11]: name="Resent-To" value="L^A^D"
hdrs[12]: name="Resent-cc" value="L^A^D"
hdrs[13]: name="Subject" value=" test mail for slocal
"
vec[0]: "Subject"
vec[1]: "Stock Prices"
vec[2]: "pipe"
vec[3]: "A"
vec[4]: "/usr/local/lib/mh/rcvstore +stock"
vec[0]: "Subject"
vec[1]: "Stock Prices"
vec[2]: "pipe"
vec[3]: "A"
vec[4]: "$HOME/bin/xshowstock"
vec[0]: "default"
vec[1]: "-"
vec[2]: "file"
vec[3]: "?"
vec[4]: "/usr/mail/bobd"
	delivering to file "/usr/mail/bobd", unable to open:Error 0
(trying normal delivery)
	delivering to file "/usr/mail/bobd", unable to open:Error 0

truesdel@nas.nasa.gov (David A. Truesdell) (04/12/91)

bobd@bobd.hf.intel.com (Bob Dietrich) writes:

>I recently brought up 6.7.1 on SysV 3.2.2 (386 cpu) and decided to be more
>efficient by having slocal filter some of my mail as it arrived. However,
>there seems to be a problem with appending mail to my default mailbox. It
>appears that slocal locks the mailbox (/usr/mail/bobd in my case) when the
>program starts, and when it then tries to append to this file, it fails
>because the lock is set. This behavior occurs with and without LOCKF
>versions of slocal and inc. And yes, inc and rcvstore are owned by group
>"mail" and group SUID. Did I build MH wrong? Is my .maildelivery file
>wrong? Any suggestions (other than using a second mailbox)? Thanks.

Try simply letting the message "drop out" of the .maildelivery file.  It work's
fine for me.

I expect that slocal would give up any special permissions before attempting
to append to a file, or execute a user specified program.  If
/usr/mail/bobd is not writeable by bobd, it would explain your troubles.

--
T.T.F.N.,
dave truesdell (truesdel@nas.nasa.gov)

Ita erat quando hic adventi.