hi  :

i just install dovecot-2 and start ok  but login failed  for test-user . i turn 
on all debug options  , the debug info follow:

 

"Mar 25 14:40:10 cs2c dovecot: imap-login: Disconnected (auth failed, 1 
attempts): user=<q...@t.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, 
secured"

 

 and  the info of input->w_buffer is : cp01 CAPABILITY a001 LOGIN "q...@t.com" 
"q1q1q1q1"

 

 the auth of dovecot.conf:

>>>>>>>>>>>>>>>>>>>>>

passdb {
  args = /etc/dovecot.master
  driver = passwd-file
  master = yes
  pass = yes
}
passdb {
  args = /etc/dovecot-memcached.conf
  driver = dict
} 

 

userdb {
  args = /etc/dovecot-memcached.conf
  driver = dict
}

 

[root@cs2c log]# telnet 127.0.0.1 11211
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
get q1@t.com_imap
VALUE q1@t.com_imap 0 205
{"username":"q...@t.com","password":"{CRYPT}$1$d5ef98b7$brWKOJiUiqII3DysGzsfl\/","home":"\/test\/mail","mail":"maildir:\/t.com\/q...@t.com","quota_rule2":"*:messages=11111","quota_rule":"*:bytes=11650727936"}
END

 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

 

The relevant code is:
>>>>>>>>>>>>>login-common/client-common.c<<<<<<<
bool client_read(struct client *client)
{       
        switch (i_stream_read(client->input)) {    //w_buffer:cp01 CAPABILITY 
a001 LOGIN "q...@t.com" "q1q1q1q1"
        case -2:
                /* buffer full */
                client_send_line(client, CLIENT_CMD_REPLY_BYE,
                                 "Input buffer full, aborting");
                client_destroy(client, "Disconnected: Input buffer full");
                return FALSE;
        case -1:        
                /* disconnected */
                client_destroy(client, "Disconnected");    //debug infomation
                return FALSE;            
        case 0:         
                /* nothing new read */
                return TRUE;
        default:        
                /* something was read */
                return TRUE;
        }               
}
            
>>>>>>>>>>imap-login/client.c<<<<<<<<<< 

 static void imap_client_input(struct client *client)
{
        struct imap_client *imap_client = (struct imap_client *)client;

        if (!client_read(client)) 
                return;
            
        client_ref(client);   
        o_stream_cork(imap_client->common.output);
        for (;;) {
                if (!auth_client_is_connected(auth_client)) {
                        /* we're not currently connected to auth process -
                           don't allow any commands */
                        client_send_line(client, CLIENT_CMD_REPLY_STATUS,
                                         AUTH_SERVER_WAITING_MSG);
                        if (client->to_auth_waiting != NULL)
                                timeout_remove(&client->to_auth_waiting);

                        client->input_blocked = TRUE;
                        break;
                } else {
                        if (!client_handle_input(imap_client))
                                break;
                }
        }
        o_stream_uncork(imap_client->common.output);
        client_unref(&client);
}

 

 

 

>>>>>>>>>>>>>>other-dovecot.conf>>>>>>>>>>>>>>>>>>>>>>>>>>>>

..........

protocols = pop3 imap
service auth {
  unix_listener /var/spool/postfix/dovecot-auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener auth-master {
    group = testmail
    mode = 0666
    user = testmail
  }
  user = testmail
}
service imap-login {
  service_count = 1
}
service imap {
  drop_priv_before_exec = no
  executable = /usr/libexec/dovecot/imap
}
service pop3-login {
  service_count = 1
}
service pop3 {
  drop_priv_before_exec = yes
  executable = /usr/libexec/dovecot/pop3
}
ssl_cert = </etc/pki/NSMail/SSL.cert
ssl_key = </etc/pki/NSMail/SSL.key

userdb {
  args = /etc/dovecot-memcached.conf
  driver = dict
}
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  log_path = /var/log/sieve.log
  mail_plugins = menc sieve quota acl expire
  postmaster_address = root
}
protocol imap {
  mail_plugins = quota imap_quota zlib mdec imap_acl acl autocreate expire
}
#protocol vipimap {
#  mail_plugins = quota imap_quota zlib mdec imap_acl acl autocreate expire
#}
protocol pop3 {
  mail_plugins = quota zlib mdec expire
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_no_flag_updates = yes
  pop3_uidl_format = %08Xu%08Xv
}

 

 

 
                                          

Reply via email to