Re: virtual domains under exim
On Wed, Jan 05, 2000 at 12:50:17AM +0100, Pere Camps wrote
> Hi!
>
> I'd like to setup a virtual domain with exim. So far I've managed
> to make it able to accept emails for the virtual domain, but it now sends
> the emails to the local users. I'll give an example:
>
> The machine is named machine.org and has tons of local users that
> receive email to user@machine.org.
>
> So far I've managed to make exim accept emails for virtual.org.
> Exim now sends these emails to user@machine.org (without rewriting
> headers, it just puts them in the /var/spool/mail/$USER).
>
> I've done this with the local_domains seting.
>
> Now I want to make exim send all the mail for virtual.org to
> specific_user@machine.org. A nice plus will be to have an independent
> aliases file for this domain.
>
> Is there an easy way to do this? Can anybody who has done it
> before please send me his exim.conf file and any other appropiate files?
>
> Thank you very much!
I use lookup files for virtual domains.
My local_domains setting:
local_domains = \
my.net.au:*.my.net.au:localhost:partial3-lsearch;/etc/exim/clients/domains
Each of my directors has a domains= line for my "real" domains; e.g.
userforward:
driver = forwardfile
domains = localhost:my.net.au:*.my.net.au
no_verify
check_ancestor
file = .forward
filter
I have a custom driver at the end of the Directors section, that
looks up what to do with virtual domains:
#
# This driver handles our virtual domains. It is
# last, to avoid unnecessary file lookups for real
# local addresses; this is why all of the above
# directors have a "domains = " line.
virtual:
driver = aliasfile
except_domains = localhost:my.met.au:*.my.net.au
domains = partial3-lsearch;/etc/exim/clients/domains
no_more
file = /etc/exim/clients/$domain_data
search_type = lsearch*
/etc/exim/clients/domains contains stuff like this:
*.v-domain1.com.au: file1
*.v-domain2.com.au: file2
*.v-domain3.com.au: file3
/etc/exim/clients/file{1,2,3} contain stuff like:
*: user1@mail.my.net.au
The file /etc/exim/clients/domains just relates virtual domains
to other files in /etc/exim/clients/, and allows exim to verify
that a specified domain is a local_domain; the other files in
/etc/exim/clients, one per virtual domain, act as an aliases
file for the virtual domain (and can be much more complex than
the default shown here). Testing delivery in the example
above produces:
# /usr/sbin/exim -bt anyone@anyhost.v-domain1.com.au
user1@mail.my.net.au
<-- anyone@anyhost.v-domain1.com.au
deliver to user1 in domain mail.my.net.au
director = localuser, transport = local_delivery
HTH,
John P.
--
huiac@camtech.net.au
john@huiac.apana.org.au
"Oh - I - you know - my job is to fear everything." - Bill Gates in Denmark
Reply to: