mirror of
https://github.com/Mailu/Mailu.git
synced 2025-01-28 03:56:43 +02:00
Provide some first configuration items
This commit is contained in:
parent
8efc51bc29
commit
5a9f01d473
@ -0,0 +1,124 @@
|
||||
{% set env='mailu.env' %}
|
||||
# This file is auto-generated by the Mailu configuration wizard.
|
||||
# Please read the documentation before attempting any change.
|
||||
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
|
||||
# External dependencies
|
||||
redis:
|
||||
image: redis:alpine
|
||||
restart: always
|
||||
volumes:
|
||||
- "$ROOT/redis:/data"
|
||||
|
||||
# Core services
|
||||
front:
|
||||
image: mailu/nginx:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
env:
|
||||
- TLS_FLAVOR={{ tls_flavor or 'letsencrypt' }}
|
||||
- ADMIN={{ expose_admin or 'no' }}
|
||||
ports:
|
||||
{% for port in (80, 443, 25, 465, 587, 110, 995, 143, 993) %}
|
||||
{% if bind4 %}
|
||||
- "$PUBLIC_IPV4:{{ port }}:{{ port }}"
|
||||
{% endif %}
|
||||
{% if bind6 %}
|
||||
- "$PUBLIC_IPV6:{{ port }}:{{ port }}"
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if flavor in ('cert', 'mail') %}
|
||||
volumes:
|
||||
- "$ROOT/certs:/certs"
|
||||
{% endif %}
|
||||
|
||||
admin:
|
||||
image: mailu/admin:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
{% if not expose_admin %}
|
||||
ports:
|
||||
- 127.0.0.1:8080:80
|
||||
{% endif %}
|
||||
volumes:
|
||||
- "$ROOT/data:/data"
|
||||
- "$ROOT/dkim:/dkim"
|
||||
depends_on:
|
||||
- redis
|
||||
|
||||
imap:
|
||||
image: mailu/dovecot:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
volumes:
|
||||
- "$ROOT/data:/data"
|
||||
- "$ROOT/mail:/mail"
|
||||
- "$ROOT/overrides:/overrides"
|
||||
depends_on:
|
||||
- front
|
||||
|
||||
smtp:
|
||||
image: mailu/postfix:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
volumes:
|
||||
- "$ROOT/data:/data"
|
||||
- "$ROOT/overrides:/overrides"
|
||||
depends_on:
|
||||
- front
|
||||
|
||||
# Optional services
|
||||
{% if enable_antispam %}
|
||||
antispam:
|
||||
image: mailu/rspamd:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
volumes:
|
||||
- "$ROOT/filter:/var/lib/rspamd"
|
||||
- "$ROOT/dkim:/dkim"
|
||||
- "$ROOT/overrides/rspamd:/etc/rspamd/override.d"
|
||||
depends_on:
|
||||
- front
|
||||
{% endif %}
|
||||
|
||||
{% if enable_antivirus %}
|
||||
antivirus:
|
||||
image: mailu/clamav:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
volumes:
|
||||
- "$ROOT/filter:/data"
|
||||
{% endif %}
|
||||
|
||||
{% if enable_webdav %}
|
||||
webdav:
|
||||
image: mailu/radivale:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
volumes:
|
||||
- "$ROOT/dav:/data"
|
||||
{% endif %}
|
||||
|
||||
{% if enable_fetchmail %}
|
||||
fetchmail:
|
||||
image: mailu/fetchmail:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
volumes:
|
||||
- "$ROOT/data:/data"
|
||||
{% endif %}
|
||||
|
||||
# Webmail
|
||||
{% if enable_webmail %}
|
||||
webmail:
|
||||
image: mailu/{{ webmail }}:{{ version }}
|
||||
restart: always
|
||||
env_file: {{ env }}
|
||||
volumes:
|
||||
- "$ROOT/webmail:/data"
|
||||
depends_on:
|
||||
- imap
|
||||
{% endif %}
|
@ -0,0 +1,108 @@
|
||||
# Mailu main configuration file
|
||||
#
|
||||
# This file is autogenerated by the configuration management wizard.
|
||||
# For a detailed list of configuration variables, see the documentation at
|
||||
# https://mailu.io
|
||||
|
||||
###################################
|
||||
# Common configuration variables
|
||||
###################################
|
||||
|
||||
# Set this to the path where Mailu data and configuration is stored
|
||||
ROOT=/mailu
|
||||
|
||||
# Set to a randomly generated 16 bytes string
|
||||
SECRET_KEY={{ secret(16) }}
|
||||
|
||||
# Address where listening ports should bind
|
||||
{% if bind4 %}PUBLIC_IPV4={{ bind4 }}{% endif %}
|
||||
{% if bind6 %}PUBLIC_IPV6={{ bind6 }}{% endif %}
|
||||
|
||||
# Mail address of the postmaster
|
||||
POSTMASTER={{ postmaster }}
|
||||
|
||||
# Hostnames for this server, separated with comas
|
||||
HOSTNAMES={{ hostnames }}
|
||||
|
||||
# Authentication rate limit (per source IP address)
|
||||
AUTH_RATELIMIT={{ auth_ratelimit }}
|
||||
|
||||
# Opt-out of statistics, replace with "True" to opt out
|
||||
DISABLE_STATISTICS={{ disable_statistics }}
|
||||
|
||||
###################################
|
||||
# Server behavior
|
||||
###################################
|
||||
|
||||
# Message size limit in bytes
|
||||
# Default: accept messages up to 50MB
|
||||
MESSAGE_SIZE_LIMIT={{ message_size_limit }}
|
||||
|
||||
# Networks granted relay permissions, make sure that you include your Docker
|
||||
# internal network (default to 172.17.0.0/16)
|
||||
RELAYNETS={{ relaynets }}
|
||||
|
||||
# Will relay all outgoing mails if configured
|
||||
RELAYHOST={{ relayhost }}
|
||||
|
||||
# Fetchmail delay
|
||||
FETCHMAIL_DELAY={{ fetchmail_delay }}
|
||||
|
||||
# Recipient delimiter, character used to delimiter localpart from custom address part
|
||||
RECIPIENT_DELIMITER={{ recipient_delimiter }}
|
||||
|
||||
{% if dmarc_rua or dmarc_ruf %}
|
||||
# DMARC rua and ruf email
|
||||
{% if dmarc_rua %}DMARC_RUA={{ dmarc_rua }}{% endif %}
|
||||
{% if dmarc_ruf %}DMARC_RUF={{ dmarc_ruf }}{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if welcome_enabled %}
|
||||
# Welcome email, enable and set a topic and body if you wish to send welcome
|
||||
# emails to all users.
|
||||
WELCOME={{ welcome_enable }}
|
||||
WELCOME_SUBJECT={{ welcome_subject }}
|
||||
WELCOME_BODY={{ welcome_body }}
|
||||
{% endif %}
|
||||
|
||||
{% if domain_registration %}
|
||||
# Domain registration (remove to disable)
|
||||
DOMAIN_REGISTRATION=true
|
||||
{% endif %}
|
||||
|
||||
###################################
|
||||
# Web settings
|
||||
###################################
|
||||
|
||||
# Path to the admin interface if enabled
|
||||
WEB_ADMIN=/admin
|
||||
|
||||
# Path to the webmail if enabled
|
||||
WEB_WEBMAIL=/webmail
|
||||
|
||||
# Website name
|
||||
SITENAME=Mailu
|
||||
|
||||
# Linked Website URL
|
||||
WEBSITE=https://mailu.io
|
||||
|
||||
{% if recaptcha_public_key and recaptcha_private_key %}
|
||||
# Registration reCaptcha settings (warning, this has some privacy impact)
|
||||
# RECAPTCHA_PUBLIC_KEY={{ recaptcha_public_key }}
|
||||
# RECAPTCHA_PRIVATE_KEY={{ recaptcha_private_key }}
|
||||
{% endif %}
|
||||
|
||||
###################################
|
||||
# Advanced settings
|
||||
###################################
|
||||
|
||||
{% if password_scheme %}
|
||||
# Specific password storage scheme
|
||||
PASSWORD_SCHEME={{ password_scheme }}
|
||||
{% endif %}
|
||||
|
||||
# Header to take the real ip from
|
||||
REAL_IP_HEADER={{ real_ip_header }}
|
||||
|
||||
# IPs for nginx set_real_ip_from (CIDR list separated by commas)
|
||||
REAL_IP_FROM={{ real_ip_from }}
|
@ -4,15 +4,15 @@
|
||||
<p>Docker Compose expects a project file, named <code>docker-compose.yml</code>
|
||||
in a project directory. First create your project directory.</p>
|
||||
|
||||
<pre><code>mkdir /path/to/project
|
||||
<pre><code>mkdir /mailu
|
||||
</pre></code>
|
||||
|
||||
<p>Then download the project file. A side configuration file makes it easier
|
||||
to read and check the configuration variables generated by the wizard.</p>
|
||||
|
||||
<pre><code>cd /path/to/project
|
||||
wget https://...
|
||||
wget https://...
|
||||
<pre><code>cd /mailu
|
||||
wget {{ url_for('.file', uid=uid, filepath='docker-compose.yml', _external=True) }}
|
||||
wget {{ url_for('.file', uid=uid, filepath='mailu.env', _external=True) }}
|
||||
</pre></code>
|
||||
{% endcall %}
|
||||
|
||||
@ -30,7 +30,7 @@ files before going any further.</p>
|
||||
<p>To start your compose project, simply run the Docker Compose <code>up</code>
|
||||
command.</p>
|
||||
|
||||
<pre><code>cd /path/to/project
|
||||
<pre><code>cd /mailu
|
||||
docker-compose up -d
|
||||
</pre></code>
|
||||
{% endcall %}
|
||||
|
@ -10,16 +10,16 @@ IP addresses in order to expose its public services. You must at least setup
|
||||
an IPv4 or an IPv6 address if you wish to access Mailu.</p>
|
||||
|
||||
<p><span class="label label-warning">Warning</span> You must use specific addresses, please
|
||||
avoid generic all-interfaces addresses like <em>0.0.0.0</em> or <em>::</em>.</p>
|
||||
avoid generic all-interfaces addresses like <code>0.0.0.0</code> or <code>::</code>.</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label>IPv4 listen address</label>
|
||||
<input class="form-control" type="text" placeholder="1.2.3.4">
|
||||
<input class="form-control" type="text" name="bind4" placeholder="1.2.3.4">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>IPv6 listen address</label>
|
||||
<input class="form-control" type="text" placeholder="1.2.3.4">
|
||||
<input class="form-control" type="text name="bind6" placeholder="2001:be4:1234::1">
|
||||
</div>
|
||||
|
||||
{% endcall %}
|
||||
|
@ -11,7 +11,7 @@
|
||||
ready when using this wizard.
|
||||
{% endcall %}
|
||||
|
||||
<form method="post" action="{{ url_for(".setup") }}">
|
||||
<form method="post" action="{{ url_for(".submit") }}">
|
||||
{% include "steps/flavor.html" %}
|
||||
{% include "steps/expose.html" %}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user