-
Notifications
You must be signed in to change notification settings - Fork 0
Postfix and RoundCube
sudo apt update && sudo apt upgrade -y
sudo apt install lsb-release apt-transport-https ca-certificates php8.1-imagick php8.1-intl php8.1-ldap -y
sudo nano /etc/php/8.1/apache2/php.ini
extension=intl # Line 925
extension=ldap # Line 927
extension=imagick # Line 956
date.timezone = Europe/Warsaw # Line 969
sudo apt-get install postfix
During installation, you need to select Postfix type (To finish guide select "Internet Site") and type your server domain (For example: domain.com).
sudo postconf mail_version
sudo systemctl status postfix
sudo apt-get install dovecot-imapd dovecot-pop3d -y
sudo systemctl restart dovecot
cd /var/www/html/
I am installing RC 1.6.0, but you can select RoundCube version here.
Remember to download ONLY COMPLETE versions
sudo wget https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz
sudo tar -xvf /var/www/html/roundcubemail-1.6.0-complete.tar.gz
sudo mv /var/www/html/roundcubemail-1.6.0 /var/www/html/roundcubemail
sudo chown -R www-data:www-data /var/www/html/roundcubemail/
sudo chmod 755 -R /var/www/html/roundcubemail/
sudo mysql -u root -p
CREATE DATABASE roundcube DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER roundcube@localhost IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON roundcube.* TO roundcube@localhost;
flush privileges;
quit;
sudo mysql -u root -p roundcube < /var/www/html/roundcubemail/SQL/mysql.initial.sql
sudo nano /etc/apache2/sites-available/roundcube.conf
And paste below code
<VirtualHost *:80>
ServerName localhost
DocumentRoot /var/www/html/roundcubemail/
ErrorLog ${APACHE_LOG_DIR}/roundcube_error.log
CustomLog ${APACHE_LOG_DIR}/roundcube_access.log combined
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/html/roundcubemail/>
Options FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
sudo a2ensite roundcube.conf
sudo systemctl reload apache2
Go to page http://your-server.domain/roundcube/installer
You should see something like this
In database section type your credentials to roundcube
database
In SMTP section set up SMTP port to 25
Select useful extensions
- Archive
- Emoticons
- Enigma
- Filesystem_attachments
- Hide_blockquote
- Markasjunk
- Newmail_notifier
You should see this notification on the top
But if you see PHP file content, you should do this steps:
sudo nano /var/www/html/roundcube/config/config.inc.php
If you see only
OK
after tests you can go forward
sudo rm -rf /var/www/html/roundcube/installer
sudo nano /var/www/html/roundcube/config/defaults.inc.php
$config['smtp_host'] = 'localhost:25'; # Line 272
$config['smtp_user'] = ''; # Line 276
$config['smtp_pass'] = ''; # Line 280
Save and exit.
sudo nano /etc/postfix/main.cf
In second line add following expression
mynetworks_style = host
Enter link http://your-server.domain/roundcube
You should see login page
If you passed tests from installer you should have test messages in your inbox