ref: 55f067553a073c05e169adc0b95ad9d7f7269640
parent: cd933b2a9c5dc9dc2c469d243257154309c2dc6a
author: cinap_lenrek <[email protected]>
date: Wed Nov 28 16:12:11 EST 2018
upas: get rid of broken validatesender example, remove redundant upas/misc and setup target
--- a/sys/lib/dist/mail/lib/validatesender
+++ /dev/null
@@ -1,52 +1,0 @@
-#!/bin/rc
-
-rfork en
-fn usage{
- echo 'usage: validatesender [-n /net] plan9.bell-labs.com glenda' >[1=2]
- exit usage
-}
-
-echo $sysname $pid '$' validatesender $* >>/sys/log/smtpd.mx
-
-netroot=/net
-if(~ $1 -n){
- shift
- netroot=$1
- shift
-}
-if(! ~ $#* 2)
- usage
-
-dom=$1
-addr=$2
-
-# Cause some problems
-if(~ $dom swtch.com && ~ $addr glenda && ! ~ $sysname olive)
- exit 'deferred: always defer this one'
-
-# Sites that we have to special case
-# Lucent only - use external network when mail from external domains
-# is delivered to us internally. Assume that local domains are fine.
-#netroot=/net
-#if(~ $dom *.lucent.com lucent.com *.bell-labs.com bell-labs.com)
-# exit ''
-#if(! ~ $sysname ethel)
-# exit ''
-#if(~ $sysname ethel){
-# if(! test -d /net.alt/tcp)
-# import outside /net.alt
-# if(test -d /net.alt/tcp)
-# netroot=/net.alt
-#}
-
-if(x=`{upas/smtp -p $netroot/tcp!$dom /dev/null $addr >[2=1] |
- tee >{sed 's/^/'$sysname' '$pid' /' >> /sys/log/smtpd.mx} |
- tail -1})
- exit ''
-
-smtpstatus=$status
-if(~ $#x 0)
- x=$smtpstatus
-if(~ $smtpstatus *'Permanent Failure'*)
- exit 'rejected: smtp ping: '^$"x
-exit 'deferred: smtp ping: '^$"x
--- a/sys/src/cmd/upas/misc/gone.msg
+++ /dev/null
@@ -1,4 +1,0 @@
-This is a recorded message. I am currently out of contact with my
-computer system. Your message to me has been saved and will be
-read upon my return. This is the last time you will receive this
-message during my absence. Thank you.
--- a/sys/src/cmd/upas/misc/mail.rc
+++ /dev/null
@@ -1,12 +1,0 @@
-#!/bin/rc
-switch($#*){
-case 0
- exec upas/nedmail
-}
-
-switch($1){
-case -f* -r* -c* -m*
- exec upas/nedmail $*
-case *
- exec upas/marshal -8 $*
-}
--- a/sys/src/cmd/upas/misc/mkfile
+++ /dev/null
@@ -1,38 +1,0 @@
-
-RCFILES=mail.rc\
-
-all:Q:
- ;
-
-installall:Q: install
- ;
-
-install:V:
- cp mail.rc /rc/bin/mail
-
-safeinstall:V:
- cp mail.rc /rc/bin/mail
-
-safeinstallall:V:
- cp mail.rc /rc/bin/mail
-
-clean:Q:
- ;
-nuke:V:
- rm /rc/bin/mail
-
-UPDATE=\
- gone.fishing\
- gone.msg\
- mail.rc\
- mail.sh\
- makefile\
- mkfile\
- namefiles\
- omail.rc\
- qmail\
- remotemail\
- rewrite\
-
-update:V:
- update $UPDATEFLAGS $UPDATE
--- a/sys/src/cmd/upas/misc/namefiles
+++ /dev/null
@@ -1,2 +1,0 @@
-names.local
-names.global
--- a/sys/src/cmd/upas/misc/omail.rc
+++ /dev/null
@@ -1,14 +1,0 @@
-#!/bin/rc
-switch($#*){
-case 0
- exec upas/edmail -m
-}
-
-switch($1){
-case -F* -m* -f* -r* -p* -e* -c* -D*
- exec upas/edmail -m $*
-case '-#'* -a*
- exec upas/sendmail $*
-case *
- exec upas/sendmail $*
-}
--- a/sys/src/cmd/upas/misc/qmail
+++ /dev/null
@@ -1,6 +1,0 @@
-#!/bin/rc
-sender=$1
-shift
-addr=$1
-shift
-qer /mail/queue mail $sender $addr $* && runq /mail/queue /mail/lib/remotemail
--- a/sys/src/cmd/upas/misc/remotemail
+++ /dev/null
@@ -1,7 +1,0 @@
-#!/bin/rc
-shift
-sender=$1
-shift
-addr=$1
-shift
-/bin/upas/smtp -g research.research.bell-labs.com $addr $sender $*
--- a/sys/src/cmd/upas/misc/rewrite
+++ /dev/null
@@ -1,20 +1,0 @@
-# case conversion for postmaster
-pOsTmAsTeR alias postmaster
-
-# local mail
-[^!@]+ translate "/bin/upas/aliasmail '&'"
-local!(.*) >> /mail/box/\1/mbox
-\l!(.*) alias \1
-(helix|helix.bell-labs.com)!(.*) alias \2
-
-# we can be just as complicated as BSD sendmail...
-# convert source domain address to a chain a@b@c@d...
-@([^@!,]*):([^!@]*)@([^!]*) alias \2@\3@\1
-@([^@!]*),([^!@,]*):([^!@]*)@([^!]*) alias @\1:\3@\4@\2
-
-# convert a chain a@b@c@d... to ...d!c!b!a
-([^@]+)@([^@]+)@(.+) alias \2!\1@\3
-([^@]+)@([^@]+) alias \2!\1
-
-# /mail/lib/remotemail will take care of gating to systems we don't know
-([^!]*)!(.*) | "/mail/lib/qmail '\s' 'net!\1'" "'\2'"
--- a/sys/src/cmd/upas/mkfile
+++ b/sys/src/cmd/upas/mkfile
@@ -10,7 +10,6 @@
fs\
imap4d\
marshal\
- misc\
ml\
ned\
pop3\
@@ -88,30 +87,3 @@
echo '>>>>>>>>>>' `{pwd} '<<<<<<<<<<<'
mk $MKFLAGS 'UPDATEFLAGS='$"UPDATEFLAGS update
}
-
-#
-# setup the mail directories. this should be done by the administrator since
-# he/she will own everything. the following files must be altered to reflect
-# local preference.
-#
-# /mail/lib/namefiles - remove alias files you don't use, insert ones you do.
-# /mail/lib/remotemail - change '-g research.research.bell-labs.com' to your own mail
-# gateway. if you have none, remove it.
-# - change '-h plan9.bell-labs.com' to a name you would like
-# this host to be known as. if you don't care, take it
-# out and it will use the name in /env/site.
-# /mail/lib/rewrite - change the line that contains 'helix' to include names,
-# other than the contents of /env/site, that your system
-# answers to. this is a hack and will be fixed.
-#
-setup:V:
- mkdir /mail
- chmod 775 /mail
- mkdir /mail/lib
- chmod 775 /mail/lib
- mkdir /mail/queue /mail/box /mail/tmp
- chmod 777 /mail/queue /mail/box /mail/tmp
- chmod +t /mail/queue /mail/tmp
- mkdir /mail/ml
- chmod 775 /mail/ml
- cp misc/rewrite misc/qmail misc/remotemail misc/namefiles /mail/lib