Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#
2
#	sample rewrite file for systems that send and receive mail directly.
3
#
4
#	by default, the return address points to this system; if you have multiple systems
5
#	and don't want them all to be mail recipients, set $site to a generic
6
#	name (e.g., plan9) or system name in /rc/bin/termrc and /rc/bin/cpurc
7
#	and put an MX DNS record in /lib/ndb to point to that system.
8
#
9
#	replace YOURDOMAIN.DOM in the following rules with your domain name.
10
 
11
# translate local aliases from /mail/lib/namefiles
12
\"(.+)\"		translate	"/bin/upas/aliasmail '\1'"
13
[^!@.]+			translate	"/bin/upas/aliasmail '&'"
14
 
15
# deliver mail without a domain locally
16
local!"(.+)"		>>		/mail/box/\1/mbox
17
local!(.*)		>>		/mail/box/\1/mbox
18
 
19
# your local names
20
\l!(.*)					alias		\1
21
\l\.YOURDOMAIN\.DOM!(.*)		alias		\1
22
 
23
# convert source domain address to a chain a@b@c@d...
24
@([^@!,]*):([^!@]*)@([^!]*)		alias	\2@\3@\1
25
@([^@!]*),@([^!@,]*):([^!@]*)@([^!]*)	alias	@\1:\3@\4@\2
26
 
27
# convert a chain a@b@c@d... to ...d!c!b!a
28
([^@]+)@([^@]+)@(.+)	alias		\2!\1@\3
29
([^@]+)@([^@]+)		alias		\2!\1
30
 
31
# queue all mail for delivery
32
([^!]*)!(.*) 		| 		"/mail/lib/qmail '\s' 'net!\1'" "'\2'"