Close
Edit

RoundCube

установка roundcube на сервер ubuntu+nginx

postfix

источник: Установка и настройка Postfix в Ubuntu 20.04
The Postfix Home Page
Part 3: Set Up PostfixAdmin Virtual Mailboxes on Debian Mail Server (PostgreSQL)

ключи: #postfixadmin #email

Содержание >>

только важные выдержки


Ubuntu: вход в управление postgresql

sudo -u postgres psql
# Ctrl+D to log out.

добавление базы и пользователей postfix и roundcube

/* CREATE USER postfix WITH PASSWORD 'whatever'; */
/* CREATE DATABASE postfix OWNER postfix ENCODING 'unicode'; */
CREATE DATABASE postfixadmin;
CREATE USER postfixadmin WITH PASSWORD 'postfixadmin_password';
ALTER DATABASE postfixadmin OWNER TO postfixadmin;
GRANT ALL PRIVILEGES ON DATABASE postfixadmin TO postfixadmin;

CREATE DATABASE roundcubemail;
CREATE USER roundcube WITH PASSWORD 'roundcube_password';
ALTER DATABASE roundcubemail OWNER TO roundcube ;
GRANT ALL PRIVILEGES ON DATABASE roundcubemail TO roundcube;

$ createuser -P roundcube
$ createdb -O roundcube -E UNICODE roundcubemail

nginx конфигурационный файл сайта

server {
  listen 80;
  listen [::]:80;
  server_name mail.example.com;
  root /var/www/roundcube/;
  index index.php index.html index.htm;

  error_log /var/log/nginx/roundcube.error;
  access_log /var/log/nginx/roundcube.access;

  location / {
    try_files $uri $uri/ /index.php;
  }

  location ~ \.php$ {
   try_files $uri =404;
    fastcgi_pass unix:/run/php/php8.1-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
  }

  location ~ /.well-known/acme-challenge {
    allow all;
  }
 location ~ ^/(README|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
    deny all;
  }
  location ~ ^/(bin|SQL)/ {
    deny all;
  }
 # A long browser cache lifetime can speed up repeat visits to your page
  location ~* \.(jpg|jpeg|gif|png|webp|svg|woff|woff2|ttf|css|js|ico|xml)$ {
       access_log        off;
       log_not_found     off;
       expires           360d;
  }
}

Roundcube

http://e.mail.homdy.ru/installer/index.php?_step=3

Install Roundcube Webmail on Ubuntu 22.04/20.04 with Apache/Nginx

disable installer

# installer url
coundcube.exemple.com/installer/index.php?_step=3
# you need to remove directory /installer
Ctrl + S : Update