Re: [Exim] many different domains to many different users - …

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Jez Hancock
Dátum:  
Címzett: exim-users
Tárgy: Re: [Exim] many different domains to many different users - how?
On Thu, Jan 29, 2004 at 09:46:41AM +0000, first last wrote:
> The way I do it is having two files ~exim/local_domains and
> ~exim/virtusertable.
>
> local_domains contains the list of the domains.
>
> virtusertable contains a list of the form:
> email@domain: user
> @domain: defaultuser
>
> and then two rules in the configure file, one to match email@domain and
> the second to match@domain (I know that it can be done with just one
> but most of them will match the first one anyway, so it will save a
> lil' time).
>
> I can't send you the parts of the configuration file at the moment, as
> I am at work, but if you want to send me an email and I'll send it
> directly to you (or to the list if people prefer it).

I'm doing something similar - fwiw the config is below:

# near the top of exim configure file:
domainlist local_domains = @ : /etc/mail/local-host-names

# then in the router after 'dnslookup' default section:
#############################################################################
# Taken from:
# http://www.exim.org/exim-html-4.00/doc/html/spec_41.html#IX1723
#############################################################################
  virtual:
    driver = redirect
    domains = dsearch;/etc/mail/virtual
    data = ${lookup{$local_part}lsearch*{/etc/mail/virtual/$domain}}
    no_more


# system_aliases default router / other router configs here

In this way all the domains I handle mail for go into
/etc/mail/local-host-names, one per line and then the 'virtual alias'
file for each domain is contained in /etc/mail/virtual/.

ie:

/etc/mail/virtual/example1.com might look like:

# mail for john@??? delivered to local user 'john':
john:john
# mail for foo@??? delivered to foo@???:
foo:foo@???

# a catchall, all mail with no other alias for example1.com delivered to
# john
*:john

I then make sure that the virtual alias files are owned by there
respective domain admins and create a symlink to the alias files within
the user's home dir (just to make life a little easier for them).

HTH :P

--
Jez Hancock
- System Administrator / PHP Developer

http://munk.nu/
http://jez.hancock-family.com/  - Another FreeBSD Diary
http://ipfwstats.sf.net/        - ipfw peruser traffic logging