Browse Source

made mailsrv host-agnostic

feature/startup-from-labels
Mario Alegre 4 years ago
parent
commit
125e569f1d
  1. 4
      mailsrv/assets/bin/mkvirt
  2. 4
      mailsrv/assets/postfix/main.cf.part
  3. 6
      mailsrv/docs/Deploy.md

4
mailsrv/assets/bin/mkvirt

@ -1,5 +1,9 @@
#!/bin/sh #!/bin/sh
### Domains ###
# /vol/data/domains should contain the configuration parameters for myhostname and virtual_alias_domains
cat /vol/data/domains /etc/postfix/main.cf.part > /etc/postfix/main.cf
### Users ### ### Users ###
# copy users db to dovecot config # copy users db to dovecot config

4
mailsrv/assets/postfix/main.cf → mailsrv/assets/postfix/main.cf.part

@ -2,8 +2,6 @@
# interfaces & protocols to listen on # interfaces & protocols to listen on
inet_interfaces = all inet_interfaces = all
inet_protocols = all inet_protocols = all
# primary name of server
myhostname = mail.alemor.org
myorigin = $mydomain myorigin = $mydomain
# what host to use as a relay # what host to use as a relay
relayhost = relayhost =
@ -13,8 +11,6 @@ relayhost =
mynetworks_style = host mynetworks_style = host
# domains to consider primary (local) endpoints # domains to consider primary (local) endpoints
mydestination = $myhostname, $mydomain, localhost.localdomain, localhost mydestination = $myhostname, $mydomain, localhost.localdomain, localhost
# domains to consider secondary (virtual) endpoints
virtual_alias_domains = epic.alemor.org, home.alemor.org, alegre.alemor.org, daniel.alemor.org, fernando.alemor.org, juana.alemor.org, mario.alemor.org, moreno.alemor.org, mar.alemor.org
### Users ### ### Users ###
# get list of valid users from here instead of /etc/passwd # get list of valid users from here instead of /etc/passwd

6
mailsrv/docs/Deploy.md

@ -57,15 +57,15 @@ git clone https://github.com/acmesh-official/acme.sh.git
cd acme.sh cd acme.sh
./acme.sh --install --home /usr/local/lib/acme-sh \ ./acme.sh --install --home /usr/local/lib/acme-sh \
--config-home /etc/acme-sh \ --config-home /etc/acme-sh \
--accountemail letsencrypt@mail.alemor.org --accountemail ${email:?}
``` ```
Then exit and relogin to refresh the bash hash Then exit and relogin to refresh the bash hash
``` ```
acme.sh --issue --alpn --pre-hook 'systemctl stop haproxy' \ acme.sh --issue --alpn --pre-hook 'systemctl stop haproxy' \
--post-hook 'systemctl start haproxy' -d mail.alemor.org --post-hook 'systemctl start haproxy' -d ${domain:?}
acme.sh --install-cert -d mail.alemor.org \ acme.sh --install-cert -d ${domain:?} \
--fullchain-file /srv/vol/mailsrv/ssl/fullchain.pem \ --fullchain-file /srv/vol/mailsrv/ssl/fullchain.pem \
--key-file /srv/vol/mailsrv/ssl/privkey.pem --key-file /srv/vol/mailsrv/ssl/privkey.pem
``` ```

Loading…
Cancel
Save