diff --git a/wildduck/config/wildduck-webmail/default.toml b/wildduck/config/wildduck-webmail/default.toml new file mode 100644 index 0000000..6b773f0 --- /dev/null +++ b/wildduck/config/wildduck-webmail/default.toml @@ -0,0 +1,20 @@ +name = "WildDuck Webmail" + +[www] +port = 3000 +host = "0.0.0.0" +secure = false + +[api] +url = "http://wildduck:8080" + +[dbs] +redis = "redis://redis:6379/1" +mongodb = "mongodb://mongo:27017/wildduck" + +[attachments] +type = "gridstore" +bucket = "attachments" + +[log] +level = "info" \ No newline at end of file diff --git a/wildduck/config/wildduck/default.toml b/wildduck/config/wildduck/default.toml new file mode 100644 index 0000000..fd574d0 --- /dev/null +++ b/wildduck/config/wildduck/default.toml @@ -0,0 +1,73 @@ +name = "WildDuck Mail Server" + +[api] +port = 8080 +host = "0.0.0.0" +secure = false + +[dbs] +mongodb = "mongodb://mongo:27017/wildduck" +redis = "redis://redis:6379/2" +gridfs = "mongodb://mongo:27017/wildduck" + +[imap] +port = 143 +host = "0.0.0.0" +secure = false +starttls = true + +[imaps] +port = 993 +host = "0.0.0.0" +secure = true + +[pop3] +port = 110 +host = "0.0.0.0" +secure = false +starttls = true + +[pop3s] +port = 995 +host = "0.0.0.0" +secure = true + +[smtp] +port = 25 +host = "0.0.0.0" +secure = false +starttls = true + +[submission] +port = 587 +host = "0.0.0.0" +secure = false +starttls = true +authRequired = true + +[attachments] +type = "gridstore" +bucket = "attachments" + +[log] +level = "info" + +[sender] +name = "mail.andreasknuth.de" +address = "mailer-daemon@andreasknuth.de" + +[emailDomain] +default = "andreasknuth.de" + +[acme] +enabled = false + +[elasticsearch] +enabled = false + +[lmtp] +enabled = false + +[tasks] +enabled = true +deleteAfter = 30 \ No newline at end of file diff --git a/wildduck/docker-compose.yml b/wildduck/docker-compose.yml index 23d8c58..e71d31b 100644 --- a/wildduck/docker-compose.yml +++ b/wildduck/docker-compose.yml @@ -1,21 +1,48 @@ services: - # MongoDB für WildDuck + wildduck: + image: ghcr.io/zone-eu/wildduck:1.45.5 + container_name: wildduck-server + restart: unless-stopped + ports: + - "127.0.0.1:8080:8080" # API + - "143:143" # IMAP + - "993:993" # IMAPS + - "110:110" # POP3 + - "995:995" # POP3S + - "587:587" # SMTP Submission + - "25:25" # SMTP + depends_on: + - mongo + - redis + volumes: + - ./config/wildduck:/wildduck/config + networks: + - mail_network + + wildduck-webmail: + image: nodemailer/wildduck-webmail:latest + container_name: wildduck-webmail + restart: unless-stopped + ports: + - "127.0.0.1:4000:3000" + depends_on: + - mongo + - redis + - wildduck + volumes: + - ./config/wildduck-webmail:/app/config + networks: + - mail_network + mongo: image: mongo:7.0 container_name: wildduck-mongo restart: unless-stopped - environment: - MONGO_INITDB_ROOT_USERNAME: wildduck - MONGO_INITDB_ROOT_PASSWORD: wildduck123 volumes: - - mongodb_data:/data/db - - mongodb_config:/data/configdb - ports: - - "127.0.0.1:27017:27017" + - mongo_data:/data/db networks: - mail_network - - # Redis für WildDuck + redis: image: redis:7.2-alpine container_name: wildduck-redis @@ -23,58 +50,13 @@ services: command: redis-server --appendonly yes volumes: - redis_data:/data - ports: - - "127.0.0.1:6379:6379" networks: - mail_network - # WildDuck Mail Server - wildduck: - image: nodemailer/wildduck:latest - container_name: wildduck-server - restart: unless-stopped - depends_on: - - mongo - - redis - volumes: - - ./wildduck.toml:/wildduck/config/default.toml - - wildduck_mail:/wildduck/mail - - wildduck_attachments:/wildduck/attachments - ports: - - "127.0.0.1:8080:8080" # API - - "25:25" # SMTP - - "587:587" # SMTP Submission - - "993:993" # IMAPS - - "127.0.0.1:995:995" # POP3S (nur lokal) - - "143:143" # IMAP - - "127.0.0.1:110:110" # POP3 (nur lokal) - networks: - - mail_network - - # WildDuck Webmail Interface - wildduck-webmail: - image: nodemailer/wildduck-webmail:latest - container_name: wildduck-webmail - restart: unless-stopped - depends_on: - - wildduck - - redis - environment: - - WEBMAIL_HOST=mail.andreasknuth.de - - WILDDUCK_API=http://wildduck:8080 - - REDIS_URL=redis://redis:6379 - ports: - - "127.0.0.1:4000:3000" - networks: - - mail_network +volumes: + mongo_data: + redis_data: networks: mail_network: - external: true - -volumes: - mongodb_data: - mongodb_config: - redis_data: - wildduck_mail: - wildduck_attachments: \ No newline at end of file + external: true \ No newline at end of file diff --git a/wildduck/wildduck.toml b/wildduck/wildduck.toml deleted file mode 100644 index 1865319..0000000 --- a/wildduck/wildduck.toml +++ /dev/null @@ -1,121 +0,0 @@ -name = "WildDuck Mail Server" - -[api] -port = 8080 -host = "0.0.0.0" -secure = false - -[dbs] -# MongoDB Verbindung -mongodb = "mongodb://wildduck:wildduck123@mongo:27017/wildduck" -# Redis Verbindung -redis = "redis://redis:6379/2" -# Attachments in GridFS -gridfs = "mongodb://wildduck:wildduck123@mongo:27017/wildduck" - -[imap] -port = 143 -host = "0.0.0.0" -secure = false -# STARTTLS aktivieren -starttls = true - -[imaps] -port = 993 -host = "0.0.0.0" -secure = true - -[pop3] -port = 110 -host = "0.0.0.0" -secure = false -starttls = true - -[pop3s] -port = 995 -host = "0.0.0.0" -secure = true - -[smtp] -port = 25 -host = "0.0.0.0" -secure = false -starttls = true -# Authentifikation für ausgehende Mails -authMethods = ["PLAIN", "LOGIN"] - -[submission] -port = 587 -host = "0.0.0.0" -secure = false -starttls = true -# Submission Port erfordert immer Authentifikation -authRequired = true - -[attachments] -type = "gridstore" -bucket = "attachments" - -[log] -level = "info" -# Logausgabe in JSON Format für bessere Verarbeitung -json = true - -[emailDomain] -# Hauptdomain -default = "andreasknuth.de" - -[sender] -# Hostname für SMTP HELO/EHLO -name = "mail.andreasknuth.de" -# Bounce-Adresse -address = "mailer-daemon@andreasknuth.de" - -# Amazon SES Integration wird später hinzugefügt -[relay] -enabled = false - -[tls] -# TLS-Konfiguration für SMTP -ciphers = "ECDHE+AESGCM:ECDHE+CHACHA20:DHE+AESGCM:DHE+CHACHA20:!aNULL:!MD5:!DSS" -minVersion = "TLSv1.2" - -[limits] -# Maximale Anzahl gleichzeitiger Verbindungen -windowSize = 1000 -# Maximale Nachrichten pro Verbindung -rcptTo = 100 -# Maximale Größe einer Nachricht (25MB) -maxSize = 26214400 - -[tasks] -# Automatische Bereinigungsaufgaben -enabled = true -# Gelöschte Nachrichten nach 30 Tagen endgültig löschen -deleteAfter = 30 - -[webhooks] -# Webhook-URLs für Events (für Auto-Reply und Forwarding) -enabled = true - -[auditLog] -# Audit-Log für Compliance -enabled = true -# Aufbewahrungszeit für Audit-Logs (365 Tage) -retention = 365 - -# LMTP Konfiguration hinzufügen -[lmtp] -enabled = true -port = 2424 -host = "0.0.0.0" -secure = false - -# ElasticSearch deaktivieren -[elasticsearch] -enabled = false - -# Access Control Konfiguration -[accessControl] -enabled = true -grants = [] \ No newline at end of file