Xref: utzoo comp.sys.att:4458 comp.unix.questions:9711 Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!seismo!esosun!ucsdhub!cuuxun!cuuxb!mmengel From: mmengel@cuuxb.ATT.COM (Marc W. Mengel) Newsgroups: comp.sys.att,comp.unix.questions Subject: Re: changing mail directory Keywords: sysV Message-ID: <2126@cuuxb.ATT.COM> Date: 12 Oct 88 14:49:28 GMT Article-I.D.: cuuxb.2126 References: <286@mccc.UUCP> <390@westmark.UUCP> <305@mccc.UUCP> <1162@mrspoc.UUCP> <484@genesis.ATT.COM> Reply-To: mmengel@cuuxb.UUCP (Marc W. Mengel) Organization: AT&T-DSD, System Engineering for Resellers, Lisle IL Lines: 36 In article <484@genesis.ATT.COM> andys@shlepper.ATT.COM (a.b.sherman) writes: >In article <1162@mrspoc.UUCP> itkin@mrspoc (Steven M. List) writes: >>In article <305@mccc.UUCP> pjh@mccc.UUCP (Pete Holsberg) writes: >>> In article <390@westmark.UUCP> dave@westmark.UUCP (Dave Levenson) writes: >>> > You will probably need to re-compile rmail to accomplish what you >>> > want. >>> That'll be hard without source code! >>Not if you use smail. > >Ah, but what was the original question? How can one change the mailbox >directory from /usr/mail to /foo/bar? Smail does *NOT* handle local >mail delivery. Local mail delivery is passed to a program usually >called /bin/lmail. "What is /bin/lmail?" I hear you ask. >/bin/lmail is the original /bin/[r]mail that came with your system. >To change local delivery, you still need the source to the vanilla >/bin/mail that ships with your operating system. Well, actually, for local mail deleivery only you could just use the following script, made complicated only by the mail lock file. (You might want to modify it to forcibly remove the lock if it spins in the until loop enough times...) fromname=$LOGNAME maildir=/usr/mail for toname in $* do umask 222 until > ${maildir}/${toname}.lock do sleep 5 done umask 077 echo From ${fromname} `date` >> ${maildir}/${toname} sed -e 's/^From />&/' >> ${maildir}/${toname} rm -f ${maildir}/${toname}.lock done