1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-12 10:45:38 +02:00

Support specifyin multiple hostnames

This commit is contained in:
kaiyou 2017-09-24 17:49:39 +02:00
parent 7e9c04cd65
commit a57096e613
4 changed files with 6 additions and 7 deletions

View File

@ -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)

View File

@ -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>

View File

@ -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

View File

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