Blame


1 4db31855 2006-02-12 devnull #
2 4db31855 2006-02-12 devnull # sample rewrite file for systems that send mail to a mail server or gateway
3 4db31855 2006-02-12 devnull # for delivery. we assume the mail server handles incoming messages.
4 4db31855 2006-02-12 devnull #
5 4db31855 2006-02-12 devnull # by default the return address points to this system; set $site
6 4db31855 2006-02-12 devnull # to the name of the mail server that receives your mail.
7 4db31855 2006-02-12 devnull #
8 4db31855 2006-02-12 devnull # replace YOURDOMAIN.DOM with the name of your domain.
9 4db31855 2006-02-12 devnull #
10 4db31855 2006-02-12 devnull # in the last rule, $smtp is the name of the mail server. set it
11 4db31855 2006-02-12 devnull # in the DNS database in $PLAN9/lib/ndb (see ndb(7)).
12 4db31855 2006-02-12 devnull
13 4db31855 2006-02-12 devnull # translate local aliases from /mail/lib/namefiles
14 4db31855 2006-02-12 devnull [^!@.]+ translate "$PLAN9/bin/upas/aliasmail '&'"
15 4db31855 2006-02-12 devnull
16 4db31855 2006-02-12 devnull # append the local domain to addresses without a domain
17 cbeb0b26 2006-04-01 devnull local!(.*) alias \1@swtch.com
18 4db31855 2006-02-12 devnull
19 4db31855 2006-02-12 devnull # convert source domain address to a chain a@b@c@d...
20 4db31855 2006-02-12 devnull @([^@!,]*):([^!@]*)@([^!]*) alias \2@\3@\1
21 4db31855 2006-02-12 devnull @([^@!]*),@([^!@,]*):([^!@]*)@([^!]*) alias @\1:\3@\4@\2
22 4db31855 2006-02-12 devnull
23 4db31855 2006-02-12 devnull # convert a chain a@b@c@d... to ...d!c!b!a
24 4db31855 2006-02-12 devnull ([^@]+)@([^@]+)@(.+) alias \2!\1@\3
25 4db31855 2006-02-12 devnull ([^@]+)@([^@]+) alias \2!\1
26 4db31855 2006-02-12 devnull
27 4db31855 2006-02-12 devnull # send all mail to the gateway or mail server, $smtp, for delivery
28 5885bf4c 2006-06-30 devnull ([^!]*)!(.*) | "$PLAN9/mail/lib/qmail '\s' 'YOUR.MAIL.GATEWAY'" "'\2@\1'"