How to Install and Configure RoundCube Webmail Client with Virtual Users in Postfix – Part 4

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Gabriel Cánepa

Gabriel Cánepa is a GNU/Linux sysadmin and web developer from Villa Mercedes, San Luis, Argentina. He works for a worldwide leading consumer product company and takes great pleasure in using FOSS tools to increase productivity in all areas of his daily work.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

24 Responses

  1. FlorinC says:


    Ther is posible to update roundcubemail to version 1.3.7 on CentOS ? How ?

  2. Sudheer Kuragayala says:

    Hi Sir, I purchase a host they give me already installed roundcube mail when I send mails that mail ging to spam folder of users how can I solve this sir thanks you..

    • Gabriel A. Cánepa says:

      You should contact your hosting provider. Most likely this is being caused by someone misusing the email server installed on your shared host.

  3. urlator says:

    I set up everything as written and can’t log to server with existing user. After looking at roundcube error.log I’ve noticed this:

    IMAP Error: Login failed for [email protected] from Could not connect to ssl:// Permission denied in /usr/share/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 197 (POST /twebmail/?_task=login?_task=login&_action=login)

    I’ve changed real user and domain name.

    Anyway roundcube is trying to connect to port 993 although I put $config[‘default_port’] = 143; in

    Any suggestions?

    • urlator says:

      please edit IP address as well.

    • woppywush says:

      I’ve got the same error

      IMAP Error in /usr/share/roundcubemail/program/lib/Roundcube/rcube_imap.php (197): Login failed for ***@***.com from Could not connect to ssl://***.***.com:993: Permission denied

      please advice

    • ozmark says:

      Instructions for are wrong, using ssl:// for $config[‘default_host’] = ‘ssl://’; is telling Roundcube to use port 993. Use tls:// instead – $config[‘default_host’] = ‘tls://’;

      See ttps:// for details

  4. Eric Evans says:

    I would like to customize my Roundcube login page to reflect my company. I’ve looked at tutorials but none seem to work. I’d like my logo and banner in place of the roundcube logo and banner.
    Any help would be appreciated.

  5. Harmon20 says:

    I’m missing something here. I went through this a dozen times and can’t get anything but 403. (CentOS7)

    When I follow this guide exactly (Except replace db info with my current info and AAA.BBB.CCC.DDD with the server’s IP.) I get 403. Everything works fine (get default page) if I browse the server root but I get 403 when attempting to navigate to

    After removing roundcubemail, checking for clean up, and stepping through this guide Part meticulously a couple times and getting 403 every time I gave up and decided to start from square one and check every step. I removed roundcubemail, checked to make sure all the config files were gone, restarted httpd.

    I start from the point of everything apparently fine with Apache (http & https) and firewall. I get the default config page on 80 and 443. Cert looks good on 443. I create an arbitrary file: /var/www/html/index.html This page displays instead of the default config page on both 80 and 443. It appears all is well to this point.

    I install RC (yum install roundcubemail) and do no configuration on it, leaving all the RC defaults in place. The install placed the files at /usr/share/roundcubemail and placed roundcubemail.conf in /etc/httpd/conf.d/ that created the alias /roundcubemail pointing to /usr/share/roundcubemail. So far so good. I restart httpd.

    I attempt to browse to and get a 403. “You don’t have permission to access /roundcubemail on this server.” I check the directory /usr/share/roundcubemail and find 777 permissions. As a troubleshooting measure I edit /etc/httpd/conf.d/roundcubemail.conf to replace all permissions in the modules for /usr/share/roundcubemail/ with “Require all granted”. Restart httpd. Get 403 again.

    Whether following this guide or simple going with defaults I get the same result, so apparently I’m not making it past the first step; but I don’t understand where things are off. If the roundcubemail.conf file grants to all and file permissions are 777 then what is being forbidden?

    • Mirrorlessforums says:

      Same problem with me. I had RC on debian wheezy before into my domain root (not as a binary package). Upgraded to Jessie recently. Decided to do backport and install as binary package.

      I followed this guide and checked all similar ones for Debian 8 to get it work. Can’t get it working. Had 500 error and reinstalled now “The requested page could not be found” error. Went through all config files /etc/roundcube and /etc/apache2/conf-available etc and /var/lib/roundcube etc..

      All good. Can’t get it to login page. I don’t know htaccess of my domain and this roundcube interfering?? But i tried disabling it . Still not working…

      • Mirrorlessforums says:

        Bit of success update.. Now after I tried installing Roundcube to separate location (not as binary). Now added the roundcube as subdomain. And I can get to login and /installer directory etc. So you can guess I had to add the apache virtual part for roundcube inside the domain virtual file in ‘sites-available’.

        So no ‘config-available/roundcube.conf. But still the or I assume thats do with the .htaccess entries which I’m not going to touch as my original wish was to add roundcube as

        So if anyone facing this issue and wants to get it working as , would have to uncomment/comment each line of .htaccess inside roundcube install directory. Cheers

  6. Martin says:

    Great tutorial series. The only thing I added to it was the addition of postfixadmin and figuring out how to integrate it.

  7. Dawid says:


    I’ve got a problem with login :(.
    I enabled “imap_debug” and after click button “Login”, show messages:
    “IMAP Error in /usr/share/roundcubemail/program/lib/Roundcube/rcube_imap.php (197): Login failed for [email protected] from XXX LOGIN: Authentication failed.”

    Can you help me?

    • Dawid says:

      Problem SOLVED. I don’t know why, but SHA512-CRYPT wrong generate password hash. I must generate hash with “doveadm pw” and update user password in MariaDB.

      • @Dawid,
        What distribution and version are you using? With CentOS 7, which we used in this tutorial, this workaround was not needed. However, if you used a different distro and / or version, please let us know so users following this tutorial will benefit from it.

  8. Daniel says:

    Hi, nice work, quick question. I’m using ubuntu server, I’ve installed roundcube with apt but the virtuser_query plugin is not in the installation, Also I look in to the official plugins page of roundcube with no look, any approach here?

  9. Marcos says:

    Excellent article, I have carried out fully and it works perfectly. I had to make some minor adjustments but integrally is a complete manual.

    I thank you for the time you’ve invested in this work.


  10. theluli says:

    Nice tutorial
    But how can you reset user password in case they forget ” through roundcube

Leave a Reply to Harmon20 Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.