Настройка roundcube в debian

Обновлено: 03.07.2024

Это последняя часть серии « Установка и настройка почтового сервера », в которой мы расскажем, как установить и настроить Roundcube Webmail.

Подготовка

Прежде чем продолжить это руководство, убедитесь, что вы вошли в систему как пользователь с привилегиями sudo .

Зависимости PHP

Мы начнем с обновления списка пакетов и установки всех необходимых PHP- зависимостей:

После завершения установки выполните следующую команду sed чтобы установить значение date.timezone на UTC :

Перезапустите службу PHP FPM, чтобы изменения вступили в силу:

Создать базу данных MySQL

Roundcube поддерживает серверные части баз данных MySQL , PostgreSQL и SQLite.

В этом руководстве мы будем использовать MySQL в качестве сервера базы данных. Войдите в оболочку MySQL :

На момент написания 1.3.8 является последней стабильной версией Roundcube. Прежде чем перейти к следующему шагу, вам следует проверить страницу загрузки Roundcube, чтобы узнать, доступна ли более новая версия.

Начните с загрузки архива Roundcube, используя следующую команду wget :

После завершения загрузки распакуйте архив и переместите код Roundcube в каталог /var/www/roundcubemail :

Nginx и PHP-FPM работают под пользователем www-data , поэтому нам нужно изменить владельца каталога /var/www/postfixadmin на этого пользователя:

Настроить Nginx

В первой части этой серии мы создали серверный блок Nginx для экземпляра PostfixAdmin. Откройте файл конфигурации и добавьте следующие директивы расположения, выделенные желтым:

Перезагрузите службу Nginx, чтобы изменения вступили в силу:

Настроить Roundcube

Вам будет представлен следующий экран:

В разделе Checking available databases требуется только расширение MySQL.

Если все необходимые расширения PHP загружены, мы можем перейти к следующему шагу, где мы можем настроить нашу установку Roundcube:

Когда вы закончите с шагом настройки, перейдите к следующему шагу и импортируйте структуру базы данных MySQL Roundcube, нажав на кнопку Initialize database .

После создания структуры базы данных удалите каталог installer чтобы предотвратить изменение конфигурации и / или несанкционированный доступ.

Включение автоматической очистки кеша Roundcube необязательно, но рекомендуется:

Проверьте установку Roundcube

Включить плагины Roundcube

Roundcube поставляется с рядом плагинов, которые по умолчанию отключены. В этом руководстве мы активируем password и managesieve плагинами. Эти плагины позволят пользователям создавать сетчатые фильтры и изменять свои пароли из интерфейса Roundcube.

Не забудьте ввести учетные данные базы данных PostfixAdmin в строке password_db_dsn .

Выводы

В этом руководстве показано, как установить и настроить Roundcube Webmail в вашей системе Ubuntu, а также как установить и включить плагины Roundcube для добавления дополнительных функций, таких как сетчатые фильтры.

Это последний пост из этой серии. Если у вас есть вопросы, не стесняйтесь оставлять комментарии.

Исходные данные:

  • Настроенный Roundcube (см. предыдущую статью)
  • Установленная ISPConfig 3

Установка Roundcube как модуля ISPConfig 3

Если у вас есть установленная ISPConfig 3, то очень рекомендую установить Roundcube, как модуль ISPConfig.
Это позволит вашим пользователям настраивать почтовые фильтры, автоответчики и прочее с помощью Roundcube.

ISPConfig 3 RoundCube плагин подключается к ISPConfig 3 с помощью ISPConfig remote API. Для использования этого API, создайте удаленного пользователя.

Авторизуемся в ISPConfig (используя учетную запись администратора)

Создадим нового пользователя, перейдя по пути: System > User Management > Remote Users (Система > Управление пользователями > Удаленные пользователи) и нажмем на кнопку Add new user (добавить нового пользователя):

rc1

Введем логин и пароль нового пользователя. Я использовал логин "roundcube" и пароль "!fdWEacBOG1d".

rc2

Разрешим пользователю следующие права:

  • Server functions
  • Client functions
  • Mail user functions
  • Mail alias functions
  • Mail spamfilter user functions
  • Mail spamfilter policy functions
  • Mail fetchmail functions
  • Mail spamfilter whitelist functions
  • Mail spamfilter blacklist functions
  • Mail user filter functions

И нажмем Save (сохранить)

rc3

Теперь авторизуемся в консоли сервера, требуются права root пользователя.

Скопируем SSL сертификат ISPConfig в хранилище сертификатов Debian:

cp /usr/local/ispconfig/interface/ssl/ispserver.crt /usr/local/share/ca-certificates/
update-ca-certificates

Откроем для редактирования php.ini:

Найдите секцию [openssl] и вставьте туда следующую строку:

И перезапустим Apache

Теперь нужно установить сам плагин Roundcube ISPConfig, но для начала нужно установить Git:

Загрузим плагин:

Переместим плагин в директорию плагинов:

mv ispconfig3_* /opt/roundcube/plugins
cd /opt/roundcube/plugins

Создадим новый файл конфигурации плагина config.inc.php:

mv ispconfig3_account/config/config.inc.php.dist ispconfig3_account/config/config.inc.php

И откроем его для редактирования:

Впишем данные пользователя, которого недавно создали:

Вы можете проверить имя сервера в сертификате ISPConfig следующей командой:

openssl x509 -in /usr/local/share/ca-certificates/ispserver.crt -text -noout | grep Subject:

В моем случае это:

Как видим, имя сервера совпадает.

Теперь активируем новые плагины в Roundcube. Сначала откроем файл конфигурации в редакторе:

И добавим в конец следующую строку:

Теперь авторизуемся в Roundcube, вы должны увидеть новые опции в Settings > Account (Настройки > Профиль)

You can find comprehensive list of features of Roundcube here.

Prerequisites

As stated, Roundcube Webmail is written in PHP and thus it runs on a standard LAMPP server. The following are the minimum server requirements;

Before you can proceed with installation and configuration of Roundcube webmail on Debian 9, update and upgrade your server packages;

Download Roundcube

The latest stable release version for Rouncube can be installed by downloading the source code from the Roundcube downloads page. Download the Complete package under the Stable version section. Once you get the link, you can simply download it as shown below;

Extract the Roundcube tarball archive to the web root directory.

Set proper ownership for roundcube root directory and permissions for Roundcube /temp and /logs directories;

The /config , /temp and /logs directories should be protected.

Install and Configure Apache Web Server

In this tutorial, we are going to use Apache as our web server. Therefore, follow through to install and configure it.

Install Apache

Apache is started and enabled by default after installation.

If UFW is running, allow Apache2.

Configure Apache Virtualhost for Roundcube

Next, it is wise to create a dedicated Apache virtualhost configuration file for Roundcube instead of editing the default Apache configuration. To create one see below;

Save and quit the configuration file.

Disable Apache default site and enable Roundcube site.

Enable the following Apache Modules

Verify syntactical errors in Rouncube site configuration.

Restart Apache if there is error.

Database Configuration

Roundcube supports various database backends as stated above. In this guide, we are going to use MySQL.

Install MySQL

MySQL is available on default Debian repositories and can be installed by running the command below;

Run the MySQL basic secure script to set the root password, remove test databases, disable remote root login and remove anonymous users.

Create Roundcube database and and grant privileges to a separate database user.

Be sure to replace the database, username and password accordingly.

Run the command below to reload the database tables and effect the changes made above. Quit the database after that.

Log out of the MySQL command prompt;

Import the Roundcube data to the newly created database above;

Install and Configure PHP

PHP is a server side scripting language that helps generate dynamic web content. To install PHP and all the requires dependencies for Roundcube, run the command below;

Install PEAR packages

Configure PHP

Once the installation is done, run the command below to enable PHP mbstring, xml and dom modules respectively.

Verify with the command;

Edit the /etc/php/7.0/apache2/php.ini and set the timezone

Configure Roundcube

Create Rouncube configuration file based on the sample configuration file. You can simply copy the sample config as shown below;

Open the configuration file for editing and put the contents below;

Note that you can replace the IMAP and SMTP connection details appropriately. In this guide, am using gmail as my mail server.

roundcube gmail login page

roundcube dashboard

You have successfully install and setup your Roundcube webmail client and you can now be able to accessible you emails normally. In our next tutorial, we will learn how to connect to iRedMail mail server from a remote Roundcube. Enjoy

How to Install RoundCube Webmail on Debian 9

Install RoundCube Webmail on a Debian 9 VPS

In this tutorial, we will show you how to install RoundCube on a Debian 9 VPS. RoundCube is an open-source web-based IMAP email client written in PHP with an application-like user interface. It allows users to read, send, and organize their emails easily. One of the most prominent features of RoundCube webmail is the widespread use of Ajax technology and find-as-you-type address book integration. The RoundCube user interface is very customizable and it is available in over 80 languages.

Table of Contents

Prerequisites

Step 1: Connect via SSH

Connect to your server via SSH as the root user using the following command:

Before starting with the installation, we need to update the OS packages to their latest versions.

We can do this by running the following commands:

Once the upgrade is complete, we can move on to the next step.

Step 2: Install Apache

We can install Apache2 from the Debian package repository.

Run the following commands to install Apache2 on the server:

Enable Apache2 to start on server boot:

Step 3: Install PHP and PHP Extensions Required by RoundCube

Step 4: Create the Apache Configuration File

Create a new directory named roundcube:

To enable the newly created configuration file in Apache, run:

Disable the default Apache configuration file using:

Also, we need to enable Apache rewrite module if it is not already enabled:

Check if there are errors with the newly created Apache configuration:

If the syntax is OK and there are no errors, we can restart Apache web service.

Step 5: Create a MySQL Database

Create a new MySQL database:

(do not forget to replace ’ roundcubeuser ’ and ‘ Str0nGPa55W0rd ’ fields accordingly)

Step 6: Install RoundCube on Debian 9

To download the latest RoundCube version, run the following commands:

Run the command below to extract the RoundCube Webmail application files in the /var/www/ directory on your server:

We need to change the permissions of RoundCube files located in the/var/www/roundcube directory:

Apply the initial configuration to the RoundCube database using the following command:

Of course, you don’t have to install RoundCube on Debian 9 if you use one of our Managed RoundCube Hosting solutions, in which case you can simply ask our expert Linux admins to set up RoundCube for you. They are available 24×7 and will take care of your request immediately.
PS . If you liked this post on how to install RoundCube on a Debian 9 VPS, please share it with your friends on the social networks using the share shortcuts below, or simply leave a comment in the comments section. Thanks.

Читайте также: