Re: [EXIM] new user question

Top Page
Delete this message
Reply to this message
Author: Jeffrey Goldberg
Date: 1998-11-15 19:54 -000
To: Adam M Donahue
CC: exim-users
Subject: Re: [EXIM] new user question
On Sat, 14 Nov 1998, Adam M Donahue wrote:

> I host a number of virtual domains. For example, metainc.com. Now, what
> I'd like is for mail to selected recipients to metainc.com to be forwarded
> to other addresses. bob@??? would go to bob@???, for
> instance. wrongaddress@??? would be bounced (for now; perhaps in
> the future the customer will want all mail). Here's what I've set up to
> handle this:
>
> virtual_specific:
> driver = smartuser
> new_director = system_aliases
> domains = "lsearch;/etc/aliases.virtual"
> new_address = ${lookup{$local_part@$domain}lsearch{/etc/aliases.virtual}
> {$value} fail}
>
> virtual_default:
> driver = smartuser
> new_director = system_aliases
> domains = "lsearch;/etc/aliases.virtual"
> new_address = ${lookup{$domain}lsearch{/etc/aliases.virtual} {$value}
> fail}
>
> The aliases.virtual file contains lines like:
>
> metainc.com:        /dev/null
> bob@???:    bob@???
> adam@???:    adam@???


Hmm. I haven't really done much with virtual domains, so others will
probably have more experienced advice to give, but wouldn't it make more
sense to have an alias file per-domain. What I write below is untested
and is being written WITHOUT the documentation. So I probably have all of
the option names wrong and several other bugs.

# A director, probably relatively early in the list of directors.

virtual_aliases:
domains = lsearch;DIR/virtual.domains
driver = aliasfile
file = DIR/{$domain}-aliases


The file virtual.domains would just list domain names.

metainc.com
foo.bar.com
whatever.org

and then you would have an aliases file for each, so the file

metainc.com-aliases

would contain

  bob@???:    bob@???
  adam@???:    adam@???


Again, note that I probably have the details wrong. But I think that the
over all strategy will give you a more robust system that is easier to
maintain.

-j
--
Jeffrey Goldberg                +44 (0)1234 750 111 x 2826
 Cranfield Computer Centre      FAX         751 814
 J.Goldberg@???     http://WWW.Cranfield.ac.uk/public/cc/cc047/
Relativism is the triumph of authority over truth, convention over justice.



--
*** Exim information can be found at http://www.exim.org/ ***