Mailing List Archive

Converting from sendmail, searching aliases in a unified namespace, pre-lookup key xformation (resend)
Any ideas here? Anyone?

---------Included Message----------
In the Majordomo 2 integration with sendmail, per-domain virtusertables
and alias files are used, to change
foo@lists.bar.com
into
foo-lists.bar.com
for lookup (because the namespace is non-partitioned).

Given the Exim 3 director

majordomo_aliases:
driver = aliasfile
pipe_transport = address_pipe
suffix = "+*"
suffix_optional
user = lists
group = lists
domains = lsearch;/war/lists/ALIASES/mj-domains
file = /war/lists/ALIASES/mj-alias-${domain}
search_type = lsearch

..is there any way to transform the key used in the lookup first from
KEY
to
KEY-DOMAIN
so I don't need to recreate all my files yet?
Re: Converting from sendmail, searching aliases in a unified namespace, pre-lookup key xformation (resend) [ In reply to ]
On Thu, 6 Jun 2002, Roger B.A. Klorese wrote:

> majordomo_aliases:
> driver = aliasfile
> pipe_transport = address_pipe
> suffix = "+*"
> suffix_optional
> user = lists
> group = lists
> domains = lsearch;/war/lists/ALIASES/mj-domains
> file = /war/lists/ALIASES/mj-alias-${domain}
> search_type = lsearch
>
> ..is there any way to transform the key used in the lookup first from
> KEY
> to
> KEY-DOMAIN
> so I don't need to recreate all my files yet?

This is from the hip. This or something similar would work, but I might
not have everything right.

majordomo_aliases:
driver = forwardfile
pipe_transport = address_pipe
suffix = "+*"
suffix_optional
user = lists
group = lists
domains = lsearch;/war/lists/ALIASES/mj-domains
#file = /war/lists/ALIASES/mj-alias-${domain}
#search_type = lsearch
data = \
${lookup{"${local_part}-${domain}"}\
lsearch{/war/lists/ALIASES/mj-alias-${domain}}\
{$value}{}\
}
condition = \
${if eq\
{\
${lookup{"${local_part}-${domain}"}\
lsearch{/war/lists/ALIASES/mj-alias-${domain}}\
{$value}{}\
}
}{}{no}{yes}\ }

--john