# case conversion for postmaster
pOsTmAsTeR		alias		postmaster

# translate local aliases from /mail/lib/namefiles
[^!@.]+			translate		"$PLAN9/bin/upas/aliasmail '&'"

# deliver without a domain locally
# to folder ... 
# (the folder delivery will fail with "no such user" if the folder doesn't exist.)
local!([^+])\+([^+]+)		>>		$PLAN9/mail/box/\1/\2
# or to mbox
local!(.*)			>>		$PLAN9/mail/box/\1/mbox

# your local names
\l!(.*)				alias		\1

# 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
([^!]*)!(.*) 		| 		"$PLAN9/mail/lib/qmail '\s' 'net!\1'" "'\2'"
