[Dovecot] [help]how to config the dovecot authentication by the other servers

wuwei wuweiwwd at sina.com
Mon Dec 23 13:30:51 EET 2013


hi
    i am the postfix+dovecot.for example,there are three servers:
       server 1 for postfix
       server 2 for dovecot
       server 3 for auth server
    how could i let the dovecot(2.29) authenticated by the other servers?
       i config the postfix auth-type to dovecot.how could i config the
dovecot authenticated by the server 3 with tcp/ip socket?or is there are any
samples?i have found in http://wiki2.dovecot.org/.
       *at first i try to use memcached ,these are the configure:*
      *./dovecot-dict-auth.conf.ext*
            uri = memcached:host=172.24.140.252:port=12000
            password_key = dovecot/passdb/%u        
            user_key = dovecot/userdb/%u
            value_format = json
            iterate_disable = yes
            default_pass_scheme = plain
     * ./10-auth.conf*
            auth_mechanisms = plain login
            !include auth-dict.conf.ext
      *./auth-dict.conf.ext*
            passdb {
                  driver = dict
                  args =
/usr/local/dovecot/etc/dovecot/dovecot-dict-auth.conf.ext
            }

            userdb {
                  driver = prefetch
                  #args = /etc/dovecot/dovecot-dict-auth.conf.ext
            }
       *in memcached i put some data in:*
set dovecot/passdb/test at test.com 0 0 103
{'uid':'123','gid':'123','home':'/home/username','username':'test at test.com','password':'test at test.com'}
STORED
set dovecot/passdb/test 0 0 103
{'uid':'123','gid':'123','home':'/home/username','username':'test at test.com','password':'test at test.com'}
STORED
set test 0 0 103
{'uid':'123','gid':'123','home':'/home/username','username':'test at test.com','password':'test at test.com'}
STORED
set test at test.com 0 0 103
{'uid':'123','gid':'123','home':'/home/username','username':'test at test.com','password':'test at test.com'}
STORED

       i reload dovecot and postfix.postfix connect to dovect is ok!i open
the debug log .the memcached tell that it has received a connection.and the
dovecot also said has connect to the memcached ,but after 30s,the connect to
the memcached auto broken by out of time.here some logs:
      * dovcot logs:*
Dec 23 16:45:57 auth: Debug: Loading modules from directory:
/usr/local/lib/dovecot/auth
Dec 23 16:45:57 auth: Debug: Read auth token secret from
/usr/local/dovecot/var/run/dovecot/auth-token-secret.dat
Dec 23 16:45:57 auth: Debug: auth client connected (pid=0)
Dec 23 16:46:08 auth: Debug: client in: AUTH    1       login   service=smtp   
nologin lip=172.24.140.228      rip=192.168.3.29
Dec 23 16:46:08 auth: Debug: client passdb out: CONT    1       VXNlcm5hbWU6
Dec 23 16:46:22 auth: Debug: client in: CONT    1      
OTY1ZWI3MmM5MmE1NDlkZA== (previous base64 data may contain sensitive data)
Dec 23 16:46:22 auth: Debug: client passdb out: CONT    1       UGFzc3dvcmQ6
Dec 23 16:46:39 auth: Debug: client in: CONT    1      
OTY1ZWI3MmM5MmE1NDlkZA== (previous base64 data may contain sensitive data)
Dec 23 16:46:39 auth-worker(27884): Debug: Loading modules from directory:
/usr/local/lib/dovecot/auth
Dec 23 16:46:39 auth-worker(27884): Debug:
dict(965eb72c92a549dd,192.168.3.29): lookup
shared/dovecot/passdb/965eb72c92a549dd
Dec 23 16:47:11 auth: Debug: client passdb out: FAIL    1      
user=965eb72c92a549dd   temp
Dec 23 16:47:09 debian228 dovecot: auth-worker(27884): Error: memcached:
Lookup timed out in 30.000 secs
Dec 23 16:47:09 debian228 dovecot: auth-worker(27884): Error:
dict(965eb72c92a549dd,192.168.3.29): Lookup failed
       
       i don't know why it happened.and why it look up key with prefix
"shared/".until now i found that the key is password
"965eb72c92a549dd"(password is the same as username before).what will
happened if there two people with the same password.it seams that i should
use the userdb!
       is someone could give me a sample?what could i do if there has two or
more memcached servers?so ,i think of that if there has some config to
connect to  the tcp socket server.and the server implement by java or any
other language by the developer itself.
       thank you for you help!
       
            



--
View this message in context: http://dovecot.2317879.n4.nabble.com/help-how-to-config-the-dovecot-authentication-by-the-other-servers-tp46078.html
Sent from the Dovecot mailing list archive at Nabble.com.


More information about the dovecot mailing list