Updated Installation instructions (markdown)

the-djmaze 2023-01-31 16:28:26 +01:00
parent c0e9674e97
commit 73818bd53e

@ -1,12 +1,10 @@
# Installation
This article helps with the setup of SnappyMail, it assumes a server that runs without a control panel (like cPanel, Plesk, DirectAdmin, etc). Instructions for servers with a control panel will follow.
## Security considerations
# Security considerations
Best practice would be to install webmail on a separate server, rather than on the mailserver. This creates service isolation and segmentation and tremendously benefits security. Despite the more hardened approach of this RainLoop fork, PHP doesn't have a perfect track record. Thus, decreasing the attack surface through isolation/segmentation is considered best practice. Furthermore, it increases the scalability and stability.
## Requirements
# Requirements
SnappyMail requires PHP 7.4 (or a newer version) with the following extensions:
* mbstring
@ -34,9 +32,9 @@ Optional extensions:
Supported Browsers: Google Chrome 69+, Firefox 78+, Safari 12+, Edge 79+
## General instructions
# General instructions
### SSH
## SSH
```sh
# Go to the directory where you want to install into
cd /var/www/webmail/snappymail
@ -49,7 +47,7 @@ find /var/www/webmail/snappymail -type f -exec chmod 644 {} \;
chown -R www-data:www-data /var/www/webmail/snappymail
```
### FTP
## FTP
1. Grab the latest release [from the releases page](https://github.com/the-djmaze/SnappyMail/releases).
2. Extract the release in an empty directory.
3. Upload the directory content to the document root of the (sub)domain that is serving webmail
@ -60,10 +58,10 @@ find /home/user/public_html/snappymail -type f -exec chmod 644 {} \;
chown -R user:user /home/user/public_html/snappymail
```
### Now access the admin page
## Now access the admin page
Open the admin UI `https://example.com/?admin` to configure your mail server settings. Login with user "admin" and password from the file ```/var/www/webmail/data/_data_/_default_/admin_password.txt```. If you have problems to call the admin UI, please try it in private mode of your browser. This way cookies and other cached data of previous installations are ignored.
### Admin password
## Admin password
:heavy_exclamation_mark: The password-file is created after first opening the admin UI!
:heavy_exclamation_mark: Be sure to immediately change the default password!
@ -71,7 +69,7 @@ Open the admin UI `https://example.com/?admin` to configure your mail server set
www.yourdomain.com/webmail?admin
```
### Secure `data` folder
## Secure `data` folder
You can move the `data` folder outside public http access for security.
1. Rename /var/www/webmail/_include.php to /var/www/webmail/include.php
2. Edit include.php and in there set the new APP_DATA_FOLDER_PATH. Like:
@ -84,21 +82,21 @@ You can move the `data` folder outside public http access for security.
define('APP_DATA_FOLDER_PATH', '/var/lib/snappymail/');
```
### GPG verify
## GPG verify
The GPG key to verify a package can be found at several places:
* https://keyserver.ubuntu.com Hockeypuck OpenPGP keyserver
https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1016e47079145542f8ba133548208ba13290f3eb
* https://snappymail.eu/repository/deb/48208BA13290F3EB.asc
* https://github.com/the-djmaze/snappymail/blob/master/build/SnappyMail.asc
## Upgrade
# Upgrade
To upgrade the installation, you simply need to upload files from the new package overwriting existing files. Directory structure is organized to have each new version installed to a different directory. Only a few files will be actually overwritten (/index.php and /data/VERSION).
All the additional reconfiguration will be done by the product on next run.
When the everything works, you may remove any old version that resides in /snappymail/v/.
## Migration/Upgrade from RainLoop
# Migration/Upgrade from RainLoop
SnappyMail is a semi-drop-in replacement for RainLoop. Due to changes in the plugin/extension management code, most plugins from RainLoop are not compatible, so you will need to replace them with equivalents from this SnappyMail repository, or if they're custom plugins, modify the code for compatibility with SnappyMail. See the plugins directory in this repository for samples to determine how best to modify your custom plugins to work with SnappyMail.
If you have very few plugins activated, you can expect minimal downtime from this migration. If there are many, it may take several hours to replace them all with compatible code.
@ -115,13 +113,18 @@ If you have very few plugins activated, you can expect minimal downtime from thi
[Reference Issue](https://github.com/the-djmaze/snappymail/issues/271)
## Integrations
# Integrations
### Arch Linux
## Email providers
* https://mxroute.com/
* https://openmbox.net/
* https://xyamail.com/
## Arch Linux
https://aur.archlinux.org/packages/snappymail
### Debian / Devuan
## Debian / Devuan
The repository is at https://snappymail.eu/repository/deb/
@ -137,11 +140,11 @@ deb [signed-by=/usr/share/keyrings/snappymail.gpg] https://snappymail.eu/reposit
Information is also available at https://github.com/the-djmaze/snappymail/issues/185
### Cloudron
## Cloudron
https://www.cloudron.io/store/eu.snappymail.cloudronapp.html
### cPanel
## cPanel
1. Download `snappymail-*-cpanel.tar.gz` from https://github.com/the-djmaze/snappymail/releases/latest
2. Extract file
3. Upload the content to your server root (`/`)
@ -154,25 +157,25 @@ Data will be stored at:
https://github.com/the-djmaze/snappymail/issues/697
### FreeBSD
## FreeBSD
https://www.freshports.org/mail/snappymail/
### Nextcloud
## Nextcloud
Information how to install the Nextcloud App for Snappymail can be found here https://github.com/the-djmaze/snappymail/blob/master/integrations/nextcloud/snappymail/README.md .
The app itself can also be found in the Nextcloud App Directory at https://apps.nextcloud.com/apps/snappymail .
### NixOS
## NixOS
https://github.com/NixOS/nixpkgs/tree/master/pkgs/servers/snappymail
### YunoHost
## YunoHost
https://github.com/YunoHost-Apps/snappymail_ynh
## Webserver configuration
### Nginx
# Webserver configuration
## Nginx
```
###
# Redirect insecure HTTP to the more secure HTTPS
@ -259,7 +262,7 @@ server {
}
```
### Apache + PHP-FPM
## Apache + PHP-FPM
```
Listen 2096
<Macro VHWebMail $host>