rewrite.direct: rewrite aliases before delivering to local users to avoid re-sending the message
This commit is contained in:
parent
8cafbf3184
commit
275b5e2fb3
1 changed files with 4 additions and 4 deletions
8
sys/lib/dist/mail/lib/rewrite.direct
vendored
8
sys/lib/dist/mail/lib/rewrite.direct
vendored
|
@ -12,14 +12,14 @@
|
||||||
\"(.+)\" translate "/bin/upas/aliasmail '\1'"
|
\"(.+)\" translate "/bin/upas/aliasmail '\1'"
|
||||||
[^!@.]+ translate "/bin/upas/aliasmail '&'"
|
[^!@.]+ translate "/bin/upas/aliasmail '&'"
|
||||||
|
|
||||||
# deliver mail without a domain locally
|
|
||||||
local!"(.+)" >> /mail/box/\1/mbox
|
|
||||||
local!(.*) >> /mail/box/\1/mbox
|
|
||||||
|
|
||||||
# your local names
|
# your local names
|
||||||
\l!(.*) alias \1
|
\l!(.*) alias \1
|
||||||
\l\.YOURDOMAIN\.DOM!(.*) 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...
|
# convert source domain address to a chain a@b@c@d...
|
||||||
@([^@!,]*):([^!@]*)@([^!]*) alias \2@\3@\1
|
@([^@!,]*):([^!@]*)@([^!]*) alias \2@\3@\1
|
||||||
@([^@!]*),@([^!@,]*):([^!@]*)@([^!]*) alias @\1:\3@\4@\2
|
@([^@!]*),@([^!@,]*):([^!@]*)@([^!]*) alias @\1:\3@\4@\2
|
||||||
|
|
Loading…
Reference in a new issue