Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# If there is already a traefik container running on your host, you can comment out the first include line.
# But make sure that...
# - container `sl-app` can join traefiks network, defined in traefic static config `providers.docker.network`
Expand All @@ -10,7 +9,7 @@ include:
- postfix-compose.yaml

networks:
default:
internal:
driver: bridge
ipam:
driver: default
Expand Down
24 changes: 24 additions & 0 deletions postfix-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,35 @@ services:
## POSTFIX
## =================

dns:
image: crazymax/unbound:latest
container_name: dns
user: "0:0"
cap_add:
- NET_BIND_SERVICE
networks:
internal:
ipv4_address: 10.0.0.53
volumes:
- ./unbound/conf.d/:/config/:ro
restart: unless-stopped
entrypoint:
- /bin/sh
- -ec
- |
unbound-anchor -a /var/run/unbound/root.key || true
exec su -s /bin/sh unbound -c "sh /entrypoint.sh"

postfix:
image: private/postfix:latest
build:
context: ./postfix/
dockerfile: Dockerfile
container_name: postfix
dns:
- '10.0.0.53'
networks:
- internal
env_file: .env
ports:
- '25:25'
Expand All @@ -18,6 +41,7 @@ services:
- certs:/certs:ro
restart: unless-stopped
depends_on:
- dns
- email
- traefik-certificate-exporter
labels:
Expand Down
3 changes: 3 additions & 0 deletions postfix/templates/30-icf-dane.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

smtp_dns_support_level = dnssec
smtp_tls_security_level = dane
6 changes: 5 additions & 1 deletion simple-login-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ x-sl-defaults: &sl-defaults
- ./pgp:/sl/pgp
- ./upload:/code/static/upload
- ./dkim.key:/dkim.key
networks:
- internal

services:

Expand All @@ -20,6 +22,8 @@ services:
interval: 10s
retries: 3
start_period: 1s
networks:
- internal
volumes:
- ./db:/var/lib/postgresql/data
restart: unless-stopped
Expand All @@ -45,7 +49,7 @@ services:
container_name: sl-app
networks:
- traefik
- default
- internal
restart: unless-stopped
depends_on:
init:
Expand Down
14 changes: 14 additions & 0 deletions unbound/conf.d/00-unbound.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Module configuration - disable subnetcache (not needed for local resolver)
module-config: "validator iterator"

# Listen to for queries from clients and answer from this network interface
# and port.
interface: 0.0.0.0
interface: ::1
port: 53

# Report this identity rather than the hostname of the server.
identity: "DNS"

# root.hints enable unbound to perform recursive resolution
root-hints: "/usr/share/dns-root-hints/named.root"
2 changes: 2 additions & 0 deletions unbound/conf.d/10-logging.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
log-queries: yes
verbosity: 2