Re: [exim] Exim Virtual Domains

Góra strony
Delete this message
Reply to this message
Autor: Tony Finch
Data:  
Dla: Peter Savage
CC: exim-users
Temat: Re: [exim] Exim Virtual Domains
On Wed, 8 Dec 2004, Peter Savage wrote:

> I really want to use exim for virtual domains and have been pulling my
> hair out for about 2 weeks.


Our virtual domain system is based on an aliases file for each domain,
which is translated into a cdb file using a script. Each domain also has a
list of managers who are allowed to alter the aliases file, and who
receive postmaster email if they have not put a specific entry for
postmaster in the aliases file.

# routers before this handle remote domains and various special cases

domain_aliases:
  driver        = redirect
  domains        = +local_domains
  data            = ${lookup {$local_part} cdb {DOMAINS/db/${domain}.cdb} }
  check_ancestor
  forbid_blackhole
  forbid_file
  forbid_include
  forbid_pipe
  retry_use_local_part


# Ensure postmaster@ always works.

domain_postmaster:
  driver        = redirect
  domains        = +local_domains
  local_parts        = +postmasterish
  file            = DOMAINS/managers/${domain}
  check_ancestor
  forbid_blackhole
  forbid_file
  forbid_include
  forbid_pipe
  retry_use_local_part
  errors_to        = postmaster@???


# This router produces a nice error message for unknown users in any
# local domain other than lists.cam.ac.uk.

domain_error:
  driver        = redirect
  domains        = !lists.cam.ac.uk : +local_domains
  data            = :fail: \
    "${local_part}@${domain}" is not a known user on this system.
  allow_fail


# the rest of the routers handle lists.cam.ac.uk

Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}