diff options
author | rsc <devnull@localhost> | 2005-10-29 16:26:44 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-10-29 16:26:44 +0000 |
commit | 5cdb17983ae6e6367ad7a940cb219eab247a9304 (patch) | |
tree | 8ca1ef49af2a96e7daebe624d91fdf679814a057 /src/cmd/upas/misc/rewrite | |
parent | cd3745196389579fb78b9b01ef1daefb5a57aa71 (diff) | |
download | plan9port-5cdb17983ae6e6367ad7a940cb219eab247a9304.tar.gz plan9port-5cdb17983ae6e6367ad7a940cb219eab247a9304.tar.bz2 plan9port-5cdb17983ae6e6367ad7a940cb219eab247a9304.zip |
Thanks to John Cummings.
Diffstat (limited to 'src/cmd/upas/misc/rewrite')
-rw-r--r-- | src/cmd/upas/misc/rewrite | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cmd/upas/misc/rewrite b/src/cmd/upas/misc/rewrite new file mode 100644 index 00000000..fd724eb1 --- /dev/null +++ b/src/cmd/upas/misc/rewrite @@ -0,0 +1,20 @@ +# 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'" |