Skip to content

Commit 6f10f3f

Browse files
committed
✨ hub: Add mailcow
1 parent f0b4e26 commit 6f10f3f

4 files changed

Lines changed: 1020 additions & 0 deletions

File tree

hub/mailcow/.env

Lines changed: 299 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,299 @@
1+
PROJECT=mailcow
2+
DOMAIN=stack.localhost
3+
4+
# ------------------------------
5+
# mailcow web ui configuration
6+
# ------------------------------
7+
# example.org is _not_ a valid hostname, use a fqdn here.
8+
# Default admin user is "admin"
9+
# Default password is "moohoo"
10+
11+
MAILCOW_HOSTNAME=${PROJECT}.${DOMAIN}
12+
13+
# Password hash algorithm
14+
# Only certain password hash algorithm are supported. For a fully list of supported schemes,
15+
# see https://docs.mailcow.email/models/model-passwd/
16+
MAILCOW_PASS_SCHEME=BLF-CRYPT
17+
18+
# ------------------------------
19+
# SQL database configuration
20+
# ------------------------------
21+
22+
DBNAME=mailcow
23+
DBUSER=mailcow
24+
25+
# Please use long, random alphanumeric strings (A-Za-z0-9)
26+
27+
DBPASS=yHUexaa0ajkzXSmHqTnKQeY33Jy0
28+
DBROOT=fSOtQ26CRDNnR43x22iAGVZlOser
29+
30+
# ------------------------------
31+
# REDIS configuration
32+
# ------------------------------
33+
34+
REDISPASS=ZBVORWg0AsojCrZe7U8BE0jWWcYt
35+
36+
# ------------------------------
37+
# HTTP/S Bindings
38+
# ------------------------------
39+
40+
# You should use HTTPS, but in case of SSL offloaded reverse proxies:
41+
# Might be important: This will also change the binding within the container.
42+
# If you use a proxy within Docker, point it to the ports you set below.
43+
# Do _not_ use IP:PORT in HTTP(S)_BIND or HTTP(S)_PORT
44+
# IMPORTANT: Do not use port 8081, 9081, 9082 or 65510!
45+
# Example: HTTP_BIND=1.2.3.4
46+
# For IPv4 leave it as it is: HTTP_BIND= & HTTPS_PORT=
47+
# For IPv6 see https://docs.mailcow.email/post_installation/firststeps-ip_bindings/
48+
49+
HTTP_PORT=80
50+
HTTP_BIND=
51+
52+
HTTPS_PORT=443
53+
HTTPS_BIND=
54+
55+
# Redirect HTTP connections to HTTPS - y/n
56+
HTTP_REDIRECT=n
57+
58+
# ------------------------------
59+
# Other bindings
60+
# ------------------------------
61+
# You should leave that alone
62+
# Format: 11.22.33.44:25 or 12.34.56.78:465 etc.
63+
64+
SMTP_PORT=25
65+
SMTPS_PORT=465
66+
SUBMISSION_PORT=587
67+
IMAP_PORT=143
68+
IMAPS_PORT=993
69+
POP_PORT=110
70+
POPS_PORT=995
71+
SIEVE_PORT=4190
72+
DOVEADM_PORT=127.0.0.1:19991
73+
SQL_PORT=127.0.0.1:13306
74+
REDIS_PORT=127.0.0.1:7654
75+
76+
# Your timezone
77+
# See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for a list of timezones
78+
# Use the column named 'TZ identifier' + pay attention for the column named 'Notes'
79+
80+
TZ=Etc/UTC
81+
82+
# Fixed project name
83+
# Please use lowercase letters only
84+
85+
COMPOSE_PROJECT_NAME=$PROJECT
86+
87+
# Used Docker Compose version
88+
# Switch here between native (compose plugin) and standalone
89+
# For more informations take a look at the mailcow docs regarding the configuration options.
90+
# Normally this should be untouched but if you decided to use either of those you can switch it manually here.
91+
# Please be aware that at least one of those variants should be installed on your machine or mailcow will fail.
92+
93+
DOCKER_COMPOSE_VERSION=native
94+
95+
# Set this to "allow" to enable the anyone pseudo user. Disabled by default.
96+
# When enabled, ACL can be created, that apply to "All authenticated users"
97+
# This should probably only be activated on mail hosts, that are used exclusivly by one organisation.
98+
# Otherwise a user might share data with too many other users.
99+
ACL_ANYONE=disallow
100+
101+
# Garbage collector cleanup
102+
# Deleted domains and mailboxes are moved to /var/vmail/_garbage/timestamp_sanitizedstring
103+
# How long should objects remain in the garbage until they are being deleted? (value in minutes)
104+
# Check interval is hourly
105+
106+
MAILDIR_GC_TIME=7200
107+
108+
# Additional SAN for the certificate
109+
#
110+
# You can use wildcard records to create specific names for every domain you add to mailcow.
111+
# Example: Add domains "example.com" and "example.net" to mailcow, change ADDITIONAL_SAN to a value like:
112+
#ADDITIONAL_SAN=imap.*,smtp.*
113+
# This will expand the certificate to "imap.example.com", "smtp.example.com", "imap.example.net", "smtp.example.net"
114+
# plus every domain you add in the future.
115+
#
116+
# You can also just add static names...
117+
#ADDITIONAL_SAN=srv1.example.net
118+
# ...or combine wildcard and static names:
119+
#ADDITIONAL_SAN=imap.*,srv1.example.com
120+
#
121+
122+
ADDITIONAL_SAN=
123+
124+
# Obtain certificates for autodiscover.* and autoconfig.* domains.
125+
# This can be useful to switch off in case you are in a scenario where a reverse proxy already handles those.
126+
# There are mixed scenarios where ports 80,443 are occupied and you do not want to share certs
127+
# between services. So acme-mailcow obtains for maildomains and all web-things get handled
128+
# in the reverse proxy.
129+
AUTODISCOVER_SAN=y
130+
131+
# Additional server names for mailcow UI
132+
#
133+
# Specify alternative addresses for the mailcow UI to respond to
134+
# This is useful when you set mail.* as ADDITIONAL_SAN and want to make sure mail.maildomain.com will always point to the mailcow UI.
135+
# If the server name does not match a known site, Nginx decides by best-guess and may redirect users to the wrong web root.
136+
# You can understand this as server_name directive in Nginx.
137+
# Comma separated list without spaces! Example: ADDITIONAL_SERVER_NAMES=a.b.c,d.e.f
138+
139+
ADDITIONAL_SERVER_NAMES=
140+
141+
# Skip running ACME (acme-mailcow, Let's Encrypt certs) - y/n
142+
143+
SKIP_LETS_ENCRYPT=n
144+
145+
# Create seperate certificates for all domains - y/n
146+
# this will allow adding more than 100 domains, but some email clients will not be able to connect with alternative hostnames
147+
# see https://doc.dovecot.org/admin_manual/ssl/sni_support
148+
ENABLE_SSL_SNI=n
149+
150+
# Skip IPv4 check in ACME container - y/n
151+
152+
SKIP_IP_CHECK=n
153+
154+
# Skip HTTP verification in ACME container - y/n
155+
156+
SKIP_HTTP_VERIFICATION=n
157+
158+
# Skip Unbound (DNS Resolver) Healthchecks (NOT Recommended!) - y/n
159+
160+
SKIP_UNBOUND_HEALTHCHECK=n
161+
162+
# Skip ClamAV (clamd-mailcow) anti-virus (Rspamd will auto-detect a missing ClamAV container) - y/n
163+
164+
SKIP_CLAMD=n
165+
166+
# Skip SOGo: Will disable SOGo integration and therefore webmail, DAV protocols and ActiveSync support (experimental, unsupported, not fully implemented) - y/n
167+
168+
SKIP_SOGO=n
169+
170+
# Skip FTS (Fulltext Search) for Dovecot on low-memory, low-threaded systems or if you simply want to disable it.
171+
# Dovecot inside mailcow use Flatcurve as FTS Backend.
172+
173+
SKIP_FTS=n
174+
175+
# Dovecot Indexing (FTS) Process maximum heap size in MB, there is no recommendation, please see Dovecot docs.
176+
# Flatcurve (Xapian backend) is used as the FTS Indexer. It is supposed to be efficient in CPU and RAM consumption.
177+
# However: Please always monitor your Resource consumption!
178+
179+
FTS_HEAP=128
180+
181+
# Controls how many processes the Dovecot indexing process can spawn at max.
182+
# Too many indexing processes can use a lot of CPU and Disk I/O.
183+
# Please visit: https://doc.dovecot.org/configuration_manual/service_configuration/#indexer-worker for more informations
184+
185+
FTS_PROCS=1
186+
187+
# Allow admins to log into SOGo as email user (without any password)
188+
189+
ALLOW_ADMIN_EMAIL_LOGIN=n
190+
191+
# Enable watchdog (watchdog-mailcow) to restart unhealthy containers
192+
193+
USE_WATCHDOG=y
194+
195+
# Send watchdog notifications by mail (sent from watchdog@MAILCOW_HOSTNAME)
196+
# CAUTION:
197+
# 1. You should use external recipients
198+
# 2. Mails are sent unsigned (no DKIM)
199+
# 3. If you use DMARC, create a separate DMARC policy ("v=DMARC1; p=none;" in _dmarc.MAILCOW_HOSTNAME)
200+
# Multiple rcpts allowed, NO quotation marks, NO spaces
201+
202+
#WATCHDOG_NOTIFY_EMAIL=a@example.com,b@example.com,c@example.com
203+
#WATCHDOG_NOTIFY_EMAIL=
204+
205+
# Send notifications to a webhook URL that receives a POST request with the content type "application/json".
206+
# You can use this to send notifications to services like Discord, Slack and others.
207+
#WATCHDOG_NOTIFY_WEBHOOK=https://discord.com/api/webhooks/XXXXXXXXXXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
208+
# JSON body included in the webhook POST request. Needs to be in single quotes.
209+
# Following variables are available: SUBJECT, BODY
210+
#WATCHDOG_NOTIFY_WEBHOOK_BODY='{"username": "mailcow Watchdog", "content": "****\n"}'
211+
212+
# Notify about banned IP (includes whois lookup)
213+
WATCHDOG_NOTIFY_BAN=n
214+
215+
# Send a notification when the watchdog is started.
216+
WATCHDOG_NOTIFY_START=y
217+
218+
# Subject for watchdog mails. Defaults to "Watchdog ALERT" followed by the error message.
219+
#WATCHDOG_SUBJECT=
220+
221+
# Checks if mailcow is an open relay. Requires a SAL. More checks will follow.
222+
# https://www.servercow.de/mailcow?lang=en
223+
# https://www.servercow.de/mailcow?lang=de
224+
# No data is collected. Opt-in and anonymous.
225+
# Will only work with unmodified mailcow setups.
226+
WATCHDOG_EXTERNAL_CHECKS=n
227+
228+
# Enable watchdog verbose logging
229+
WATCHDOG_VERBOSE=n
230+
231+
# Max log lines per service to keep in Redis logs
232+
233+
LOG_LINES=9999
234+
235+
# Internal IPv4 /24 subnet, format n.n.n (expands to n.n.n.0/24)
236+
# Use private IPv4 addresses only, see https://en.wikipedia.org/wiki/Private_network#Private_IPv4_addresses
237+
238+
IPV4_NETWORK=172.22.1
239+
240+
# Internal IPv6 subnet in fc00::/7
241+
# Use private IPv6 addresses only, see https://en.wikipedia.org/wiki/Private_network#Private_IPv6_addresses
242+
243+
IPV6_NETWORK=fd4d:6169:6c63:6f77::/64
244+
245+
# Use this IPv4 for outgoing connections (SNAT)
246+
247+
#SNAT_TO_SOURCE=
248+
249+
# Use this IPv6 for outgoing connections (SNAT)
250+
251+
#SNAT6_TO_SOURCE=
252+
253+
# Create or override an API key for the web UI
254+
# You _must_ define API_ALLOW_FROM, which is a comma separated list of IPs
255+
# An API key defined as API_KEY has read-write access
256+
# An API key defined as API_KEY_READ_ONLY has read-only access
257+
# Allowed chars for API_KEY and API_KEY_READ_ONLY: a-z, A-Z, 0-9, -
258+
# You can define API_KEY and/or API_KEY_READ_ONLY
259+
260+
#API_KEY=
261+
#API_KEY_READ_ONLY=
262+
#API_ALLOW_FROM=172.22.1.1,127.0.0.1
263+
264+
# mail_home is ~/Maildir
265+
MAILDIR_SUB=Maildir
266+
267+
# SOGo session timeout in minutes
268+
SOGO_EXPIRE_SESSION=480
269+
270+
# DOVECOT_MASTER_USER and DOVECOT_MASTER_PASS must both be provided. No special chars.
271+
# Empty by default to auto-generate master user and password on start.
272+
# User expands to DOVECOT_MASTER_USER@mailcow.local
273+
# LEAVE EMPTY IF UNSURE
274+
DOVECOT_MASTER_USER=
275+
# LEAVE EMPTY IF UNSURE
276+
DOVECOT_MASTER_PASS=
277+
278+
# Let's Encrypt registration contact information
279+
# Optional: Leave empty for none
280+
# This value is only used on first order!
281+
# Setting it at a later point will require the following steps:
282+
# https://docs.mailcow.email/troubleshooting/debug-reset_tls/
283+
ACME_CONTACT=
284+
285+
# WebAuthn device manufacturer verification
286+
# After setting WEBAUTHN_ONLY_TRUSTED_VENDORS=y only devices from trusted manufacturers are allowed
287+
# root certificates can be placed for validation under mailcow-dockerized/data/web/inc/lib/WebAuthn/rootCertificates
288+
WEBAUTHN_ONLY_TRUSTED_VENDORS=n
289+
290+
# Spamhaus Data Query Service Key
291+
# Optional: Leave empty for none
292+
# Enter your key here if you are using a blocked ASN (OVH, AWS, Cloudflare e.g) for the unregistered Spamhaus Blocklist.
293+
# If empty, it will completely disable Spamhaus blocklists if it detects that you are running on a server using a blocked AS.
294+
# Otherwise it will work normally.
295+
SPAMHAUS_DQS_KEY=
296+
297+
# Prevent netfilter from setting an iptables/nftables rule to isolate the mailcow docker network - y/n
298+
# CAUTION: Disabling this may expose container ports to other neighbors on the same subnet, even if the ports are bound to localhost
299+
DISABLE_NETFILTER_ISOLATION_RULE=n

hub/mailcow/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/data

0 commit comments

Comments
 (0)