Plan 9 from Bell Labs’s /usr/web/sources/plan9/sys/src/cmd/upas/misc/gone.fishing

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc
# gone.fishing local!$user /mail/box/$user/mbox - vacation responder
#	as pipeto script

# standard library.  saves the message on standard input in $TMP.msg and
# parses it into /mail/fs/mbox/1.
. /mail/lib/pipeto.lib $*

{cat $TMP.msg; echo} >>/mail/box/$USER/gone.mail

message=/mail/box/$USER/gone.msg
if (! test -e $message)
	message=/mail/lib/gone.msg

MAILTO=`{cat $D/replyto}
grep '^'$"MAILTO'$' /mail/box/$USER/gone.addrs >/dev/null >[2=1] || {
	echo $MAILTO >>/mail/box/$USER/gone.addrs
	mail $MAILTO <$message
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.