Re: [exim] How to do SMTP authentication for multiple users?

Top Page
Delete this message
Reply to this message
Author: W B Hacker
Date:  
To: exim users
Subject: Re: [exim] How to do SMTP authentication for multiple users?
Leonardo wrote:
> Hi all,
>
> I'm configuring Exim for the first time and I'd like to set it up so
> users 'joe', 'jane', and 'nick', are able to access the SMTP server
> with password 'abcd1234'.
>
> The following in exim.conf does not work -- apparently I am unable to
> have Exim accept regexps:
>
> fixed_login:
>     driver = plaintext
>     public_name = LOGIN
>     server_prompts = User Name : Password
>     server_condition = \
>         ${if and {{eq{$1}{joe|jane|nick}}{eq{$2}{abcd1234}}}{yes}{no}}
>     server_set_id = $1

>
> This does not work either:
>
>         ${if and {{match{$1}{joe|jane|nick}}{eq{$2}{abcd1234}}}{yes}{no}}

>
> Only specifying a single name seems to work. However, I prefer not to
> have all users authenticate with a single login:
>
>         ${if and {{eq{$1}{joe}}{eq{$2}{abcd1234}}}{yes}{no}}      # this works

>
> Apologies if this is a stupid question, but I've perused the docs,
> searched on Google, looked up the FAQ and tried any other possible
> syntax, and still cannot manage it to work. I feel there's something
> obvious escaping me, but I cannot grasp what it is.
> Thanks in advance,
>
> L.
>


There is probably a way to make it work, but that is not ordinarily the way it
is done.

You don't need (and probably should not have) the *specifics* of either UID:PWD
actually hard-coded into the AUTHENTICATOR acl in your /configure file at all.

Better to have Exim look them up from an externally-managed place that is 'known
to be' the repository of secrets.

That 'place' may be wherever and whatever you WANT it to be, so long as Exim has
'read' access.

In *that* place - whatever and wherever it may be - simply set all three to have
the same password.

Or (better yet) NOT.

HTH,

Bill