rewrite.direct: rewrite aliases before delivering to local users to avoid re-sending the message

This commit is contained in:
stanley lieber 2013-01-18 21:47:49 -06:00
parent 8cafbf3184
commit 275b5e2fb3

View file

@ -12,14 +12,14 @@
\"(.+)\" translate "/bin/upas/aliasmail '\1'"
[^!@.]+ translate "/bin/upas/aliasmail '&'"
# deliver mail without a domain locally
local!"(.+)" >> /mail/box/\1/mbox
local!(.*) >> /mail/box/\1/mbox
# your local names
\l!(.*) alias \1
\l\.YOURDOMAIN\.DOM!(.*) alias \1
# deliver mail without a domain locally
local!"(.+)" >> /mail/box/\1/mbox
local!(.*) >> /mail/box/\1/mbox
# convert source domain address to a chain a@b@c@d...
@([^@!,]*):([^!@]*)@([^!]*) alias \2@\3@\1
@([^@!]*),@([^!@,]*):([^!@]*)@([^!]*) alias @\1:\3@\4@\2