How to Install RoundCube with Postfix, Dovecot, NGINX, MariaDB (or MySQL) on Ubuuntu-20.04



  Environment
    Device :  Odroid-HC2
    OS : Ubuntu-20.04
    HOST : test (192.168.101.100)
    Pre Insalled App : MariaDB(or MySQL), NGINX, PHP, POSTFIX, DOVECOT




1. Install PHP Plugin


Install PHP Plugin
$ sudo apt install openssl composer php-net-smtp php-mysql php-gd php-xml php-mbstring php-intl php-zip php-json php-pear php-bz2 php-gmp php-imap php-imagick php-auth-sasl php-net-idna2 php-mail-mime php-net-ldap3 php-net-sieve -y

2. Install RoundCube


$ wget https://github.com/roundcube/roundcubemail/releases/download/1.4.9/roundcubemail-1.4.9-complete.tar.gz
$ tar xzf roundcubemail-1.4.9-complete.tar.gz
$ sudo cp -r roundcubemail-1.4.9 /var/www/html/roundcube

3. Generate database for RoundCube

$ sudo chown -R www-data.www-data /var/www/html/roundcube/
$ sudo chmod -R 775 /var/www/html/roundcube/{temp,logs}

4. Generate database for RoundCube



  WordPress
    SQL database : roundcube
    SQL userid : roundcube
    SQL password : test@test


$ sudo mysql -u root -p
> create database roundcube;
> create user roundcube@localhost identified by 'test@test';
> grant all on roundcube.* to roundcube@localhost;
> flush privileges;
> quit;

5. Generate RoundCube Initail Setting


1) Connect to http://192.168.101.100/roundcube/installer/

  WordPress
    SQL database : roundcube
    SQL userid : roundcube
    SQL password : test@test
  Mail Server
    SMTP
      server : localhost
      port : 25
      email : test@test.com
      password : test@test
    IMAP
      server : localhost
      port : 143
      email : test@test.com
      password : test.com
    language : en_US

※ Above is My Environment, Modify it to suit your environment

2) Connect to http://192.168.101.100/roundcube