Re: [exim] default domain for plain authentication

Page principale
Supprimer ce message
Répondre à ce message
Auteur: John W. Baxter
Date:  
À: exim-users
Sujet: Re: [exim] default domain for plain authentication
On 6/1/06 6:42 AM, "Pat Hastings" <pat.hastings@???> wrote:

> We currently have all our user details in ldap and use the following
> plain mechanism for authentication. This requires a full email address
> so that the domain can be worked out for the ldap.
>
> Can anyone suggest how I can modify it so that if just an userid is
> entered then a default domain will be appended eg user "me" would be
> come me@???.


We crafted our own LDAP lookup rather than using the ldapauth feature
(because we use a schema that differs from what ldapauth expects), and we
have a conditional part of the expansion which provides @example.com in the
case of a bare local part. (So our protection against empty address is a
little more complex as well.)

It should be possible to do much the same by complexifying your code a
little more, in the area of your mail=$quote_ldap:$2 clause. But it takes
me forever to get nested Exim conditionals right, and I'm not going to try
here.

mail=${if mumble}
etc.

--John