Removed server_ for better overview

This commit is contained in:
2023-08-22 22:53:44 +02:00
parent 571bed27a3
commit 4254642313
246 changed files with 45 additions and 45 deletions

View File

@@ -0,0 +1,7 @@
[Unit]
Description=Let's Encrypt Mailu Deploy
OnFailure=systemd-notifier@%n.service
[Service]
Type=oneshot
ExecStart=/usr/bin/bash {{path_administrator_scripts}}mailu/deploy-letsencrypt-mailu.sh

View File

@@ -0,0 +1,4 @@
#!/bin/sh
cp /etc/letsencrypt/live/{{domain}}/privkey.pem /etc/mailu/certs/key.pem || exit 1
cp /etc/letsencrypt/live/{{domain}}/fullchain.pem /etc/mailu/certs/cert.pem || exit 1
docker exec {{mailu_front_container_name}} nginx -s reload

View File

@@ -0,0 +1,10 @@
[Unit]
Description=Deployment of Let's Encrypt's certificates
[Timer]
OnCalendar={{on_calendar_deploy_mailu_certificates}}
RandomizedDelaySec={{randomized_delay_sec}}
Persistent=true
[Install]
WantedBy=timers.target

View File

@@ -0,0 +1,255 @@
version: '2.2'
services:
# External dependencies
redis:
image: redis:alpine
restart: always
env_file: mailu.env
volumes:
- "redis_data:/data"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 3s
retries: 30
logging:
driver: journald
depends_on:
- resolver
dns:
- 192.168.203.254
database:
image: mariadb
restart: always
environment:
MYSQL_DATABASE: "mailu"
MYSQL_USER: "mailu"
MYSQL_PASSWORD: "{{mailu_database_password}}"
MYSQL_ROOT_PASSWORD: "{{mailu_database_password}}"
MARIADB_AUTO_UPGRADE: "1"
volumes:
- database:/var/lib/mysql
healthcheck:
test: "/usr/bin/mariadb --user=mailu --password={{mailu_database_password}} --execute \"SHOW DATABASES;\""
interval: 3s
timeout: 1s
retries: 5
logging:
driver: journald
depends_on:
- resolver
dns:
- 192.168.203.254
networks:
- default
- webmail
- radicale
# Core services
resolver:
image: ghcr.io/mailu/unbound:{{mailu_version}}
env_file: mailu.env
restart: always
networks:
default:
ipv4_address: 192.168.203.254
logging:
driver: journald
front:
image: ghcr.io/mailu/nginx:{{mailu_version}}
restart: always
env_file: mailu.env
logging:
driver: journald
ports:
- "127.0.0.1:{{ http_port }}:80"
- "{{ ip4_address }}:25:25"
- "{{ ip4_address }}:465:465"
- "{{ ip4_address }}:{{system_email_port}}:{{system_email_port}}"
- "{{ ip4_address }}:110:110"
- "{{ ip4_address }}:995:995"
- "{{ ip4_address }}:143:143"
- "{{ ip4_address }}:993:993"
volumes:
- "/etc/mailu/overrides/nginx:/overrides:ro"
- "/etc/mailu/certs:/certs"
depends_on:
resolver:
condition: service_started
database:
condition: service_healthy
networks:
- default
- webmail
- radicale
dns:
- 192.168.203.254
admin:
image: ghcr.io/mailu/admin:{{mailu_version}}
restart: always
env_file: mailu.env
volumes:
- "admin_data:/data"
- "dkim:/dkim"
depends_on:
- resolver
- front
- redis
- database
logging:
driver: journald
dns:
- 192.168.203.254
imap:
image: ghcr.io/mailu/dovecot:{{mailu_version}}
restart: always
env_file: mailu.env
volumes:
- "dovecot_mail:/mail"
- "/etc/mailu/overrides:/overrides:ro"
depends_on:
- front
- resolver
dns:
- 192.168.203.254
logging:
driver: journald
smtp:
image: ghcr.io/mailu/postfix:{{mailu_version}}
restart: always
env_file: mailu.env
volumes:
- "/etc/mailu/overrides:/overrides:ro"
- "smtp_queue:/queue"
depends_on:
- front
- resolver
dns:
- 192.168.203.254
logging:
driver: journald
oletools:
image: ghcr.io/mailu/oletools:{{mailu_version}}
hostname: oletools
restart: always
depends_on:
- resolver
dns:
- 192.168.203.254
networks:
- noinet
antispam:
image: ghcr.io/mailu/rspamd:{{mailu_version}}
restart: always
env_file: mailu.env
volumes:
- "filter:/var/lib/rspamd"
- "dkim:/dkim"
- "/etc/mailu/overrides/rspamd:/overrides:ro"
depends_on:
- front
- redis
- antivirus
- resolver
dns:
- 192.168.203.254
networks:
- default
- noinet
logging:
driver: journald
# Optional services
antivirus:
image: ghcr.io/mailu/clamav:{{mailu_version}}
restart: always
env_file: mailu.env
volumes:
- "filter:/data"
depends_on:
- resolver
dns:
- 192.168.203.254
logging:
driver: journald
webdav:
image: ghcr.io/mailu/radicale:{{mailu_version}}
restart: always
env_file: mailu.env
volumes:
- "webdav_data:/data"
logging:
driver: journald
networks:
- radicale
depends_on:
- resolver
dns:
- 192.168.203.254
fetchmail:
image: ghcr.io/mailu/fetchmail:{{mailu_version}}
volumes:
- "admin_data:/data"
restart: always
env_file: mailu.env
logging:
driver: journald
depends_on:
- admin
- smtp
- imap
- resolver
dns:
- 192.168.203.254
webmail:
image: ghcr.io/mailu/webmail:{{mailu_version}}
restart: always
env_file: mailu.env
volumes:
- "webmail_data:/data"
depends_on:
- imap
- front
- resolver
logging:
driver: journald
networks:
- webmail
dns:
- 192.168.203.254
volumes:
database:
smtp_queue:
admin_data:
webdav_data:
webmail_data:
filter:
dkim:
dovecot_mail:
redis_data:
networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: {{mailu_subnet}}
radicale:
driver: bridge
webmail:
driver: bridge
noinet:
driver: bridge
internal: true

View File

@@ -0,0 +1,154 @@
# Mailu main configuration file
#
# This file is autogenerated by the configuration management wizard for compose flavor.
# For a detailed list of configuration variables, see the documentation at
# https://mailu.io
###################################
# Common configuration variables
###################################
# Set to a randomly generated 16 bytes string
SECRET_KEY={{mailu_secret_key}}
# Subnet of the docker network. This should not conflict with any networks to which your system is connected. (Internal and external!)
SUBNET={{mailu_subnet}}
# Main mail domain
DOMAIN={{mailu_domain}}
# Hostnames for this server, separated with comas
HOSTNAMES={{domain}}
# Postmaster local part (will append the main mail domain)
POSTMASTER=admin
# Choose how secure connections will behave (value: letsencrypt, cert, notls, mail, mail-letsencrypt)
TLS_FLAVOR=mail
# Authentication rate limit (per source IP address)
AUTH_RATELIMIT=10/minute;1000/hour
# Opt-out of statistics, replace with "True" to opt out
DISABLE_STATISTICS=True
###################################
# Optional features
###################################
# Expose the admin interface (value: true, false)
ADMIN=true
# Choose which webmail to run if any (values: roundcube, rainloop, none)
WEBMAIL=roundcube
# Dav server implementation (value: radicale, none)
WEBDAV=radicale
# Antivirus solution (value: clamav, none)
ANTIVIRUS=clamav
###################################
# Mail settings
###################################
# Message size limit in bytes
# Default: accept messages up to 50MB
# Max attachment size will be 33% smaller
MESSAGE_SIZE_LIMIT=50000000
# Networks granted relay permissions
# Use this with care, all hosts in this networks will be able to send mail without authentication!
RELAYNETS=
# Will relay all outgoing mails if configured
RELAYHOST=
# Fetchmail delay
FETCHMAIL_DELAY=600
# Recipient delimiter, character used to delimiter localpart from custom address part
RECIPIENT_DELIMITER=+
# DMARC rua and ruf email
DMARC_RUA=admin
DMARC_RUF=admin
# Welcome email, enable and set a topic and body if you wish to send welcome
# emails to all users.
WELCOME=false
WELCOME_SUBJECT=Welcome to your new email account
WELCOME_BODY=Welcome to your new email account, if you can read this, then it is configured properly!
# Maildir Compression
# choose compression-method, default: none (value: bz2, gz)
COMPRESSION=
# change compression-level, default: 6 (value: 1-9)
COMPRESSION_LEVEL=
###################################
# Web settings
###################################
# Path to redirect / to
WEBROOT_REDIRECT=/webmail
# Path to the admin interface if enabled
WEB_ADMIN=/admin
# Path to the webmail if enabled
WEB_WEBMAIL=/webmail
# Website name
SITENAME=Mailservices
# Linked Website URL
WEBSITE=https://{{domain}}
###################################
# Advanced settings
###################################
# Log driver for front service. Possible values:
# json-file (default)
# journald (On systemd platforms, useful for Fail2Ban integration)
# syslog (Non systemd platforms, Fail2Ban integration. Disables `docker-compose log` for front!)
# LOG_DRIVER=json-file
# docker-compose project name, this will prepended to containers names.
COMPOSE_PROJECT_NAME=mailu
# Default password scheme used for newly created accounts and changed passwords
# (value: BLF-CRYPT, SHA512-CRYPT, SHA256-CRYPT, MD5-CRYPT, CRYPT)
PASSWORD_SCHEME=BLF-CRYPT
# Header to take the real ip from
REAL_IP_HEADER=
# IPs for nginx set_real_ip_from (CIDR list separated by commas)
REAL_IP_FROM=
# choose wether mailu bounces (no) or rejects (yes) mail when recipient is unknown (value: yes, no)
REJECT_UNLISTED_RECIPIENT=
# Log level threshold in start.py (value: CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET)
LOG_LEVEL=WARNING
###################################
# Database settings
###################################
DB_FLAVOR=mysql
DB_USER=mailu
DB_PW={{mailu_database_password}}
DB_HOST=database:3306
DB_NAME=mailu
ROUNDCUBE_DB_FLAVOR=mysql
ROUNDCUBE_DB_USER=mailu
ROUNDCUBE_DB_PW={{mailu_database_password}}
ROUNDCUBE_DB_NAME=mailu
ROUNDCUBE_DB_HOST=database:3306
API_TOKEN={{mailu_api_token}}