Rainloop

From The World according to Vissie
Revision as of 06:04, 10 February 2020 by Vissie (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Setup

https://www.linuxbabe.com/mail-server/install-rainloop-webmail-ubuntu-16-04
sudo apt update
sudo apt install nginx php php-fpm
sudo apt install php-curl php-dom
cd ~/Downloads
wget https://www.rainloop.net/repository/webmail/rainloop-community-latest.zip
aunpack ./rainloop-community-latest.zip
sudo mv ./rainloop-community-latest /var/www/rainloop
sudo chown www-data:www-data /var/www/rainloop/ -R
sudo vim /etc/nginx/conf.d/rainloop.conf
vim: /etc/nginx/conf.d/rainloop.conf
 
server {
   listen 80;
   server_name mail.example.com;

   root /var/www/rainloop;
   index index.php index.html;
	
   access_log /var/log/nginx/rainloop_access.log;
   error_log /var/log/nginx/rainloop_error.log;
   
   location / {
       try_files $uri $uri/ /index.php?$query_string;
   }

   location ~ ^/(.+\.php)$ {
        try_files $uri =404;
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include /etc/nginx/fastcgi_params;
   }
 
   location ^~ /data {
       deny all;
   }
}
sudo nginx -t
sudo systemctl reload nginx


Mail attachment sizes was too small. These server settings had to be changed:

sudo vim /etc/php/7.0/fpm/php.ini 
upload_max_filesize = 50M:q
sudo systemctl restart php7.0-fpm.service 

Set in server block, which affects a particular site/app.

server {
   ...
   client_max_body_size 100M;
}
sudo systemctl restart nginx.service