3 # create a /tmp for here documents
12 PF=/mail/box/$USER/_pattern
13 TMP=/mail/tmp/mine.$pid
17 # save and parse the mail file
18 {sed '/^$/,$ s/^From / From /'; echo} > $TMP
21 # if we like the source
22 # or if the subject contains a valid token
23 # then deliver the mail and allow all the addresses
24 if( $BIN/list check $PF $D/from $D/sender $D/replyto )
26 $BIN/deliver $RECIP $D/from $MBOX < $D/raw
27 $BIN/list add $PF $D/from $D/to $D/cc $D/sender
33 echo `{date} dropped $RECIP From `{cat $D/replyto} >> /mail/box/$USER/_bounced >[2] /dev/null
38 # don't recognize the sender so hold the message
39 $BIN/deliver $RECIP $D/from /mail/box/$USER/_held < $D/raw