|
|
researchv10 Norman
#!/bin/sh -p
PATH=/bin:/usr/bin:/usr/lib/upas; export PATH
sender=$1;shift
system=$1;shift
sys=`cat /etc/whoami`
# save the mail
cat > /tmp/ur$$
#
# Try smtp via datakit. Mail to a!b!c from d!e!f will be
# transformed into mail to c@b from f%e@d
#
netname=`egrep ".*/.*/$system\$" /usr/lib/asd/destinations`
case $netname in
"") ;;
*) tosmtp -u $sender dk!$system!smtp $* < /tmp/ur$$ && rm -f /tmp/ur$$ && exit 0
;;
esac
#
# finally try old faithful. Queuing is only done by uucp.
#
uux - -a "$sender" "$system!rmail" "($*)" < /tmp/ur$$ && rm -f /tmp/ur$$ && exit 0
# get gateway system
gateway=`cat /usr/lib/upas/gateway`
case $gateway in
"") gateway=research ;;
esac
# let the gateway figure it out
temp=
for i in $*; do temp="$temp $system!$i"; done
tosmtp -u $sender dk!$gateway!smtp $temp < /tmp/ur$$ && rm -f /tmp/ur$$ && exit 0
uux - -a "$sender" "$gateway!rmail" "($temp)" </tmp/ur$$
rv=$?
rm -f /tmp/ur$$
exit $rv
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.