On Wed, Jul 05, 2000 at 09:11:37PM +0200, Ron Rademaker wrote > How can I use multiple domains with exim, eg both the domains domain.com > and otherdomain.com run on a machine and I want this: > > [EMAIL PROTECTED] to user foo > [EMAIL PROTECTED] to user bar > [EMAIL PROTECTED] to user hello > [EMAIL PROTECTED] to user bar >
Here's how I do it. The virtual hosts (www.mydomain.com, mail.mydomain.com) all have 'A' records pointing to my mail/web server; CNAME records don't work as well, because stupid mail programs/systems put the CNAME host in the envelope. My exim.conf contains (all single lines, however your mail client displays them): Main section: local_domains = localhost:my.net.au:*.my.net.au:partial3-lsearch;/etc/exim/clients/domains Directors: A new director, to handle the virtual hosts: 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* All other directors have a line like domains = localhost:my.net.au:*.my.net.au so that they aren't applied to the virtual hosts. /etc/exim/clients/domains contains lines like *.mydomain.com.au: mydomain The second field is just an identifier, and for each identifier there is another file, e.g., /etc/exim/clients/mydomain, which works like a regular alias file, e.g.: *: [EMAIL PROTECTED] This setup is for virtual domains with three parts in their domain name (e.g., *.mydomain.com.au); minor adjustment is required if you use "American" style domains (e.g., *.somewhere.com), and you can mix them easily enough (with a longer local_domains line and a further director). HTH, John P. -- [EMAIL PROTECTED] [EMAIL PROTECTED] http://www.mdt.net.au/~john Debian Linux admin & support:technical services