[net.mail] Restricting other sites from passing mail to ATTMAIL

glc@akgua.UUCP (glc) (07/28/86)

Re:
>Does anybody out there have a method for a site without a source license
>to pass mail between all it's neighbors EXCEPT attmail?  We run
>honey-dan-ber so we have the source for that, but others (SCO?
>MicroPort?  etc.) won't even have that.

Actually that isn't too hard to do.  With Honey-dan-ber, you can
set up the Permissions file to run your own "rmail" program.  e.g.:

  MACHINE=OTHER COMMANDS=/usr/lib/uucp/rmail

The /usr/lib/uucp/rmail script could be something like:

  # Only allow mail from certain sites to be passed along to "attmail".
  # This is to prevent "freeloading" from other sites.
  #
  case "$1" in
    attmail*|*@attmail)
	  case "$UU_MACHINE" in
	    akgua|akgub|akguc) ;;    #  Allow these sites
	    *)    if [ `echo "$UU_MACHINE" | egrep -c "$ALLOW"` -eq 0 ] ;
		    then  echo '\nYour site not authorized to send to ATTMAIL' >&2
			  exit 1
		  fi
		  ;;
	  esac
	  ;;
  esac
  
  /bin/rmail $1

henry@utzoo.UUCP (Henry Spencer) (07/28/86)

> >Does anybody out there have a method for a site without a source license
> >to pass mail between all it's neighbors EXCEPT attmail?...
> 
> Actually that isn't too hard to do.  With Honey-dan-ber, you can
> set up the Permissions file to run your own "rmail" program...
> [example which checks and then invokes /bin/rmail]

Actually, you can do better than that:  there is nothing in a vanilla
Unix which insists that /bin/rmail be a link to /bin/mail (or whatever).
Utzoo ran for years with /bin/rmail a shell file which did some checks,
took some precautions against errors, and then invoked the "real rmail"
under another name.  If you make the link to /bin/mail under a name like
"rrmail", this will cover both the possibility that mail is looking at
the first letter to see if it's 'r' (this is what at least the older Unix
mailers do) and the possibility that it's checking to see whether the
last five characters are "rmail" (2.10 news uses such an approach to
check for "rnews").  It's then trivially easy to hack something suitable
into the /bin/rmail shell file to make whatever checks you want.
-- 
EDEC:  Stupidly non-standard
brain-damaged incompatible	Henry Spencer @ U of Toronto Zoology
proprietary protocol used.	{allegra,ihnp4,decvax,pyramid}!utzoo!henry