Re: [exim] SMTP-AUTH problem

Top Page
Delete this message
Reply to this message
Author: Phil Pennock
Date:  
To: Ian Roberts
CC: exim-users
Subject: Re: [exim] SMTP-AUTH problem
On 2008-07-09 at 12:29 +0100, Ian Roberts wrote:
> I have a slight problem, my users are in Ldap, and smtp auth is
> working correctly. BUT, we have some code running on remote systems
> that we have no access to, trying to supply the username as the full
> email address of the account instead of just the givename.
>
> How can I edit my authenticator in exim4 to allow both "user" and "user@???
> " as the supplied username?


The ${local_part:...} expansion operator will strip out a domain if
present.

> pam_plain:
>      driver = plaintext
>      public_name = PLAIN
>      server_condition = "${if pam{$2:$3}{1}{0}}"
>      server_set_id = $2
>      server_prompts = :


Note that since Exim 4.61, the relevant data is placed in $auth1,
$auth2 and $auth3; the old $1/$2/$3 are still set but will be reset if
you do some string expansions which also use those variables, which
leads to hard-to-spot configuration bugs.

So, here, $2 should become ${local_part:$auth2} both times. (And $3 to
$auth3).

In the pam_login authenticator, $1 -> ${local_part:$auth1} and so on.

-Phil