Re: [Exim] SMTP authentication

Startseite
Nachricht löschen
Nachricht beantworten
Autor: James P. Roberts
Datum:  
To: exim-users
Betreff: Re: [Exim] SMTP authentication
>How could I perform the second question, meaning a plain text file,
>with per line a username and a password? I think it might be easier?


That's exactly what I do, though I plan to upgrade to MySQL,
eventually, for the speed.

By the way, I am using Exim 4.02, on a RH 7.1 server.
(yes, yes, I know 4.04 is out).

OK, first, create a file with username/password pairs.
I call mine "/etc/exim-users", for example:

user1 password1
user2 password2
...


Next, at the bottom of /etc/exim.conf, the following authenticators:

begin authenticators

plain:
driver = plaintext
public_name = PLAIN
server_condition = ${if
eq{$3}{${lookup{$2}lsearch{/etc/exim-users}{$value}fail}}{yes}{no}}
server_set_id = $2

login:
driver = plaintext
public_name = LOGIN
server_prompts = Username:: : Password::
server_condition = ${if
eq{$2}{${lookup{$1}lsearch{/etc/exim-users}{$value}fail}}{yes}{no}}
server_set_id = $1


And finally, I have the following at the end of "acl_smtp_rcpt" ACL:

  accept  authenticated = *
  deny    message = authentication required



I believe upgrading to MySQL for this would be a simple matter of
creating a MySQL table with the username/password pairs, and then
substituting a MySQL search for the lsearch used above. One of these
days I'm going to figure out exactly how to do that! If anybody already
has, and can save me the hour or two to figure it out myself, please let
me know. Thanks!

Jim Roberts
Punster Productions, Inc.