Relay-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site seismo.CSS.GOV Posting-Version: version B 2.10.2 9/3/84; site panda.UUCP Path: seismo!harvard!talcott!panda!sources-request From: sources-request@panda.UUCP Newsgroups: mod.sources Subject: uumail -- an opath/pathalias based uucp mailer Message-ID: <1125@panda.UUCP> Date: 20 Nov 85 12:21:02 GMT Sender: jpn@panda.UUCP Reply-To: sob@neuro1.UUCP (Stan Barber) Organization: Neurophysiology, Baylor College of Medicine, Houston, Tx Lines: 2217 Approved: jpn@panda.UUCP Mod.sources: Volume 3, Issue 49 Submitted by: genrad!rice!neuro1!sob Following is the shar for uumail, my version of a pathalias-database mailer. This program can also understand domain names in the uucp tradition (! over @) and can handle the new flags in 4.3 uucp. Please read the README for more information. This program has been checked-out on a Sun-2, Masscomp, and Sperry5000. Thanks to Eric Roskos for the use of opath. Please forward comments and bug fixes to me at sob@rice.edu or ihnp4!shell!neuro1!sob or texsun!drilltech!sob Stan Barber Baylor College of Medicine Houston, Texas #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # README # README.orig # address.1 # address.c # domains # gethostnam.c # getpath.c # makefile # opath.3 # opath.c # palias # rmail.c # uuconf.h # uumail.1 # uumail.c # uupath.1 # uupath.c # This archive created: Wed Nov 20 07:16:35 1985 export PATH; PATH=/bin:$PATH echo shar: extracting "'README'" '(2366 characters)' if test -f 'README' then echo shar: will not over-write existing file "'README'" else sed 's/^X//' << \SHAR_EOF > 'README' This is an updated version of uumail (and uupath) that can access a pathalias-generated database to facilitate routine mail. These program can cope with DBM and standard line-oriented forms of pathalias-generated databases. This version of uumail can be used as uupath by linking uumail to uupath. Also, this version can handle domain addresses (user@host.domain). You can put as many addresses on a line as you like. There are some compile flags to be aware of when making uumail. Here is a list of them. DEBUG compiles in the debugging code. OPATH causes the opath subroutine to be used to resolve addresses. If you do not use this flag, you cannot use the user@host.domain style addresses with uumail. DBM causes uumail to use the DBM format patalias database. If you do not have the dbm libraries, do not use this flag. XSYSIII will make adjustments for system that are derived from UNIX System III or System V. NOGRADE should be used if your uux does not understand the -g flag. NORETURN should be used if your uux does not understand the -a flag. LOG will enable logging of uumail traffic. UGLYUUCP causes the From_ line produced by uumail to contain the "remote from hostname" string. GETHOSTNAME will cause the c-library gethostname to be used. If you are a BSD site, define this. XSYSTEMNAME will cause the systemname to be derived from the file /usr/lib/uucp/SYSTEMNAME. This should be defined if your machine is a Sperry 5000. Here is the mailer segment of a sendmail configuration file that you can use to define the uumail program as a mailer. ------------------------------------------------------------------- ############################################################ #### This is a special mailer that takes advantage of ### #### usemap database for addresses to UUCP sites ### ############################################################ Muumail, P=/usr/lib/uucp/uumail,F=sDFhuUM,S=13,R=23,M=1000000, A=uumail -h -gC -f$g $h!$u -------------------------------------------------------------- Please be sure that the S= and R= rules are correct for your system. They should match the uucp mailer rules exactly. A manual page for uumail and uupath are included. Please forward comments and bug fixes to me at sob@rice.edu or ihnp4!shell!neuro1!sob or texsun!drilltech!sob XStan Barber Baylor College of Medicine Houston, Texas SHAR_EOF if test 2366 -ne "`wc -c < 'README'`" then echo shar: error transmitting "'README'" '(should have been 2366 characters)' fi fi # end of overwriting check echo shar: extracting "'README.orig'" '(875 characters)' if test -f 'README.orig' then echo shar: will not over-write existing file "'README.orig'" else sed 's/^X//' << \SHAR_EOF > 'README.orig' The makefile can make two programs. One is a filter that can be used to expand network paths. To install it you rename the program that you want filtered. The new file name is simply the old one with a period (.) appended to the end. The filter program (filter) is then renamed to the original name of the program to be filtered. ie mail druxn!kak gets converted to mail. pur-ee!decvax!...!druxn!kak The second file the makefile makes is uupath. This will tell you the network paths of its arguments name tell you the path to it. Don't forget to modify the defines for the location of the network map. The default location is /etc/usemap If you have any questions just ask. Jeff Donnelly (217) 333-6106 University of Illinois pur-ee!uiucdcs!donnelly Jeff may not help much -- his new number is 217-333-7937; Kolstad can help some also: 214-669-3700 SHAR_EOF if test 875 -ne "`wc -c < 'README.orig'`" then echo shar: error transmitting "'README.orig'" '(should have been 875 characters)' fi fi # end of overwriting check echo shar: extracting "'address.1'" '(3563 characters)' if test -f 'address.1' then echo shar: will not over-write existing file "'address.1'" else sed 's/^X//' << \SHAR_EOF > 'address.1' X.TH ADDRESS 1 local X.SH NAME address - display the path generated by \fBdeliver\fR for an RFC822-format address. X.SH SYNOPSIS address rfc-address [ ... ] X.SH DESCRIPTION This program allows you to check the UUCP mail routing path that will be generated by the UUCP mailer \fBdeliver\fR if you specify an RFC822-format address \fBrfc-address\fR in the ``To:'' field of the mail header. XFor each RFC-style address on the command line, \fBaddress\fR echoes the address to the standard output, followed by a colon, followed by the UUCP address that will be used to send the message to that address. X.SH "ADDRESS FORMAT" Briefly, the RFC822-format address is of the form X.nf X.sp 1 @. X.sp 1 X.fi where is the name of the system you are sending the message to, is a modifier for identifying the network in which the address is to be interpreted (UUCP, ARPA, MAILNET, CSNET, etc); and is an address string to be interpreted on the host machine. The field may contain further remote addresses to be interpreted on the host machine. Typically this will be an address for mailing via another network; and in particular, the may (recursively) be identical in format to the RFC address, but with the symbol `%' replacing the symbol `@' in the standard address format. Where this form is used, the rightmost % is replaced by an @ before the host machine sends the message out. On our system, the presently valid s are UUCP, ARPA, CSNET, and MAILNET. The recently proposed UUCP domain names are also accepted, although they are treated the same as plain ``UUCP''. Omitting the causes the network to default to UUCP. The should be the name of a remote machine to which the message is directed; see \fI/usr/lib/uucp/uuaddress.alpha\fR for a list of all known UUCP hostnames. It is \fInot\fR necessary to specify a UUCP pathname when using this format; the pathname is automatically determined for you and substituted into the address before mailing. The selected pathname is determined using the \fBpathalias\fR database, and is supposed to be optimal, taking into consideration information provided by each site about how often they send mail out, etc. X.SH EXAMPLES X.HP 5 joe X.br The message is sent to the user ``joe'' on the local system. X.HP 5 joe@ucbvax X.br The message is sent to joe on the UUCP system named ``ucbvax''; this address is automatically translated to a proper (and ostensibly optimal) UUCP path. X.HP 5 joe@ucbvax.UUCP X.br XSame as joe@ucbvax X.HP 5 joe@ucbvax.ARPA X.br The message is addressed to joe at ucbvax, using the ARPA network. The message will be routed to the ARPAnet via a UUCP-ARPAnet gateway. X.HP 5 joe%mit-multics.ARPA@ucbvax X.br The message is sent to ucbvax, who then uses the address joe@mit-multics.ARPA to send the message on to mit-multics via the ARPAnet. Since ucbvax is on the arpanet, this address will work correctly (as long as there is someone named joe on the MIT multics machine). X.HP 5 joe%vanderbilt.MAILNET%mit-multics.ARPA@ucbvax X.br The message is sent via UUCP to ucbvax, who then sends the message to mit-multics via the arpanet; mit-multics then sends the message to joe@vanderbilt via MAILNET. Since the above machines each have access to the networks named in the address, this address will work correctly. X.SH FILES /usr/lib/uucp/domains - Domain/gateway table X.br /usr/lib/uucp/archive - Pathalias database X.SH "SEE ALSO" opath(3) X.SH AUTHOR Eric Roskos, PE SDC, 1/16/85 SHAR_EOF if test 3563 -ne "`wc -c < 'address.1'`" then echo shar: error transmitting "'address.1'" '(should have been 3563 characters)' fi fi # end of overwriting check echo shar: extracting "'address.c'" '(885 characters)' if test -f 'address.c' then echo shar: will not over-write existing file "'address.c'" else sed 's/^X//' << \SHAR_EOF > 'address.c' /* * address - run opath to see what a translated RFC822 address will come * out as. * * By E. Roskos 1/16/85 * $Log: address.c,v $ * Revision 1.2 85/09/16 18:31:53 sob * Added DEBUG flag * * Revision 1.1 85/09/16 17:50:24 sob * Initial revision * */ #define _DEFINE #include "uuconf.h" static char rcsid[] = "$Header: address.c,v 1.2 85/09/16 18:31:53 sob Exp $"; char *opath(); int Debug; main(argc,argv) int argc; char **argv; { char *p; int uswitch; if (argc < 2) { fprintf(stderr,"usage: %s rfcaddress [...]\n", argv[0]); exit(1); } while (--argc) { p = *++argv; if (*p=='-') { switch(*++p) { case 'u': uswitch++; continue; case 'd': Debug++; continue; default: printf("unknown switch: %c\n",*p); continue; } continue; } printf("%s: %s\n",p,uswitch?oupath(p):opath(p)); } exit(0); } SHAR_EOF if test 885 -ne "`wc -c < 'address.c'`" then echo shar: error transmitting "'address.c'" '(should have been 885 characters)' fi fi # end of overwriting check echo shar: extracting "'domains'" '(1093 characters)' if test -f 'domains' then echo shar: will not over-write existing file "'domains'" else sed 's/^X//' << \SHAR_EOF > 'domains' # # Domain Table # # Format: ,,,