Re: [exim] Authentication using + separator

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Jasen Betts
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Authentication using + separator
On 2014-05-05, mtrainer@??? <mtrainer@???> wrote:
>
>
>> On 2014-04-28, mtrainer@??? [1] wrote:
>>
>>> Hi All, I
> am migrating users from a CPanel system and have users that authenticate
> using user+domain instead of the usual user@domain format. How do I
> support using both the '+" and '@' separators in Exim?
>>
>> put users in
> the database with both forms of
>> username or use like
> ${sg{$username}{@}{+}}
>> in place of $username to translate the one
>>
>> form to the other.
>>
>> (none of the authenticators use $username
>
> auth_plain:
> driver = plaintext


try this:

public_name = PLAIN
server_condition = ${if ldapauth { user="${lookup
ldapdn{ LDAPS/LDAPBASE?dn?sub?(mail=$1)}}" pass=${quote:$2}
LDAPS/}{yes}{no}}

 server_condition = ${if ldapauth { user="${lookup \
    ldapdn{ LDAPS/LDAPBASE?dn?sub?(mail=${sg{$1}{@}{+}})}}" \
    pass=${quote:$2}LDAPS/}{yes}{no}}
 server_prompts = :
 server_set_id = ${sg{$1}{@}{+}}


> auth_login:
> driver = plaintext
> public_name = LOGIN


 server_condition = ${if ldapauth { user="${lookup ldapdn{ \
    LDAPS/LDAPBASE?dn?sub?(mail=${sg{$1}{@}{+}})}}" pass=${quote:$2} \
    LDAPS/}{yes}{no}}
 server_prompts = Username:: : Password::
 server_set_id = ${sg{$1}{@}{+}}