⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pipeto.sample

📁 这是一个同样来自贝尔实验室的和UNIX有着渊源的操作系统, 其简洁的设计和实现易于我们学习和理解
💻 SAMPLE
字号:
#!/bin/rc# create a /tmp for here documentsrfork enbind -c /mail/tmp /tmpKEY=whocaresUSER=kenRECIP=$1MBOX=$2PF=/mail/box/$USER/_patternTMP=/mail/tmp/mine.$pidBIN=/bin/upasD=/mail/fs/mbox/1# save and parse the mail file{sed '/^$/,$ s/^From / From /'; echo} > $TMPupas/fs -f $TMP# if we like the source# or if the subject contains a valid token# then deliver the mail and allow all the addressesif( $BIN/list check $PF $D/from $D/sender $D/replyto ){	$BIN/deliver $RECIP $D/from $MBOX < $D/raw	$BIN/list add $PF $D/from $D/to $D/cc $D/sender	rm $TMP	exit 0}switch($status){case *!match*	echo `{date} dropped $RECIP From `{cat $D/replyto} >> /mail/box/$USER/_bounced >[2] /dev/null	rm $TMP	exit 0}if ( $BIN/token $KEY $D/subject ){	$BIN/deliver $RECIP $D/from $MBOX < $D/raw	$BIN/list add $PF $D/from $D/to $D/cc $D/sender	rm $TMP	echo `{date} added $RECIP From `{cat $D/replyto} \		>> /mail/box/$USER/_bounced >[2] /dev/null	exit 0}# don't recognize the sender so# return the message with instructionsTOKEN=`{upas/token $KEY}upasname=/dev/null{{cat; cat $D/raw} | upas/send `{cat $D/replyto}}<<EOFSubject: $USER's mail filterI've been getting so much junk mail that I'm resorting toa draconian mechanism to avoid the mail.  In orderto make sure that there's a real person sending mail, I'masking you to explicitly enable access.  To do that, sendmail to $USER at this domain with the token:	$TOKENin the subject of your mail message.  After that, youshouldn't get any bounces from me.  Sorry if this isan inconvenience.----------------Original message----------------EOFecho `{date} bounced $RECIP From `{cat $D/replyto} \	>> /mail/box/$USER/_bounced >[2] /dev/nullrv=$statusrm $TMPexit $status

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -