Support specifyin multiple hostnames

master
kaiyou 7 years ago
parent 7e9c04cd65
commit a57096e613

@ -23,9 +23,7 @@ BIND_ADDRESS=127.0.0.1
# Main mail domain
DOMAIN=mailu.io
# Main hostname for announces, and list of all available hostnames, separated
# by comas
HOSTNAME=mail.mailu.io
# Hostnames for this server, separated with comas
HOSTNAMES=mail.mailu.io,alternative.mailu.io,yetanother.mailu.io
# Postmaster local part (will append the main mail domain)

@ -15,6 +15,7 @@
{% endblock %}
{% block box %}
{% let hostname = config["HOSTNAMES"].split(",")[0] %}
<table class="table table-bordered">
<tbody>
<tr>
@ -28,8 +29,8 @@
<tr>
<th>{% trans %}DNS SPF entries{% endtrans %}</th>
<td><pre>
{{ domain.name }}. 600 IN TXT "v=spf1 mx a:{{ config["HOSTNAME"] }} -all"
{{ domain.name }}. 600 IN SPF "v=spf1 mx a:{{ config["HOSTNAME"] }} -all"</pre></td>
{{ domain.name }}. 600 IN TXT "v=spf1 mx a:{{ hostname }} -all"
{{ domain.name }}. 600 IN SPF "v=spf1 mx a:{{ hostname }} -all"</pre></td>
</tr>
{% if domain.dkim_publickey %}
<tr>

@ -4,7 +4,7 @@
log_path = /dev/stderr
protocols = imap pop3 lmtp sieve
postmaster_address = {{ POSTMASTER }}@{{ DOMAIN }}
hostname = {{ HOSTNAME }}
hostname = {{ HOSTNAMES.split(",")[0] }}
mail_plugins = $mail_plugins quota
submission_host = smtp

@ -4,7 +4,7 @@
# Main domain and hostname
mydomain = {{ DOMAIN }}
myhostname = {{ HOSTNAME }}
myhostname = {{ HOSTNAMES.split(",")[0] }}
myorigin = $mydomain
# Queue location

Loading…
Cancel
Save