Xref: utzoo comp.unix.xenix:6923 comp.unix.wizards:17427 comp.mail.misc:2250 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!ateng!chip From: chip@ateng.com (Chip Salzenberg) Newsgroups: comp.unix.xenix,comp.unix.wizards,comp.mail.misc Subject: Re: Mail questions Message-ID: <24D49B39.2434@ateng.com> Date: 31 Jul 89 18:32:25 GMT References: <11116@ibmpcug.UUCP> Organization: A T Engineering, Tampa, FL Lines: 56 [Followups to comp.mail.misc] According to jamesf@ibmpcug.UUCP (James Fielding): >Does anyone know how to set up SCO Xenix so that any incoming >UUCP/Usenet mail which is not addressed properly and gets bounced, is >also copied to the uucp account mail box on my system. You can probably do this with Deliver, which is typically used as a back end for Smail. (You recompile Smail to run /usr/bin/deliver for local mail.) With Deliver, you write a "system delivery file" -- a shell script -- to control where mail goes. But of course, since it's a shell script, you can do other things besides control the delivery process. Since Smail does the aliasing, any names handed to deliver should be valid user names from /etc/passwd. So, then, here is a sample delivery file that sends a list of invalid addresses, along with the message itself, to "uucp": : deliver.sys # Collect invalid addresses invalid= for u do if grep "^${u}:" /etc/passwd >/dev/null then : no problem else invalid="$invalid $u" fi echo $u done # Note: if any invalid addresses are found, deliver will exit(1), # causing Smail to bounce the message. # Our only job here is to send the administrator some hate mail. if [ "$invalid" ] then ( echo "Mail was sent to the following invalid address(es):" echo " $invalid" echo "The mail has been bounced. Here is a copy of it." echo "===================================================" cat $HEADER $BODY ) | mail -s 'Boing' uucp fi Of course, further elaboration is possible. Also, be sure that "uucp" is a valid address, or you'll have an infinite mail loop. -- You may redistribute this article only to those who may freely do likewise. Chip Salzenberg | or A T Engineering | Me? Speak for my company? Surely you jest!