Jason wrote...
> The idea is so that for example in /etc/passwd
> I could have
> d1.user1:password:---
> d2-user2:password:---
> d3xuser3:password:---
>
> And when email comes in all it needs to do is come in for
> user1@???, and it would go to d1.user1, without having
> to create an alias for each and every user, for example I have about
> 10 domains here, 3 of which have to have unique users, the other 7
> are global in that a user can be sent an email to any of the
> domains with the same username and it goes to the same person.
The 7 global domains can simply be configured into local_domains and
your work is done. The other three can be handled with a different
director and a file containing a table which maps each domain to a prefix.
For example...
virtuals:
driver = smartuser
domains = lsearch;/etc/virtmap
new_address = ${lookup {${domain}} lsearch {/etc/virtmap} {$value}}${local_part}
no_more
Where /etc/virtmap might contain...
domain1.com d1-
domain2.net d2.
domain3.org d3_
Doesn't that do what you're looking for?
--
Pete Naylor