Annotation of researchv10no/cmd/nupas/config/112clients/route, revision 1.1

1.1     ! root        1: #!/bin/sh
        !             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$$ || exit 1
        !             9: 
        !            10: #
        !            11: # Try smtp via datakit.
        !            12: # 
        !            13: mydname=`qns value dk $sys,name`
        !            14: #hisdname=`qns value dk $system,name |
        !            15: #      egrep 'nj/((mercury|astro|phone)/.*|garage/(europa|bartok)$|zither/trevor$)' |
        !            16: #      egrep -v 'nj/astro/3k|nj/astro/arpa|nj/mercury/mharit'`
        !            17: hisdname=`qns value dk $system,name dksmtp,svc`
        !            18: case $hisdname in
        !            19: "")    ;;
        !            20: *)     case $mydname in
        !            21:        "")     ;;
        !            22:        *)      smtpqer -u -a dk!$hisdname!smtp $sender $system $* < /tmp/ur$$
        !            23:                rv=$?
        !            24:                rm -f /tmp/ur$$
        !            25:                exit $rv ;;
        !            26:        esac ;;
        !            27: esac
        !            28: 
        !            29: egrep "^$system[       ]" /usr/lib/upas/tcpsmtpaddrs  2>/dev/null >/dev/null && {
        !            30:        smtpqer -a "tcp!$system" "$sender" "$system" $* </tmp/ur$$
        !            31:        rv=$?
        !            32:        rm -f /tmp/ur$$
        !            33:        exit $rv
        !            34: }
        !            35: 
        !            36: #
        !            37: # Try queuing via uucp
        !            38: #
        !            39: uux - -a "$sender" "$system!rmail" "($*)" < /tmp/ur$$ &&
        !            40:        rm -f /tmp/ur$$ &&
        !            41:        exit 0
        !            42: 
        !            43: #
        !            44: # Try queuing smtp via internet.
        !            45: # 
        !            46: myiname=`qns value dom $sys,dom`
        !            47: lsystem=`echo $system | tr [A-Z] [a-z]`
        !            48: hisiname=`((qns value dom $lsystem,dom |
        !            49:        egrep '(.+\.)?(tempo|mercury|phone|astro|lc|research)(\.nj)?(\.att\.com)') ||
        !            50:                qns value dom $lsystem,dom tcpsmtp,svc)                         |
        !            51:        sed 's/\.$//'`
        !            52: case $hisiname in
        !            53: "")    ;;
        !            54: *)     case $myiname in
        !            55:        "")     ;;
        !            56:        *)      smtpqer $sender $hisiname $* < /tmp/ur$$
        !            57:                rv=$?
        !            58:                rm -f /tmp/ur$$
        !            59:                exit $rv ;;
        !            60:        esac ;;
        !            61: esac
        !            62: 
        !            63: # get gateway system
        !            64: gateway=`cat /usr/lib/upas/gateway`
        !            65: case $gateway in
        !            66: "") gateway=research ;;
        !            67: esac
        !            68: case $sys in
        !            69: $gateway) rm -f /tmp/ur$$
        !            70:          echo no route from gateway > /dev/stderr
        !            71:          exit 1
        !            72: esac
        !            73: 
        !            74: # expand the destination
        !            75: expdest=
        !            76: for i in $*; do expdest="$expdest $system!$i"; done
        !            77: 
        !            78: #
        !            79: # Try smtp via datakit to gateway.
        !            80: # 
        !            81: hisdname=`qns value dk $gateway,name | egrep 'nj/((mercury|astro|phone)/.*|garage/(europa|bartok)$|zither/trevor$)'`
        !            82: case $hisdname in
        !            83: "")    ;;
        !            84: *)     case $mydname in
        !            85:        "")     ;;
        !            86:        *)      smtpqer -u -a dk!$hisdname!smtp $sender $gateway $expdest < /tmp/ur$$
        !            87:                rv=$?
        !            88:                rm -f /tmp/ur$$
        !            89:                exit $rv ;;
        !            90:        esac ;;
        !            91: esac
        !            92: 
        !            93: #
        !            94: # Try smtp via internet to gateway.
        !            95: # 
        !            96: myiname=`qns value dom $sys,dom`
        !            97: hisiname=`qns value dom $gateway,dom'`
        !            98: case $hisiname in
        !            99: *research*)    case $myiname in
        !           100:        "")     ;;
        !           101:        *)      smtpqer -u $sender $gateway $expdest < /tmp/ur$$
        !           102:                rv=$?
        !           103:                rm -f /tmp/ur$$
        !           104:                exit $rv ;;
        !           105:        esac ;;
        !           106: esac
        !           107: 
        !           108: #
        !           109: # Try queuing via uucp if all else fails
        !           110: #
        !           111: uux - -a "$sender" "$gateway!rmail" "($expdest)" < /tmp/ur$$
        !           112: 
        !           113: rv=$?
        !           114: rm -f /tmp/ur$$
        !           115: exit $rv

unix.superglobalmegacorp.com

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