[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: route to address
> OK, then maybe allow a special case:
> @some.domain: email@example.com
> and do two lookups. This will cover the most popular case when the
> `owner' of the domain receives mail to firstname.lastname@example.org into a
> single mailbox.
Like this script ? (right after "$lcaddress" expansion in fqdnalias.cf)
I have not tried this yet, just did copy&paste from "$lcaddress" processing
plus couple edits.
# We may also match for: "@domain.name"
# Already expanded ? If yes, go away!
$(expansions "@$host") && return 1
# Yes, add to the expansions. Success ?
# Yes, Any success with filepriv from the alias db ?
# Yes, generate new privilege attribute for it. Success ?
# Yes, do the expansion! (echo .. | listexpand ...)
a="$(fqdnaliases "@$host")" &&
db add expansions "@$host" fqdnaliases &&
priv=$(filepriv -M 644 $MAILVAR/db/fqdnaliases \
$(db owner fqdnaliases)) &&
nattr=$(newattribute $A privilege $priv) &&
return $(echo "$a" | \
listexpand -e root \
-c 'fqdn-@alias expansion' \
-N - \
"$nattr" "$a" "$address")