{% call macros.panel("info", "Step 4 - expose Mailu to the world") %}
<p>A mail server must be exposed to the world to receive emails, send emails,
and let users access their mailboxes. Mailu has some flexibility in the way
you expose it to the world.</p>

<div class="form-check form-check-inline">
  <label class="form-check-label">
    <input class="form-check-input" type="checkbox" name="resolver_enabled" value="true">
    Enable unbound resolver
  </label>
</div>

<div class="form-group">
  <label>Subnet of the docker network. This should not conflict with any networks to which your system is connected. (Internal and external!)</label>
  <input class="form-control" type="text" name="subnet" required pattern="^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))$"
    value="192.168.203.0/24">
</div>

<p>You server will be available under a main hostname but may expose multiple public
hostnames. Every e-mail domain that points to this server must have one of the
hostnames in its <code>MX</code> record. Hostnames must be coma-separated.</p>

<div class="form-group">
  <label>Public hostnames</label>
<!--   Validates hostname or list of hostnames -->
  <input class="form-control" type="text" name="hostnames" placeholder="my.host.name,other.host.name" multiple required
    	pattern="^(?:(?:\w+(?:-+\w+)*\.)+[a-z]+)*(?:,(?:(?:\w+(?:-+\w+)*\.)+[a-z]+)\s*)*$">
</div>
{% endcall %}
