Re: [Exim] Virtualhosting

Top Page
Delete this message
Reply to this message
Author: Nico Erfurth
Date:  
To: Søren Hansen, exim-users
Subject: Re: [Exim] Virtualhosting
Søren Hansen wrote:
> --
> I've previously asked how to "emulate" qmails behaviour regarding
> virtualhosting (/var/qmail/control/virtualdomains and .qmail-foo), but I
> now have to option to move everything over to exim, and the number of
> hosted domains are relatively small, so going from one idiom to another
> would be feasible, so I'd like to hear how virtualhosting is usually
> accomplished using Exim.. Different scenarios and different solutions
> would be very welcome..


There are TOO many possibilities, to make it ;)
i.e. you can have aliasstyle-file for every domain, that redirects the
mails to a local unix-user, or to some special directory, like
/var/imap/$domain/$local_part or you can save everything in a
mysql-database, or LDAP, or nearly everything you want, with exim4 and
some domains i would prefer a way like this


/etc/exim/domains/ contains one file per domain, you can use dsearch to
find out wich domain you have to handle,
domainlist local_domains = @:dsearch;/etc/exim/domains

and lsearch (or some db-type) to search the file for the needed data

virtual_user:
driver = redirect
required_files = /etc/exim/domains/$domain
data = ${lookup {$local_part} lsearch* {/etc/exim/domains/$domain}}


the domain files should look like this:

user1: systemusername1
user4: systemusername5
*: systemusername6

where systemusernameX is the name of a REAL account on the machine.

This should give you some pointers for a small setup

ciao