i'm recieving such error :

IMAP Error in /usr/local/www/apache24/data/roundcube/program/lib/Roundcube/rcube_imap.php (196): Login failed for test1@example.com from 1.2.3.4. AUTHENTICATE PLAIN: * OK Waiting for authentication process to respond..

when trying to login from Roundcube.

Before this:

1 - i've create domain example.com via Postfix web admin

2 - i've created user test1@example.com:pass123 via Postfix web admin

Config files:

/usr/local/etc/postfix/main.cf:

compatibility_level = 2
queue_directory = /var/spool/postfix
command_directory = /usr/local/sbin
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/postfix
mail_owner = postfix

myhostname = mail-web.example.com
mydomain = example.com
myorigin = $mydomain

inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
local_recipient_maps = unix:passwd.byname $alias_maps
unknown_local_recipient_reject_code = 550
mynetworks_style = host
mynetworks = 127.0.0.0/8

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

smtpd_banner = $myhostname ESMTP $mail_name
debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5


sendmail_path = /usr/local/sbin/sendmail
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
setgid_group = maildrop
html_directory = /usr/local/share/doc/postfix
manpage_directory = /usr/local/man
sample_directory = /usr/local/etc/postfix
readme_directory = /usr/local/share/doc/postfix
inet_protocols = ipv4
meta_directory = /usr/local/libexec/postfix
shlib_directory = /usr/local/lib/postfix

virtual_mailbox_base = /usr/mail
virtual_alias_maps = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_domains = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 65534
virtual_uid_maps = static:65534
virtual_gid_maps = static:65534
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

smtpd_sasl_auth_enable = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth

smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_pipelining permit
smtpd_helo_restrictions = permit
smtpd_sender_restrictions = permit_mynetworks permit_sasl_authenticated reject_non_fqdn_sender reject_unknown_sender_domain permit
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_non_fqdn_recipient reject_unauth_destination reject_unknown_recipient_domain reject_unverified_recipient permit
smtpd_data_restrictions = permit
smtpd_end_of_data_restrictions = permit
smtpd_etrn_restrictions = permit

file : /usr/local/etc/postfix/master.cf :

smtp      inet  n       -       n       -       -       smtpd
...
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
        -o syslog_name=postfix/$service_name
...
dovecot    unix  -       n       n       -        -       pipe
   flags=DRhu user=nobody:nobody argv=/usr/local/libexec/dovecot/deliver -d ${recipient}

/usr/local/etc/postfix/mysql_virtual_alias_maps.cf :

user = postfix
password = postfix_passwd
hosts = localhost
dbname = postfix
query           = SELECT goto FROM alias WHERE address='%s' AND active = '1'

/usr/local/etc/postfix/mysql_virtual_domains_maps.cf :

user = postfix
password = postfix_passwd
hosts = localhost
dbname = postfix
query          = SELECT domain FROM domain WHERE domain='%u'

/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf :

user = postfix
password = postfix_passwd
hosts = localhost
dbname = postfix
query           = SELECT CONCAT(domain,'/',maildir) FROM mailbox WHERE username='%s' AND active = '1'

/usr/local/etc/dovecot/dovecot.conf :

auth_debug = yes
auth_mechanisms = plain login
auth_verbose = yes
disable_plaintext_auth = no
first_valid_gid = 65534
hostname = example.com
listen = *
log_path = /var/log/dovecot.log
mail_debug = yes
mail_location = maildir:/usr/mail/%d/%u/
mail_privileged_group = mail
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf
  driver = sql
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-master {
    mode = 0666
  }
  user = nobody
}
service imap-login {
  inet_listener imap {
    port = 143
  }
}

ssl = no
userdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf
  driver = sql
}
verbose_proctitle = yes
protocol imap {
  imap_client_workarounds = delay-newmail   tb-extra-mailbox-sep
  log_path = /var/log/dovecot-imap.log
}
protocol pop3 {
  log_path = /var/log/dovecot-pop3.log
  #pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
  hostname = example.com
  log_path = /var/log/dovecot-lda.log
  postmaster_address = admin@example.com
  sendmail_path = /usr/sbin/sendmail
}

/usr/local/etc/dovecot/dovecot-sql.conf :

driver = mysql
connect = host=127.0.0.1 dbname=postfix user=postfix password=postfix_passwd
default_pass_scheme = MD5-CRYPT
password_query = SELECT password FROM mailbox WHERE username = '%u'
user_query = SELECT maildir, 65534 AS uid, 65534 AS gid FROM mailbox WHERE username = '%u'
user_query = SELECT CONCAT('/usr/mail/',LCASE(`domain`),'/',LCASE(`maildir`)), 65534 AS uid, 65534 AS gid FROM mailbox WHERE username = '%u'

/usr/local/www/apache24/data/roundcube/config/config.inc.php

<?php
/* Local configuration for Roundcube Webmail */
$config['db_dsnw'] = 'mysqli://roundcube:roundcube_passwd@localhost/roundcube';
$config['debug_level'] = 5;
$config['syslog_facility'] = LOG_MAIL;
$config['default_host'] = 'localhost';
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
$config['support_url'] = 'http://example.com/contact-us';
$config['des_key'] = 'Q59le34rafReT0vFoYoSItaHN';
$config['username_domain'] = 'example.com';
$config['product_name'] = 'Product1 (DEV)';
$config['plugins'] = array('archive', 'http_authentication', 'new_user_dialog', 'new_user_identity', 'password');
$config['language'] = 'en_US';
$config['imap_auth_type']='PLAIN';

Any suggestions? thanks.

  • Is imap-login running? ps aux | grep imap-login. This is my imap-login config: service imap-login { inet_listener imaps { address = * } } – Jose Quinteiro May 28 at 21:39

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.