9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Russ Cox" <rsc@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] /mail/lib/rewrite
Date: Wed,  1 May 2002 12:51:48 -0400	[thread overview]
Message-ID: <73d1b81c901f7e338dac35bbf1720f6d@plan9.bell-labs.com> (raw)

Here you are.  Thanks for pointing this out.

# To unbundle, run this file
echo rewrite.direct
sed 's/.//' >rewrite.direct <<'//GO.SYSIN DD rewrite.direct'
-#
-#	sample rewrite file for systems that send and receive mail directly.
-#
-#	by default, the return address points to this system; if you have multiple systems
-#	and don't want them all to be mail recipients, set $site to a generic
-#	name (e.g., plan9) or system name in /rc/bin/termrc and /rc/bin/cpurc
-#	and put an MX DNS record in /lib/ndb to point to that system.
-#
-#	replace YOURDOMAIN.DOM in the following rules with your domain name.
-
-# translate local aliases from /mail/lib/namefiles
-[^!@.]+			translate	"/bin/upas/aliasmail '&'"
-
-# deliver mail without a domain locally
-local!(.*)		>>		/mail/box/\1/mbox
-
-# your local names
-\l!(.*)					alias		\1
-\l\.YOURDOMAIN\.DOM!(.*)		alias		\1
-
-# 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
-
-# queue all mail for delivery
-([^!]*)!(.*) 		| 		"/mail/lib/qmail '\s' 'net!\1'" "'\2'"
//GO.SYSIN DD rewrite.direct
echo rewrite.gateway
sed 's/.//' >rewrite.gateway <<'//GO.SYSIN DD rewrite.gateway'
-#
-#	sample rewrite file for systems that send mail to a mail server or gateway
-#	for delivery.  we assume the mail server handles incoming messages.
-#
-#	by default the return address points to this system; set $site
-#	to the name of the mail server that receives your mail in
-#	/rc/bin/termrc and /rc/bin/cpurc.
-#
-#	replace YOURDOMAIN.DOM with the name of your domain.
-#
-#	in the last rule, $smtp is the name of the mail server.  set it
-#	in the DNS database in /lib/ndb (see ndb(6)).
-
-# translate local aliases from /mail/lib/namefiles
-[^!@.]+			translate	"/bin/upas/aliasmail '&'"
-
-# append the local domain to addresses without a domain
-local!(.*)		alias		\1@YOURDOMAIN.DOM
-
-# 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
-
-# send all mail to the gateway or mail server, $smtp,  for delivery
-([^!]*)!(.*) 		| 		"/mail/lib/qmail '\s' 'net!$smtp'" "'\2@\1'"
//GO.SYSIN DD rewrite.gateway



             reply	other threads:[~2002-05-01 16:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-01 16:51 Russ Cox [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-05-01 14:21 [9fans] slow video fix Russ Cox
2002-05-01 16:41 ` [9fans] /mail/lib/rewrite Pat Hacker
2000-07-04 15:23 Russ Cox
2000-07-04 10:30 arisawa
1998-08-20 13:00 presotto
1998-08-20  3:49 arisawa

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=73d1b81c901f7e338dac35bbf1720f6d@plan9.bell-labs.com \
    --to=rsc@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /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).