docs: Improve setting-up tutorial

This commit is contained in:
fox.cpp 2021-04-12 10:32:49 +03:00
parent 21aad91071
commit 43d494e70a
No known key found for this signature in database
GPG key ID: 5B991F6215D2FCC0

View file

@ -22,7 +22,9 @@ there are a few things to keep in mind:
- Make sure your provider does not block SMTP traffic (25 TCP port). Most VPS
providers don't do it, but some "cloud" providers (such as Google Cloud) do
it, so you can't host your mail there.
- ...
- It is recommended to run your own DNS resolver with DNSSEC verification
enabled.
## Installing maddy
@ -33,8 +35,11 @@ Your options are:
Available on [GitHub](https://github.com/foxcpp/maddy/releases) or
[maddy.email](https://maddy.email/).
The tarball contains the full filesystem tree so you can directly
extract it into root directory (or you can take just executable).
The tarball includes maddy and maddyctl executables you can
copy into /usr/local/bin as well as systemd unit file you can
use on systemd-based distributions for automatic startup and service
supervision. You should also create "maddy" user and group.
See below for more detailed instructions.
* Docker image (Linux, amd64)
@ -49,6 +54,32 @@ Your options are:
See [here](../building-from-source) for instructions.
* Arch Linux packages
For Arch Linux users, `maddy` and `maddy-git` PKGBUILDs are available
in AUR. Additionally, binary packages are available in 3rd-party
repository at https://foxcpp.dev/archlinux/
## System configuration (systemd-based distribution)
If you built maddy from source and used `./build.sh install` then
systemd unit files should be already installed. If you used
a pre-built tarball - copy `systemd/*.service` to /etc/systemd/system
manually.
You need to reload service manager configuration to service available:
```
systemctl daemon-reload
```
Additionally, you should create maddy user and group. Unlike most other
Linux mail servers, maddy never runs as root.
```
useradd -mrU -s /sbin/nologin -d /var/lib/maddy -c "maddy mail server" maddy
```
## Host name + domain
Open /etc/maddy/maddy.conf with vim^W your favorite editor and change
@ -113,11 +144,10 @@ acme.sh --force --install-cert -d mx1.example.org \
## First run
```
systemctl daemon-reload
systemctl start maddy
```
Well, it should be running now, except that it is useless because we haven't
The daemon should be running now, except that it is useless because we haven't
configured DNS records.
## DNS records