[Vmail-discuss] smtp auth again

Litzler Mihaly lici at hit.hu
Wed, 9 Nov 2005 15:48:41 +0100 (CET)


Hi!

Thanks for quick answer!

I created a test user:

mysql> select * from popbox where local_part='litzlerm';
+-------------+------------+-------------------+-----------+-------+
| domain_name | local_part | password_hash     | mbox_name | quota |
+-------------+------------+-------------------+-----------+-------+
| hit.hu      | litzlerm   | {plaintext}i27j3u | litzlerm  | 10M   |
+-------------+------------+-------------------+-----------+-------+
1 row in set (0.00 sec)

mysql>

This is in my exim.conf:

### CONFIG PART1

begin acl
acl_check_rcpt:
  accept  hosts = :
  deny  hosts = ${lookup mysql{select deny_host_address from
deny_host_address \
                            where deny_host_address =
'$sender_host_address'}}

  deny    local_parts   = ^.*[@%!/|]

  deny sender_domains = +deny_domain
  deny senders = +deny_email

  accept  local_parts   = postmaster
          domains       = +local_domains

#  require verify        = sender

  accept  domains       = +local_domains
  accept  domains       = +relay_to_domains
  accept  hosts         = +relay_from_hosts
  accept  authenticated = *
  deny    message       = relay not permitted

### CONFIG PART 2

begin authenticators

vmail_plain:
        driver = plaintext
        public_name = PLAIN
        server_prompts = :
        server_condition = ${if and{ {!eq {$2}{}} {!eq {$3}{}} {eq
{1}{${lookup mysql{select count(*) from popbox where
concat(local_part,'@',domain_name) =   '$2' and
password_hash=md5('$3')}}}}}{yes}{no}}

vmail_cram:
        driver = cram_md5
        public_name = CRAM-MD5
        server_secret = ${lookup mysql{select clearpw from popbox where
concat(local_part,'@',domain_name) = '$1'} {$value}fail }
        server_set_id = $1

vmail_login:
        driver = plaintext
        public_name = LOGIN
        server_prompts = "Username:: : Password::"
        server_condition = ${if eq {1}{${lookup mysql{select count(*) from
popbox where concat(local_part,'@',domain_name) = '$1' and
password_hash=md5('$2')}}}{yes}{no}}
        server_set_id = $1
# End of Exim configuration file

I tried to simply log on via outlook express but I have got an error
message, in exim mainlog I can see this:

2005-11-09 15:41:40 vmail_login authenticator failed for live0.hit.hu
(live0) [195.56.65.65]: 535 Incorrect authentication data
set_id=litzlerm@hit.hu)


I can see in the config there is an md5 function in the sql query, but I
don't use md5 in mysql for storing the passwords, as you can see in the
first part of the email.

What could be the problem?

Thanks in advance!

Mihaly


ps: sorry for long mail