[exim] check_local_user; other option equivalence?

Inizio della pagina
Delete this message
Reply to this message
Autore: Matthew Newton
Data:  
To: exim-users
Oggetto: [exim] check_local_user; other option equivalence?
Hi,

I'm reworking my home exim config, and have a lookup file that contains
"local_part: username" pairs. The router that delivers to local users
can't use "check_local_user" because the local_part is not a user; the
looked up value is.

Can I...

a) Use a combination of "user =", "transport_home_directory =", etc.
options to exactly simulate the check_local_user option;

or should I...

b) Redirect these addresses to an unused local subdomain that I don't
route incoming mail for, i.e. "local_part"@??? is redirected to
"username"@???, allowing me to use
check_local_user on the special router that handles localusers.mydomain?

I'd prefer (a) if possible (assuming not too many options have to be
set) as it reduces the number of routers, but maybe it isn't correctly
possible to do without using (b)?

I currently have the following that seems to work, but of course it 1)
assumes that the user in local_part_data _is_ a real user and 2) assumes
that all home directories are /home/$username. The match stuff is
because the looked up username can have options after it.

# $local_part_data could be, for example, "matthew control=noauto"
user = ${if match {$local_part_data}{\N^([^\s]+)\N}{$1}{$local_part_data}}

  transport_home_directory = /home/${if match {$local_part_data}\
                             {\N^([^\s]+)\N}{$1}{$local_part_data}}


(For those interested, I'm building a config that looks up data for all
my domains in a control file, and handles mail accordingly. This allows
different aliases files or local_part->username lookups to be easily set per
domain, externally to the exim config file.)

Thanks!

Matthew


--
Matthew Newton <mcn4@???>

UNIX and e-mail Systems Administrator, Network Support Section,
Computer Centre, University of Leicester,
Leicester LE1 7RH, United Kingdom