googleroundcube

Configure Roundcube with Postfix and Dovecot

Follow these steps:

  • Install Postfix. Postfix is a free, open source Mail Transfer Agent which works to route and deliver email. Before installing Postfix, you will need to have a Fully Qualified Domain Name pointing to the server that you will be using. On Debian and similar systems, Postfix can be installed using the command apt-get install postfix.

  • Once Postfix is installed, configure the following options in the /etc/postfix/main.cf file.

      myhostname = example.com
      ...
      home_mailbox = Maildir/
    
  • Install Dovecot. Dovecot is a open source Mail Delivery Agent that works with IMAP and POP3. On Ubuntu and similar systems, Postfix can be installed using the command apt-get install dovecot-imapd.

  • Once Dovecot is installed, configure the following option in the /etc/dovecot/conf.d/10-mail.conf file:

      mail_location = maildir:~/Maildir
    
  • Modify the /opt/bitnami/roundcube/config/config.inc.php* RoundCube configuration file by appending the following lines to the end of the file. These lines define the configuration needed for Roundcube to work with Postfix and Dovecot:

      // IMAP
      $rcmail_config['default_host'] = 'HOSTNAME';
      $rcmail_config['default_port'] = 143;
      // SMTP
      $rcmail_config['smtp_server'] = 'HOSTNAME';
      $rcmail_config['smtp_port'] = 25;
    

    Note that you have to replace HOSTNAME with the correct Fully Qualified Domain Name for your server. In case your server is using different ports from the default ones shown above, replace the port numbers as well to reflect your server’s configuration.

Other configurations are also possible and supported. Refer to the Ubuntu community guides listed below for more information:

Last modification February 9, 2023