title: IMAP Error: Login failed - Roundcube
body: <p>I'm trying to login to Roundcube only the program won't let me.</p>
  
  <p><img src="https://i.stack.imgur.com/qfKFB.png" alt="roundcube login"></p>
  
  <p>I can login to the said account from the shell and mail is setup and working correctly on my server for user 'admin'. It's RC that is the problem. If I check my logs:</p>
  
  <pre><code>/usr/local/www/roundcube/logs/errors
  </code></pre>
  
  <p>they show:</p>
  
  <pre><code>[21-Sep-2013 17:19:02 +0100]: IMAP Error: Login failed for admin from ip.ip.ip.ip. Could not connect to ip.ip.ip.ip:143: 
  Connection refused in /usr/local/www/roundcube/program/lib/Roundcube/rcube_imap.php on line 184 
  (POST /roundcube/?_task=login&amp;_action=login)
  </code></pre>
  
  <p>which doesn't give me many clues really, just leads me to:</p>
  
  <pre><code>public function connect($host, $user, $pass, $port=143, $use_ssl=null) {}
  </code></pre>
  
  <p>from </p>
  
  <pre><code>rcube_imap.php
  </code></pre>
  
  <p>Stuff I've tried, editing: </p>
  
  <pre><code>/usr/local/www/roundcube/config/main.inc.php
  </code></pre>
  
  <p>with:</p>
  
  <pre><code>// IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or null to use
  // best server supported one)
  //$rcmail_config['imap_auth_type'] = LOGIN; 
  $rcmail_config['imap_auth_type'] = null;
  
  // Log IMAP conversation to &lt;log_dir&gt;/imap or to syslog
  $rcmail_config['imap_debug'] = /var/log/imap;
  </code></pre>
  
  <p>With a failed login attempt</p>
  
  <pre><code>/var/log/imap
  </code></pre>
  
  <p>doesn't even get written to, leaving me no clues. I'm using dovecot and Sendmail on a FreeBSD box with full root access. It's not an incorrect username password combination for sure. </p>
  
  <p>Several Googles on the string 'Roundcube: Connection to storage server failed' are fruitless.</p>
  
  <p>EDIT:</p>
  
  <p>I needed an entry in </p>
  
  <pre><code>/etc/rc.conf
  
  dovecot_enable="YES"
  </code></pre>
  
  <p>Schoolboy error.</p>