Path: utzoo!attcan!uunet!crdgw1!rpi!zaphod.mps.ohio-state.edu!usc!apple!olivea!tymix!cirrusl!sunfire!dhesi From: dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) Newsgroups: comp.mail.mh Subject: Re: MH Blues Message-ID: <2617@cirrusl.UUCP> Date: 27 Oct 90 00:42:19 GMT References: <4R4%S-_@rpi.edu> <1990Oct25.195248.8697@hayes.ims.alaska.edu> Sender: news@cirrusl.UUCP Lines: 39 The question is: How do you make mhook/slocal put certain messages into your system mailbox in standard BSD/UNIX format? My solution has been to (a) figure out how local mailbox delivery is done on your system and (b) invoke that mechanism. When your mail router wants to put a message into your physical mailbox, it does so through some mechanism that does file locking. If your system uses sendmail, the local mailer delivery program invoked is probably /bin/mail or /bin/lmail or some such thing. Just invoke this program from your .maildelivery file. The last few lines in my .maildelivery file are: default - | ? "/usr/bin/mail -d dhesi" default - | ? "/cirrus/lib/mh/lib/rcvstore +inbox -create" First I try to deliver mail into my maildrop. If by chance that fails (e.g. /usr/spool/mail is full or missing or something), I also try just storing it in my inbox. By looking at the sendmail.cf provided by Sun, I figured out that the undocumented -d switch to /usr/bin/mail causes it to deliver mail into the user's mailbox. There must be a similar mechanism on your system. Just find it and use it. Oh, one other thing: My incoming mail is filtered through a script that deletes the first line (which is the From_ line) before feeding it to slocal. This script invokes slocal like this: sed 1d < $TMP | $SLOCAL -user dhesi || sed 1d < $TMP | /usr/bin/mail -d dhesi The || is there in case the pipe to slocal fails for some reason. In that case we do a direct delivery to my mailbox, so I don't lose or bounce mail just because slocal happened to be missing or didn't execute correctly. (Our slocal dumps core on very long headers.) -- Rahul Dhesi UUCP: oliveb!cirrusl!dhesi A pointer is not an address. It is a way of finding an address. -- me