On 2014-05-05, [email protected] <[email protected]> wrote:
>   
>
>> On 2014-04-28, [email protected] [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}{@}{+}}


-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to