Annotation of researchv10no/cmd/nupas/config/research/route, revision 1.1.1.1

1.1       root        1: #!/bin/sh -p
                      2: PATH=/bin:/usr/bin:/usr/lib/upas; export PATH
                      3: sender=$1;shift
                      4: system=$1;shift
                      5: sys=`cat /etc/whoami`
                      6: 
                      7: # save the mail
                      8: cat > /tmp/ur$$
                      9: 
                     10: #
                     11: # Try smtp via datakit.  Mail to a!b!c from d!e!f will be
                     12: # transformed into mail to c@b from f%e@d
                     13: # 
                     14: netname=`egrep ".*/.*/$system\$" /usr/lib/asd/destinations`
                     15: case $netname in
                     16: "") ;;
                     17: *)  tosmtp -u $sys!$sender dk!$system!smtp $* < /tmp/ur$$ && rm -f /tmp/ur$$ && exit 0
                     18:     ;;
                     19: esac
                     20: 
                     21: #
                     22: # Try smtp via internet.  Mail to a!b!c from d!e!f will be
                     23: # transformed into mail to b!c@a from f%e@d.  We do this because
                     24: # the receiving system may not treat ! and @ addresses equivalently.
                     25: # 
                     26: # Don't use smtp to bellcore systems because of name clashes.
                     27: # Don't send to vax135 because it doesn't know how to return smtp mail.
                     28: # Don't send to gauss because 1135 has a machine named gauss in hosts.att.  (Why?)
                     29: #
                     30: netname=`egrep "[      ]$system([      ]|\$)" /usr/ipc/lib/inaddr\
                     31:        /usr/ipc/lib/inaddr.local | egrep -v "bellcore|mre|vax135|gauss"`
                     32: case $netname in
                     33: "") ;;
                     34: *)  temp=
                     35:     for i in $*; do temp="$temp $system!uucp!$i"; done
                     36:     tosmtp -u $sender $system $temp < /tmp/ur$$ && rm -f /tmp/ur$$ && exit 0
                     37:     ;;
                     38: esac
                     39: 
                     40: #
                     41: # finally try old faithful.  Queuing is only done by uucp.
                     42: #
                     43: uux - -a "$sender" "$system!rmail" "($*)" < /tmp/ur$$ && rm -f /tmp/ur$$ && exit 0
                     44: 
                     45: # get gateway system
                     46: gateway=`cat /usr/lib/upas/gateway`
                     47: case $gateway in
                     48: "") gateway=research ;;
                     49: esac
                     50: 
                     51: # let the gateway figure it out
                     52: temp=
                     53: for i in $*; do temp="$temp $system!$i"; done
                     54: tosmtp -u $sender dk!$gateway!smtp $temp < /tmp/ur$$ && rm -f /tmp/ur$$ && exit 0
                     55: uux - -a "$sender" "$gateway!rmail" "($temp)" </tmp/ur$$
                     56: rv=$?
                     57: rm -f /tmp/ur$$
                     58: exit $rv

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.