The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: William Cheswick <ches@cheswick.com>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: [TUHS] Upas rewrite little language
Date: Fri, 30 Nov 2018 10:05:42 -0500	[thread overview]
Message-ID: <A61F8BBC-1C96-46E9-AA7E-D27D6EDE123E@cheswick.com> (raw)
In-Reply-To: <68E43E9C-BD27-4DDB-93D1-AD82EBCA976A@cheswick.com>

[-- Attachment #1: Type: text/plain, Size: 4630 bytes --]

Whoa! I hadn’t realized that I have in my archives mail configuration files from no later that 1993.  Here is one rewrite file from “research”, as in “research!dmr":

more rewrite 
# local mail
[^!@%.=]+               translate       "exec /v/lib/upas/translate '&'"
local!([^!@]+)          >>              /usr/spool/mail/\1
\l!(.+)                 alias           \1
research\.att\.com!(.+) alias           \1
research\.research\.att\.com!(.+)       alias           \1
plan9\.research\.att\.com!(.+)  alias   \1

league\.att\.com!(.+)   alias           league!\1
league\.research\.att\.com!(.+) alias   league!\1
league!(.+)             alias   \1


# convert @ format to ! format
([^!]+)@([^!@]+)        alias   \2!\1

# convert % addresses for us only.
([^!]+)%([^!%]+)        alias   \2!\1

# network gateways

uucp!(.+)               alias   \1
bitnet!(.+)             alias   inet!bitnet!\1
uunet!(.+)              alias   inet!uunet.uu.net!\1
.*tempo\.att\.com!.*    | "exec /v/lib/upas/route '\s' allegra.att.com" "'&'"
vax135!(.*)             | "exec /v/lib/upas/route '\s' big.l1135.att.com" "\1"
\[([^!]+)\]!(.+)        |       "exec /v/lib/upas/route.ip '\s' '\1'" "'\2'"
([^!]+\.att\.com)!(.+)  |       "exec /v/lib/upas/route '\s' '\1'" "'\2'"
[^!]+\..*               |       "exec /v/lib/upas/route '\s' inet" "'&'"
([^!]+)!(.+)            |       "exec /v/lib/upas/route '\s' '\1'" "'\2’"


====

and here is the rewrite file for the mail application gateway no later than 1998:

#  get rid of the .att.com domain part of the name.
#  It's not used internally.
([^%!@.]+)\.att\.com!(.+)		alias	\1!\2

# the following must change: we don't really want these used.
att\.com!(.+)				alias	\1
att\.arpa!(.+)				alias	\1
(arpa|att-gw|gate)(\.arpa)?!(.+)	alias	\3

# rerouting:
uunet!(.+)		alias	uunet.uu.net!\1
mcvax!(.+)		alias	uunet.uu.net!mcvax!\1
local!(.+)		>>	/usr/spool/mail/\1
#tempo!(.+)		alias	research!tempo!\1
sola!(.+)		alias	jones!\1

# a very common mistake
.*!			|	"echo Bad address: '&'; exit 1"
# a problem at cunyvm.
cunyvm\.cuny\.edu!(cunyvm\.cuny\.edu)!(.+)	alias	\1!\2

# gateways
uucp!(.+)		alias	\1
csnet!(.+)		alias	relay.cs.net!\1
bitnet!([^!]+)!(.+)	alias	CUNYVM.CUNY.EDU!\1.BITNET!\2
bitnet!([^!]+)@([^!]+)	alias	CUNYVM.CUNY.EDU!\2.BITNET!\1
mailnet!([^!]+)!(.+)	alias	mit-multics.arpa!\1.MAILNET!\2
acsnet!(.+)		alias	research!&
attmail!(.+)		auth	false
# attmail!(.+)		alias	attbl!attmail!\1

# convert @ format to ! format always (so locals can use @ format)
(.+)@([^!@]+)			alias	\2!_pct_!\1

# convert % format only if the first hop isn't on the internet.
([^!]+)%([^!%]+)			alias	\2!\1
([^!.]+)!(.+!)?_pct_!(.+)%([^!%]+)	alias	\1!\2\4!_pct_!\3
([^!.]+)!(.+)%([^!%]+)			alias	\1!\3!_pct_!\2

# get rid of our _pct_ tag
((.+)!)?_pct_!(.+)			alias	\1\3

# don't route through research just to get to another machine
# this MUST follow the %@ conversion
research!([^!]+)!(.+)			alias   \1!\2
research!([^!]+)			alias	inet!\1

# at this point, anything without a "."  in the first component
inet!(.+)               	|       "exec /usr/lib/upas/route.inet '\s' inet" "'\1'"
(att|coma|alice|allegra)!(.+)	|       "exec /usr/lib/upas/route.toatt '\s' \1" "'\2'"
([^.!]+)!(.+)           	|       "exec /usr/lib/upas/route.toatt '\s' att" "'&'"

#	Only local or Internet Domain addresses below this line.

# various semi-official domain addresses
([^!]+)\.(csnet|bitnet|acsnet|mailnet|uucp)!(.*) alias	\2!\1!\3

# Domain routings - arranged with the other AT&T postmasters
sf\.att\.com!(.+)				alias	attunix!\1
([^!.]+)\.sf\.att\.com!(.+)			alias	attunix!\1!\2
([^!.]+)\.(astro|mercury|phone|div111)\.nj\.att\.com!(.+)	alias   \1!\2
([^!]*\.)?mis\.oh\.att\.com!.+			alias	att!&
([^!]*\.)?dptg\.att\.com!.+			alias	dptg!&
([^!]*\.)?garage(\.nj)?\.att\.com!.+		alias	garage!&
([^!]*)\.tempo(\.nj)?\.att\.com!(.+)		alias	\1!\3
([^!]*\.)?homer\.nj\.att\.com!.+		alias	ulysses!&
([^!]+)\.aloft\.att\.com!(.+)			alias	aloft!&
(([^!]*\.)?uso\.att\.com)!(.+)  |  "smtpqer -n -d .att.com -H att.att.com '\s' '\1'" "'\3'"
([^!]+)\.att\.com(\.)?!(.+)	| "echo 'Unknown AT\&T domain:' '&' >\&2; exit 1"

# Ready to send Internet mail.
([^!]+)!(.+)            |  "smtpqer -n -d .att.com -H att.att.com '\s' '\1'" "'\2'"

#	carefully selected local translates

postmaster		alias		coma!postmaster
[^!@%]*[._]+[^!@%]*	translate	\
	"exec /usr/lib/post/post -o '%^25name  %20ema  %^city, %+state ' -x -- '&'"
[^!@%]+			translate	"exec translate '&'"
[^!@%]+			>>		/usr/spool/mail/&


[-- Attachment #2: Type: text/html, Size: 31419 bytes --]

  reply	other threads:[~2018-11-30 15:06 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-16  0:03 [TUHS] man-page style Doug McIlroy
2018-11-16  4:50 ` Larry McVoy
2018-11-16  5:32   ` Dave Horsfall
2018-11-16  6:03     ` Grant Taylor via TUHS
2018-11-16 15:33       ` Jim Capp
2018-11-16 15:37         ` WIlliam Cheswick
2018-11-16 15:48           ` Clem Cole
2018-11-16 18:47           ` Tom Manos
2018-11-17  3:29         ` Andy Kosela
2018-11-16 16:55       ` Paul Winalski
2018-11-16 17:13         ` Larry McVoy
2018-11-16 17:31           ` Paul Winalski
2018-11-16 20:45             ` Dave Horsfall
2018-11-16 17:33           ` Jim Capp
2018-11-16 17:36             ` Larry McVoy
2018-11-16 20:50             ` Dave Horsfall
2018-11-16 17:39           ` Jon Steinhart
2018-11-16 18:57             ` Clem Cole
2018-11-16 17:29         ` Toby Thain
2018-11-16 20:52           ` Dave Horsfall
2018-11-16 20:55             ` Larry McVoy
2018-11-16 20:56             ` Chet Ramey
2018-11-16 21:05               ` Jim Capp
2018-11-16 21:09                 ` Kurt H Maier
2018-11-19  2:53                 ` Chet Ramey
2018-11-19  5:59                   ` Lars Brinkhoff
2018-11-19 14:00                     ` Chet Ramey
2018-11-16 21:13               ` Jon Steinhart
2018-11-16 22:24                 ` Clem Cole
2018-11-17  7:50                 ` Lars Brinkhoff
2018-11-19  2:58                 ` Chet Ramey
2018-11-19  3:11                   ` Jon Steinhart
2018-11-19  3:21                     ` George Michaelson
2018-11-19  3:32                       ` Larry McVoy
2018-11-19  6:13                     ` Lars Brinkhoff
2018-11-19 14:06                       ` Chet Ramey
2018-11-19 15:35                     ` Clem Cole
2018-11-19 15:41                       ` David
2018-11-19 17:06                         ` Jon Steinhart
2018-11-19 17:39                       ` Theodore Y. Ts'o
2018-11-19 18:40                         ` Clem Cole
2018-11-19 22:08                           ` Theodore Y. Ts'o
2018-11-20  6:52                           ` arnold
2018-11-20  7:10                             ` Otto Moerbeek
2018-11-28  0:09                       ` Eric Allman
2018-11-28  0:36                         ` G. Branden Robinson
2018-11-28  0:57                           ` Eric Allman
2018-11-28  1:26                             ` G. Branden Robinson
2018-11-29  7:25                         ` arnold
2018-11-29 18:20                           ` Eric Allman
2018-11-29 18:52                             ` Larry McVoy
2018-12-03  6:52                             ` arnold
2018-11-19 13:08                   ` Steffen Nurpmeso
2018-11-19 13:20                     ` Donald ODona
2018-11-19  7:05                 ` Warner Losh
2018-11-19  7:20                   ` Bakul Shah
2018-11-19 16:48                   ` Jon Steinhart
2018-11-28  0:10                     ` Eric Allman
2018-11-29 18:48                       ` Larry McVoy
2018-11-29 19:13                         ` Grant Taylor via TUHS
2018-11-29 19:28                           ` Larry McVoy
2018-11-29 19:32                           ` Chet Ramey
2018-11-29 19:36                             ` Warner Losh
2018-11-29 19:40                               ` Chet Ramey
2018-11-30 14:55                         ` WIlliam Cheswick
2018-11-30 15:05                           ` William Cheswick [this message]
2018-11-30 22:58                           ` Dave Horsfall
2018-12-01 23:24                             ` WIlliam Cheswick
2018-12-01 19:53                           ` arnold
2018-12-01 21:26                             ` Grant Taylor via TUHS
2018-12-02  7:22                               ` [TUHS] Ease (was Re: man-page style) arnold
2018-12-02  7:32                                 ` Grant Taylor via TUHS
2018-12-02 17:22                                   ` arnold
2018-11-17 14:49               ` [TUHS] man-page style Michael Parson
2018-11-17 21:07                 ` Dave Horsfall
2018-11-16 20:59             ` Jim Capp
2018-11-16 21:24               ` Toby Thain
2018-11-16 21:29                 ` Grant Taylor via TUHS
2018-11-16 21:35                   ` Toby Thain
2018-11-19  2:59                   ` Chet Ramey
2018-11-16 21:28               ` Lars Brinkhoff
2018-11-16 21:37               ` Dave Horsfall
2018-11-17 23:38               ` Ralph Corderoy
2018-11-18  0:31                 ` Donald ODona
2018-11-18  3:00                   ` Toby Thain
2018-11-19  3:09                     ` Chet Ramey
2018-11-18  5:01                   ` Lars Brinkhoff
2018-11-18  5:29                     ` Lars Brinkhoff
2018-11-18  0:40                 ` Theodore Y. Ts'o
2018-11-16 21:12             ` emanuel stiebler
2018-11-16 18:00         ` Warner Losh
2018-11-16 18:16         ` Grant Taylor via TUHS
2018-11-16 19:35           ` Chet Ramey
2018-11-16 20:50             ` Grant Taylor via TUHS
2018-11-16 22:25         ` Bakul Shah
2018-11-17  0:25           ` Earl Baugh
2018-11-16 21:26       ` Dave Horsfall
2018-11-17 18:16       ` arnold
2018-11-17 18:14   ` arnold
2018-11-17 18:21     ` Kurt H Maier
2018-11-17 19:42       ` arnold
2018-11-17 20:02       ` Noel Hunt
2018-11-17 20:36       ` Theodore Y. Ts'o
2018-11-19  3:05       ` Chet Ramey
2018-11-16  5:24 ` Anthony Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A61F8BBC-1C96-46E9-AA7E-D27D6EDE123E@cheswick.com \
    --to=ches@cheswick.com \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).