Change default values for base config macros

Example $(hostname) is now equal to $(primary_domain).

$(local_domains) now contains only $(primary_domain).

tls directive contains values that represent certbot
store structure, allowing easier configuration by symlinking
/etc/maddy/certs to /etc/letscrypt/live.
This commit is contained in:
fox.cpp 2019-10-30 01:11:57 +03:00
parent 10b6b07455
commit ccb9c9df4c
No known key found for this signature in database
GPG key ID: E76D97CCEDE90B6C
2 changed files with 14 additions and 14 deletions

View file

@ -99,7 +99,7 @@ $HOME/go/bin).
## Quick start
*Note*: explaination below is short and assumes that you already have
base ideas about how email works. If you are not sure, Project Wiki
basic ideas about how email works. If you are not sure, Project Wiki
contains a [more detailed tutorial](https://github.com/foxcpp/maddy/wiki/Setting-up-a-mail-server-with-maddy).
1. Install maddy and maddyctl (see above)
@ -109,14 +109,12 @@ contains a [more detailed tutorial](https://github.com/foxcpp/maddy/wiki/Setting
see `maddy -help`.
4. Open maddy.conf with ~~vim~~your favorite editor and change
the following:
- `tls cert_file key_file`
- `tls ...`
Change to paths to TLS certificate and key.
- `hostname`
- `$(hostname)`
Server identifier. Put your domain here if you have only one server.
- `$(primary_domain)`
Put the "main" domain you are handling messages for here.
- `$(local_domains)`
If you have additional domains you want to accept mail for - put them here.
5. Run the executable.
6. On first start-up server will generate a RSA-2048 keypair for DKIM and tell
you where file with DNS record text is placed. You need to add it to your

View file

@ -1,26 +1,28 @@
# Location of TLS certificate and private key. Global directive is used for all
# endpoints.
tls cert_file_path pkey_file
# hostname is the identifier of this mail server.
# It is recommended to set it to the domain that resolves to the IP of this
# server.
hostname mx1.example.org
$(hostname) = example.org
# Primary domain is used as a sender of autogenerated messages and
# ADMD for DKIM signatures. You might want to change later when
# managing multiple domains.
# ADMD for DKIM signatures.
# For simple configurations, it is usually equal to $(hostname).
$(primary_domain) = example.org
# All domains we want to receive messages for.
# Just remove 'example.com' here if you handle only $(primary_domain).
$(local_domains) = $(primary_domain) example.com
$(local_domains) = $(primary_domain)
# Location of TLS certificate and private key. Global directive is used for all
# endpoints.
tls /etc/maddy/certs/$(hostname)/fullchain.pem \
/etc/maddy/certs/$(hostname)/privkey.pem
# -------------
# Below are all remaining details you probably don't have to care
# about if you just want a working mail server.
# -------------
hostname $(hostname)
# Domain that will be used in From field in auto-generated messages.
# (notably, notifications about failed deliveries)
autogenerated_msg_domain $(primary_domain)