|
|
1.1 ! root 1: #!/bin/sh ! 2: PATH=/bin:/usr/bin:/usr/lib/upas ! 3: sender=$1;shift ! 4: system=$1;shift ! 5: sys=`hostname` ! 6: ! 7: # massage the destination ! 8: temp= ! 9: for i in $*; do temp="$temp $system!$i"; done ! 10: ! 11: # first try immediate smtp ! 12: cat > /tmp/ur$$ ! 13: tosmtp "$sys!$sender" "$system" $temp < /tmp/ur$$ && rm -f /tmp/ur$$ && exit 0 ! 14: ! 15: # didn't work: queue it ! 16: /usr/lib/upas/smtpqer "$sys!$sender" "$system" $temp < /tmp/ur$$ && rm -f /tmp/ur$$ && exit 0 ! 17: ! 18: # didn't work: get gateway system ! 19: gateway=`cat /usr/lib/upas/gateway` ! 20: case $gateway in ! 21: "") gateway=research ;; ! 22: esac ! 23: ! 24: # let the gateway figure it out ! 25: tosmtp "$sys!$sender" $gateway $temp < /tmp/ur$$ && rm -f /tmp/ur$$ && exit 0 ! 26: /usr/lib/upas/smtpqer "$sys!$sender" $gateway $temp < /tmp/ur$$rv=$? ! 27: rm -f /tmp/ur$$ ! 28: exit $rv
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.