Author Topic: Test IMAP config OK, but can't login  (Read 9823 times)

Offline andhi

  • Newbie
  • *
  • Posts: 5
Test IMAP config OK, but can't login
« on: April 04, 2013, 02:49:22 AM »
Please help, i'm a beginner in Roundcube.

During installation, Test IMAP config result OK, this is the screenshot:


But I can't login via http://www.mydomain.com/mail, using the same username and password.
Error message:
Code: [Select]
IMAP Error in mydomain.com/mail/program/include/rcube_imap.php (191): Login failed for andhi@mydomain.com from 127.0.0.1. AUTHENTICATE PLAIN: Authentication failed.

This is from dovecot-info.log:
Code: [Select]
imap-login: Info: Aborted login (auth failed, 1 attempts): user=<andhi@mydomain.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
« Last Edit: April 04, 2013, 02:55:41 AM by andhi »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,600
    • http://SKaero.com/
Re: Test IMAP config OK, but can't login
« Reply #1 on: April 04, 2013, 03:01:22 AM »
Try changing the imap_auth_type to CRAM-MD5 in the main.inc.php

Offline andhi

  • Newbie
  • *
  • Posts: 5
Re: Test IMAP config OK, but can't login
« Reply #2 on: April 04, 2013, 10:13:46 PM »
Try changing the imap_auth_type to CRAM-MD5 in the main.inc.php

Still doesn't work. This is my main.inc.php:
Code: [Select]
<?php

$rcmail_config 
= array();

$rcmail_config['debug_level'] = 4;

$rcmail_config['log_driver'] = 'file';

$rcmail_config['log_date_format'] = 'd-M-Y H:i:s O';

$rcmail_config['syslog_id'] = 'roundcube';

$rcmail_config['syslog_facility'] = LOG_USER;

$rcmail_config['smtp_log'] = true;

$rcmail_config['log_logins'] = false;

$rcmail_config['log_session'] = false;

$rcmail_config['sql_debug'] = false;

$rcmail_config['imap_debug'] = false;

$rcmail_config['ldap_debug'] = false;

$rcmail_config['smtp_debug'] = false;

$rcmail_config['default_host'] = 'mydomain.com';

$rcmail_config['default_port'] = 143;

$rcmail_config['imap_auth_type'] = CRAM-MD5;

$rcmail_config['imap_delimiter'] = null;

$rcmail_config['imap_ns_personal'] = null;
$rcmail_config['imap_ns_other']    = null;
$rcmail_config['imap_ns_shared']   = null;

$rcmail_config['imap_force_caps'] = false;

$rcmail_config['imap_force_lsub'] = false;

$rcmail_config['imap_force_ns'] = false;

$rcmail_config['imap_timeout'] = 0;

$rcmail_config['imap_auth_cid'] = null;

$rcmail_config['imap_auth_pw'] = null;

$rcmail_config['imap_cache'] = null;

$rcmail_config['messages_cache'] = false;

$rcmail_config['smtp_server'] = '';

$rcmail_config['smtp_port'] = 25;

$rcmail_config['smtp_user'] = '';

$rcmail_config['smtp_pass'] = '';

$rcmail_config['smtp_auth_type'] = '';

$rcmail_config['smtp_auth_cid'] = null;

$rcmail_config['smtp_auth_pw'] = null;

$rcmail_config['smtp_helo_host'] = '';

$rcmail_config['smtp_timeout'] = 0;

$rcmail_config['enable_installer'] = false;

$rcmail_config['support_url'] = '#';

$rcmail_config['skin_logo'] = null;

$rcmail_config['auto_create_user'] = true;

$rcmail_config['log_dir'] = 'logs/';

$rcmail_config['temp_dir'] = 'temp/';

$rcmail_config['message_cache_lifetime'] = '10d';

$rcmail_config['force_https'] = false;

$rcmail_config['use_https'] = false;

$rcmail_config['login_autocomplete'] = 0;

$rcmail_config['login_lc'] = 0;

$rcmail_config['skin_include_php'] = false;

$rcmail_config['display_version'] = false;

$rcmail_config['session_lifetime'] = 10;

$rcmail_config['session_domain'] = '';

$rcmail_config['session_name'] = null;

$rcmail_config['session_storage'] = 'db';

$rcmail_config['memcache_hosts'] = null// e.g. array( 'localhost:11211', '192.168.1.12:11211', 'unix:///var/tmp/memcached.sock' );

$rcmail_config['ip_check'] = false;

$rcmail_config['referer_check'] = false;

$rcmail_config['x_frame_options'] = 'sameorigin';

$rcmail_config['des_key'] = 'L6n6Rs+kI+l8SC0le!IgVqmt';

$rcmail_config['username_domain'] = 'mydomain.com';

$rcmail_config['mail_domain'] = '';

$rcmail_config['password_charset'] = 'ISO-8859-1';

$rcmail_config['sendmail_delay'] = 0;

$rcmail_config['max_recipients'] = 0

$rcmail_config['max_group_members'] = 0

$rcmail_config['useragent'] = 'Roundcube Webmail/'.RCMAIL_VERSION;

$rcmail_config['product_name'] = 'Roundcube Webmail';

$rcmail_config['include_host_config'] = false;

$rcmail_config['generic_message_footer'] = '';

$rcmail_config['generic_message_footer_html'] = '';

$rcmail_config['http_received_header'] = false;

$rcmail_config['http_received_header_encrypt'] = false;

$rcmail_config['mail_header_delimiter'] = NULL;

$rcmail_config['line_length'] = 72;

$rcmail_config['send_format_flowed'] = true;

$rcmail_config['dont_override'] = array();

$rcmail_config['identities_level'] = 0;

$rcmail_config['client_mimetypes'] = null;  # null == default

$rcmail_config['mime_magic'] = null;

$rcmail_config['im_identify_path'] = null;

$rcmail_config['im_convert_path'] = null;

$rcmail_config['contact_photo_size'] = 160;

$rcmail_config['email_dns_check'] = false;

$rcmail_config['plugins'] = array();

$rcmail_config['message_sort_col'] = '';

$rcmail_config['message_sort_order'] = 'DESC';

$rcmail_config['list_cols'] = array('subject''status''fromto''date''size''flag''attachment');

$rcmail_config['language'] = 'id_ID';

$rcmail_config['date_format'] = 'Y-m-d';

$rcmail_config['date_formats'] = array('Y-m-d''d-m-Y''Y/m/d''m/d/Y''d/m/Y''d.m.Y''j.n.Y');

$rcmail_config['time_format'] = 'H:i';

$rcmail_config['time_formats'] = array('G:i''H:i''g:i a''h:i A');

$rcmail_config['date_short'] = 'D H:i';

$rcmail_config['date_long'] = 'Y-m-d H:i';

$rcmail_config['drafts_mbox'] = 'Drafts';

$rcmail_config['junk_mbox'] = 'Junk';

$rcmail_config['sent_mbox'] = 'Sent';

$rcmail_config['trash_mbox'] = 'Trash';

$rcmail_config['default_folders'] = array('INBOX''Drafts''Sent''Junk''Trash');

$rcmail_config['create_default_folders'] = false;

$rcmail_config['protect_default_folders'] = true;

$rcmail_config['quota_zero_as_unlimited'] = false;

$rcmail_config['enable_spellcheck'] = true;

$rcmail_config['spellcheck_dictionary'] = false;

$rcmail_config['spellcheck_engine'] = 'pspell';

$rcmail_config['spellcheck_uri'] = '';

$rcmail_config['spellcheck_languages'] = NULL;

$rcmail_config['spellcheck_ignore_caps'] = false;

$rcmail_config['spellcheck_ignore_nums'] = false;

$rcmail_config['spellcheck_ignore_syms'] = false;

$rcmail_config['recipients_separator'] = ',';

$rcmail_config['max_pagesize'] = 200;

$rcmail_config['min_keep_alive'] = 60;

$rcmail_config['upload_progress'] = false;

$rcmail_config['undo_timeout'] = 0;

$rcmail_config['address_book_type'] = 'sql';

$rcmail_config['ldap_public'] = array();

$rcmail_config['ldap_public']['Verisign'] = array(
  
'name'          => 'Verisign.com',
  
'hosts'         => array('directory.verisign.com'),
  
'port'          => 389,
  
'use_tls'       => false,
  
'ldap_version'  => 3,
  
'user_specific' => false
  
'base_dn'       => '',
  
'bind_dn'       => '',
  
'bind_pass'     => '',
  
'search_base_dn' => '',
  
'search_filter'  => '',
  
'search_bind_dn' => '',
  
'search_bind_pw' => '',
  
'search_dn_default' => '',
  
'auth_cid'       => '',
  
'auth_method'    => '',
  
'hidden'        => false,
  
'searchonly'    => false,
  
'writable'       => false,
  
'LDAP_Object_Classes' => array('top''inetOrgPerson'),
  
'LDAP_rdn'       => 'cn',
  
'required_fields' => array('cn''sn''mail'),
  
'search_fields'   => array('mail''cn'),
  
'fieldmap' => array(
    
'name'        => 'cn',
    
'surname'     => 'sn',
    
'firstname'   => 'givenName',
    
'title'       => 'title',
    
'email'       => 'mail:*',
    
'phone:home'  => 'homePhone',
    
'phone:work'  => 'telephoneNumber',
    
'phone:mobile' => 'mobile',
    
'phone:pager' => 'pager',
    
'street'      => 'street',
    
'zipcode'     => 'postalCode',
    
'region'      => 'st',
    
'locality'    => 'l',
    
'department'  => 'departmentNumber',
    
'notes'       => 'description',
  ),
  
'sub_fields' => array(),
  
'sort'          => 'cn',
  
'scope'         => 'sub',
  
'filter'        => '(objectClass=inetOrgPerson)'
  'fuzzy_search'  
=> true,
  
'vlv'           => false,
  
'numsub_filter' => '(objectClass=organizationalUnit)',
  
'sizelimit'     => '0',
  
'timelimit'     => '0',
  
'referrals'     => true|false,

  
'groups'        => array(
    
'base_dn'     => '',
    
'scope'       => 'sub',
    
'filter'      => '(objectClass=groupOfNames)',
    
'object_classes' => array("top""groupOfNames"),
    
'member_attr'  => 'member',
    
'name_attr'    => 'cn'
  ),
);

$rcmail_config['autocomplete_addressbooks'] = array('sql');

$rcmail_config['autocomplete_min_length'] = 1;

$rcmail_config['autocomplete_threads'] = 0;

$rcmail_config['autocomplete_max'] = 15;

$rcmail_config['address_template'] = '{street}<br/>{locality} {zipcode}<br/>{country} {region}';

$rcmail_config['addressbook_search_mode'] = 0;

$rcmail_config['default_charset'] = 'ISO-8859-1';

$rcmail_config['skin'] = 'larry';

$rcmail_config['mail_pagesize'] = 50;

$rcmail_config['addressbook_pagesize'] = 50;

$rcmail_config['addressbook_sort_col'] = 'surname';

$rcmail_config['addressbook_name_listing'] = 0;

$rcmail_config['timezone'] = 'auto';

$rcmail_config['prefer_html'] = true;

$rcmail_config['show_images'] = 0;

$rcmail_config['htmleditor'] = 0;

$rcmail_config['prettydate'] = true;

$rcmail_config['draft_autosave'] = 300;

$rcmail_config['preview_pane'] = false;

$rcmail_config['preview_pane_mark_read'] = 0;

$rcmail_config['logout_purge'] = false;

$rcmail_config['logout_expunge'] = false;

$rcmail_config['inline_images'] = true;

$rcmail_config['mime_param_folding'] = 0;

$rcmail_config['skip_deleted'] = false;

$rcmail_config['read_when_deleted'] = true;

$rcmail_config['flag_for_deletion'] = false;

$rcmail_config['keep_alive'] = 60;

$rcmail_config['check_all_folders'] = false;

$rcmail_config['display_next'] = false;

$rcmail_config['autoexpand_threads'] = 0;

$rcmail_config['top_posting'] = false;

$rcmail_config['strip_existing_sig'] = true;

$rcmail_config['show_sig'] = 1;

$rcmail_config['sig_above'] = false;

$rcmail_config['force_7bit'] = false;

$rcmail_config['search_mods'] = null;

$rcmail_config['addressbook_search_mods'] = null;

$rcmail_config['delete_always'] = false;

$rcmail_config['delete_junk'] = false;

$rcmail_config['mdn_requests'] = 0;

$rcmail_config['mdn_default'] = 0;

$rcmail_config['dsn_default'] = 0;

$rcmail_config['reply_same_folder'] = false;

$rcmail_config['forward_attachment'] = false;

$rcmail_config['default_addressbook'] = null;

$rcmail_config['spellcheck_before_send'] = false;

$rcmail_config['autocomplete_single'] = false;

$rcmail_config['default_font'] = '';


Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,600
    • http://SKaero.com/
Re: Test IMAP config OK, but can't login
« Reply #3 on: April 06, 2013, 04:59:36 AM »
Enable imap_debug and post the login line from the log for the successful login the installer does.

Offline andhi

  • Newbie
  • *
  • Posts: 5
Re: Test IMAP config OK, but can't login
« Reply #4 on: April 07, 2013, 10:38:54 PM »
Enable imap_debug and post the login line from the log for the successful login the installer does.

sorry for late answer..
this is from my dovecot-info.log:
Code: [Select]
Apr 08 09:36:31 imap-login: Info: Login: user=<andhi>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=4753, secured
Apr 08 09:36:31 imap(andhi): Info: Disconnected: Logged out bytes=12/336

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,600
    • http://SKaero.com/
Re: Test IMAP config OK, but can't login
« Reply #5 on: April 08, 2013, 01:19:37 PM »
According to the successful log you you should be using PLAIN authentication but only using the first part of your email address to login (ie: <user> not <user>@example.com)

Offline andhi

  • Newbie
  • *
  • Posts: 5
Re: Test IMAP config OK, but can't login
« Reply #6 on: April 09, 2013, 12:52:27 AM »
According to the successful log you you should be using PLAIN authentication but only using the first part of your email address to login (ie: <user> not <user>@example.com)

I have changed:

Code: [Select]
$rcmail_config ['imap_auth_type'] = CRAM-MD5;to
Code: [Select]
$rcmail_config ['imap_auth_type'] = PLAIN;
and login using <user>, but still failed. This is the error and log message:
Code: [Select]
IMAP Error in mydomain.com/mail/program/include/rcube_imap.php (191): Login failed for andhi@mydomain.com from 127.0.0.1. AUTHENTICATE PLAIN: Authentication failed.
Code: [Select]
Apr 09 11:40:56 imap-login: Info: Aborted login (auth failed, 1 attempts): user=<andhi@mydomain.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,600
    • http://SKaero.com/
Re: Test IMAP config OK, but can't login
« Reply #7 on: April 09, 2013, 02:35:05 AM »
Make sure $rcmail_config['username_domain'] is empty in the main.inc.php.

Offline andhi

  • Newbie
  • *
  • Posts: 5
Re: Test IMAP config OK, but can't login
« Reply #8 on: April 14, 2013, 11:34:52 PM »
Make sure $rcmail_config['username_domain'] is empty in the main.inc.php.


Sorry for late respond. Now it works!! Thank you so much.