Quoth Philip Hazel on Wed, Nov 24, 1999:
> On Wed, 24 Nov 1999, Spencer Rasmussen wrote:
> > new_address = ${lookup{$local_part@$domain}dbm{/etc/exim/domainaliases.db}{$value}{${lookup{$domain}dbm{/etc/exim/domainaliases.db}{$value}fail}}}
>
> driver = aliasfile
> qualify_preserve_domain <== if that's what you want
> include_domain <== important because you have domains in
> the file
> file = /etc/exim/domainaliases.db
> search_type = dbm
Philip's solution is excellent. However, if you insist to use
smartuser for some reason (like, say, you can't change the file
_at all_) and still want this functionality, you can set
new_address to something like:
new_address = "${lookup{$local_part@$domain}dbm{/etc/exim/domainaliases.db}\
{${if match{$value}{@}\
{$value}\
{$value@$domain}}}\
{${lookup{$domain}dbm{/etc/exim/domainaliases.db}\
{${if match{$value}{@}\
{$value}\
{$value@$domain}}}\
fail}}}"
(Lines broken too much for readability.)
Or you can use Philip's aliasfile director and add a smartuser
director looking up domain only after it.
Vadik.
--
The reader this message encounters not failing to understand is
cursed.