Re: [Exim] Virtual Domains Done Right

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Nigel Metheringham
Date:  
À: Marc Perkel
CC: Philip Hazel, exim-users
Sujet: Re: [Exim] Virtual Domains Done Right
On Tue, 2001-10-02 at 15:10, Marc Perkel wrote:
> That might explain your lack of support in Exim for what I call virtual domains.


The great thing about open source is you can fix what you see as bugs.
I must admit I feel that this virtual domain system is best described as
horrid.

[...]
> Now I have it working with exim, but
> I've had to use a lot of tricks that would be much easier if you had a few new
> features, like the ability to specify an alternate passwd file.


The localuser director is purely an interface to the getpwnam calls.
You want to use alternative user databases, you do not do this by
corrupting the getpwnam stack.


>
> By specifying and alternate passwd file exim would automatically know if the
> virtual local user exists, what their home directory is. Their UID and GID. Where
> to look for the .forward files. All the stuff I had to do the hard way. You
> program probably has hard coded to look for only /etc/passwd. If you had a
> variable to set that allowed the location of the /etc/passwd file to me moved to
> something like /etc/vmail/passwd.$domain then my work would have been much
> easier.


Ever considered

vdomain_localuser:
  driver = smartuser
  condition = ${lookup{$local_part}lsearch{ \
    /etc/vmail/passwd.$domain}{$value}}
  transport = vdomain_deliver


if you need a uid, then thats something like
  ${extract{3}{:}{${lookup{$local_part}lsearch{ \
    /etc/vmail/passwd.$domain}{$value}}}


That gives you everything you need without having to write additional
directors that are hard wired to your applications (because a decent
system would have done this with a database anyhow).

If you really want this stuff hard wired in, then get out your editor,
write the code and submit it... I doubt it would be accepted because you
can do *all* of this without special features.

    Nigel.