[Dovecot] CRAM-MD5 and proxy_maybe

David Jonas djonas at vitalwerks.com
Wed Nov 19 20:14:27 EET 2008


When using proxy_maybe CRAM-MD5 authentication fails when the connection
is proxied. Is this expected behavior? Is proxy_maybe too simplified for
this case?

We're using SQL so I could rewrite the query with IFs to fake
proxy_maybe and return the password as NULL and nologin as Y, but if it
works that way couldn't it work with proxy_maybe?

This works:

password_query = \
  SELECT NULL AS password, host, CONCAT(user,'@',domain) AS destuser \
    'Y' AS nologin, 'Y' AS nodelay, 'Y' AS proxy \
  FROM accounts WHERE class='pop' AND domain='%d'


This doesn't work if proxied and CRAM-MD5 auth:

password_query = \
  SELECT \
    CONCAT(user,'@',domain) AS user, password, \
    host, 'Y' AS proxy_maybe, \
    target AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \
  FROM accounts
  WHERE \
    class='pop' AND domain='%d' AND user='%n' \
  LIMIT 1


Thanks,

David


More information about the dovecot mailing list