mirror of
https://github.com/AlexBocken/mykb.git
synced 2025-11-05 09:20:55 +01:00
3.5 KiB
3.5 KiB
General
Rainloop is a web-based email client that works with your local install of dovecot etc. Its easy to install and use.
Setting up LEMP Stack
apt install mariadb-serversystemctl enable mysqlapt install php php-fpm php-mysql -ysystemctl enable php-fpm- to test the php setup add
location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; }
to your home site-available nginx config. Restart nginx using `systemctl restart nginx` and add a new page called `index.php` to your homepage direactory with `<?php phpinfo();?>` as the only content. If the php install worked fine, this will show you the installed php packages. Delete this afterwords.- to test the php setup add
Installing rainloop
apt install php7.3-{curl,xml}wget http://www.rainloop.net/repository/webmail/rainloop-community-latest.zipmkdir /var/www/html/rainloopunzip rainloop-community-latest.zip -d /var/www/html/rainloop/find /var/www/html/rainloop/ -type d -exec chmod 755 {} \;find /var/www/html/rainloop/ -type f -exec chmod 644 {} \;chown -R www-data.www-data /var/www/html/rainloop/- Edit the
nginxentry for the webmail :vim /etc/nginx/sites-available/rainloop.conf. Make sure that thephpversion you installed above matches the php version in line 20. It also should match the php version of the LEMP stack. Also change the hostname accordingly.
server {
listen 80;
server_name webmail.hostname.xyz;
root /var/www/html/rainloop;
access_log /var/log/rainloop/access.log;
error_log /var/log/rainloop/error.log;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_keep_conn on;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
location ^~ /data {
deny all;
}
}
mkdir /var/log/rainloopnginx -tln -s /etc/nginx/sites-available/rainloop.conf /etc/nginx/sites-enabled/systemctl reload nginx
Configure RainLoop
- Go to
http:/webmail.hostname.xyz/?admin. Here a webinterface should pop up (If not - ty to check the php install - all same versions? Is php accessible? Are the permissions set correctly? - Log in using
adminand12345. Strongly recommend to change that one as soon as you log in. This can be done underSecurityin the left menu. - Under
Domainsadd your local domains, ports and authentification method and delte the defaults. - Now you should be able to log in to the client on
webmail.hostname.xyzusing your email adress and password.
Add database for contacts
mysql -uroot -p- Add a database (copy paste each single line - change
rainlooppasswordto something propper
create database rainloopdb;
GRANT ALL PRIVILEGES ON rainloopdb.* TO 'rainloopuser'@'localhost' IDENTIFIED BY 'rainlooppassword';
flush privileges;
quit
- Go to the admin panel to
Contactsand activate the data base - Select storage
mysqland choose as DSNmysql:host=localhost;port=3306;dbname=rainloopdb. The user name israinloopuserand the password the password you used to set up the database.
Certbot
Give the webmail client proper security using certbot --nginx to extend your certificate.