Compare commits
60
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d59ce5ff3a | ||
|
|
fb245e26cd | ||
|
|
5ad2ca6552 | ||
|
|
b018431cda | ||
|
|
78421d9c5a | ||
|
|
5b6328b68f | ||
|
|
77659e75c3 | ||
|
|
ebe01e00cc | ||
|
|
73787fef14 | ||
|
|
c029f4e65a | ||
|
|
6d2bdf5303 | ||
|
|
5042e50f55 | ||
|
|
789a9d0f42 | ||
|
|
19afffd8cd | ||
|
|
95b096c442 | ||
|
|
88f6f0b876 | ||
|
|
872e098bb9 | ||
|
|
57fadc2ea4 | ||
|
|
0f5ee292df | ||
|
|
74e8c1a3cc | ||
|
|
2b721698b0 | ||
|
|
bdaab88f08 | ||
|
|
69afb8706b | ||
|
|
89f88ce384 | ||
|
|
b244c2d855 | ||
|
|
302dfd23b7 | ||
|
|
d31aa15791 | ||
|
|
ec37f16553 | ||
|
|
6edc435e32 | ||
|
|
ee4e7270c8 | ||
|
|
c75df76fa6 | ||
|
|
0b33e79f1e | ||
|
|
e19297ab07 | ||
|
|
b1761be669 | ||
|
|
68c5c8be4d | ||
|
|
164736e6fe | ||
|
|
6b3b891b98 | ||
|
|
e7f4b8d86d | ||
|
|
75da49770d | ||
|
|
dff19033f6 | ||
|
|
2e4a082408 | ||
|
|
682ccaaa2d | ||
|
|
d5939e433b | ||
|
|
c5bb97fa6b | ||
|
|
90154fdd84 | ||
|
|
05995e7855 | ||
|
|
37491ade51 | ||
|
|
23309a1a80 | ||
|
|
86f63e65c3 | ||
|
|
60f0f8ba73 | ||
|
|
7b5a6979f2 | ||
|
|
f95b2e687d | ||
|
|
1437715364 | ||
|
|
a0b1794920 | ||
|
|
21868cf5e9 | ||
|
|
e471ec6fd8 | ||
|
|
976b85b701 | ||
|
|
2cd5446ca2 | ||
|
|
16bd66c208 | ||
|
|
68fd4e6a1b |
+1
-1
@@ -10,7 +10,7 @@ steps:
|
||||
from_secret: drone_abra-bot_token
|
||||
fork: true
|
||||
repositories:
|
||||
- coop-cloud/auto-recipes-catalogue-json
|
||||
- toolshed/auto-recipes-catalogue-json
|
||||
|
||||
trigger:
|
||||
event: tag
|
||||
|
||||
@@ -31,6 +31,9 @@ TRAEFIK_STACK_NAME=traefik_example_com
|
||||
# OPTIONAL SETTINGS #
|
||||
###############################################################################
|
||||
|
||||
# Uncomment this to reënable STARTTLS, although beware the health warnings here: https://nostarttls.secvuln.info/
|
||||
#PORTS=25,80,443,465,993,995,4190,110,143,587
|
||||
|
||||
# Name of the instance, displayed in the web UI
|
||||
SITENAME=mymail
|
||||
|
||||
@@ -195,3 +198,5 @@ REJECT_UNLISTED_RECIPIENT=
|
||||
# NOTE(3wc): Other values are not supported, as compose.yml does not contain
|
||||
# configuration for them. Pull requests welcome!
|
||||
DB_FLAVOR=sqlite
|
||||
|
||||
ENABLE_BACKUPS=true
|
||||
@@ -4,10 +4,10 @@ Coöp Cloud + [Mailu][Mailu] = 🥳
|
||||
|
||||
<!-- metadata -->
|
||||
* **Category**: Apps
|
||||
* **Status**: 1, alpha
|
||||
* **Status**: 2, beta
|
||||
* **Image**: [`mailu/*`](https://hub.docker.com/r/mailu/), 4, upstream
|
||||
* **Healthcheck**: No
|
||||
* **Backups**: No
|
||||
* **Backups**: Yes
|
||||
* **Email**: N/A
|
||||
* **Tests**: No
|
||||
* **SSO**: No
|
||||
@@ -25,11 +25,28 @@ host.
|
||||
4. `abra app config YOURAPPDOMAIN` - be sure to change `$WEB_DOMAIN` to something that resolves to
|
||||
your Docker swarm box
|
||||
5. `abra app deploy YOURAPPDOMAIN`
|
||||
9. Create initial user:
|
||||
6. Create initial user:
|
||||
```
|
||||
abra app YOURAPPDOMAIN run admin flask mailu admin admin YOURDOMAIN YOURPASSWORD
|
||||
abra app run YOURDOMAIN admin flask mailu admin admin YOURDOMAIN YOURPASSWORD
|
||||
```
|
||||
|
||||
## Upgrading the recipe
|
||||
|
||||
**NOTE** This section is only intended for [recipe maintainers][maintainers]
|
||||
|
||||
Minor/patch updates usually work OK with `abra recipe upgrade` and friends.
|
||||
|
||||
For major updates:
|
||||
|
||||
1. Go to https://setup.mailu.io/ and generate a new config
|
||||
2. Download the new config and compare it to `compose.yml`. Pay attention to:
|
||||
- New / removed services
|
||||
- Added/removed config options
|
||||
- Changes to networking
|
||||
3. Test upgrading from the previous version to the new version
|
||||
4. `abra recipe sync` / `abra recipe release` as normal
|
||||
|
||||
[Mailu]: https://mailu.io/
|
||||
[abra]: https://git.autonomic.zone/autonomic-cooperative/abra
|
||||
[compose-traefik]: https://git.autonomic.zone/coop-cloud/traefik
|
||||
[maintainers]: https://docs.coopcloud.tech/maintainers/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export CERTDUMPER_POST_VERSION=v1
|
||||
export POSTFIX_OVERRIDE_VERSION=v15
|
||||
export POSTFIX_OVERRIDE_VERSION=v17
|
||||
export SENDER_LOGIN_VERSIONS=v2
|
||||
export ARC_OVERRIDE_VERSION=v8
|
||||
export DKIM_IP_MAP_OVERRIDE_VERSION=v2
|
||||
export BACKUP_SQLITE_VERSION=v1
|
||||
export RESTORE_SQLITE_VERSION=v1
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sqlite3
|
||||
from pathlib import Path
|
||||
|
||||
source_path = Path("/data/main.db")
|
||||
backup_dir = Path("/data/backup")
|
||||
temporary_path = backup_dir / "main.db.tmp"
|
||||
backup_path = backup_dir / "main.db"
|
||||
|
||||
os.umask(0o077)
|
||||
backup_dir.mkdir(mode=0o700, parents=True, exist_ok=True)
|
||||
temporary_path.unlink(missing_ok=True)
|
||||
|
||||
try:
|
||||
# Read-only mode prevents silently creating an empty source database.
|
||||
source = sqlite3.connect(
|
||||
f"{source_path.as_uri()}?mode=ro",
|
||||
uri=True,
|
||||
timeout=60,
|
||||
)
|
||||
destination = sqlite3.connect(temporary_path)
|
||||
try:
|
||||
source.backup(destination, pages=256, sleep=0.1)
|
||||
result = destination.execute("PRAGMA integrity_check").fetchall()
|
||||
if result != [("ok",)]:
|
||||
raise RuntimeError(f"SQLite integrity check failed: {result}")
|
||||
finally:
|
||||
destination.close()
|
||||
source.close()
|
||||
# Only publish a fully written, verified snapshot.
|
||||
os.replace(temporary_path, backup_path)
|
||||
print(f"SQLite backup ready: {backup_path}", flush=True)
|
||||
except Exception:
|
||||
temporary_path.unlink(missing_ok=True)
|
||||
raise
|
||||
+1
-23
@@ -10,42 +10,20 @@ services:
|
||||
- MAILMAN_POSTFIX_OVERRIDES
|
||||
networks:
|
||||
- default
|
||||
- shared_mailman_network
|
||||
volumes:
|
||||
- "shared-mailman-core:/opt/mailman/"
|
||||
configs:
|
||||
- source: postfix_override
|
||||
target: /overrides/postfix.cf
|
||||
antispam:
|
||||
configs:
|
||||
- source: arc_conf_override
|
||||
target: /overrides/arc.conf
|
||||
- source: dkim_ip_map_override
|
||||
target: /overrides/dkim_ip.map
|
||||
volumes:
|
||||
- "rspam_overrides:/etc/rspamd/override.d"
|
||||
|
||||
networks:
|
||||
shared_mailman_network:
|
||||
external: true
|
||||
name: ${MAILMAN_CORE_NETWORK}
|
||||
|
||||
volumes:
|
||||
# https://git.autonomic.zone/coop-cloud/mailman3/src/branch/master/compose.yml
|
||||
shared-mailman-core:
|
||||
external: true
|
||||
name: ${MAILMAN_CORE_VOLUME}
|
||||
rspam_overrides:
|
||||
|
||||
configs:
|
||||
postfix_override:
|
||||
name: ${STACK_NAME}_postfix_overrides_${POSTFIX_OVERRIDE_VERSION}
|
||||
file: mailman-postfix.cf.tmpl
|
||||
template_driver: golang
|
||||
arc_conf_override:
|
||||
name: ${STACK_NAME}_arc_conf_override_${ARC_OVERRIDE_VERSION}
|
||||
file: mailman-arc.conf
|
||||
dkim_ip_map_override:
|
||||
name: ${STACK_NAME}_dkim_ip_map_${DKIM_IP_MAP_OVERRIDE_VERSION}
|
||||
file: mailman-dkim_ip.map.tmpl
|
||||
file: postfix.cf.tmpl
|
||||
template_driver: golang
|
||||
|
||||
+32
-9
@@ -51,10 +51,11 @@ x-environment:
|
||||
- WELCOME_BODY
|
||||
- WELCOME_SUBJECT
|
||||
- TZ
|
||||
- PORTS
|
||||
|
||||
services:
|
||||
app:
|
||||
image: ghcr.io/mailu/nginx:2.0.23
|
||||
image: ghcr.io/mailu/nginx:2024.06.67
|
||||
logging:
|
||||
driver: json-file
|
||||
networks:
|
||||
@@ -95,15 +96,18 @@ services:
|
||||
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
|
||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||
- "coop-cloud.${STACK_NAME}.version=1.0.2+2.0.23"
|
||||
- "coop-cloud.${STACK_NAME}.version=4.0.1+2024.06.67"
|
||||
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
|
||||
- "backupbot.backup.volumes.traefik_letsencrypt=false"
|
||||
- "backupbot.backup.volumes.mailu.path=backup"
|
||||
|
||||
db:
|
||||
image: redis:7.2.0-alpine
|
||||
image: redis:8.10.3-alpine
|
||||
volumes:
|
||||
- "redis:/data"
|
||||
|
||||
admin:
|
||||
image: ghcr.io/mailu/admin:2.0.23
|
||||
image: ghcr.io/mailu/admin:2024.06.67
|
||||
environment: *default-env
|
||||
healthcheck:
|
||||
disable: true
|
||||
@@ -114,9 +118,20 @@ services:
|
||||
- "mailu:/data"
|
||||
networks:
|
||||
- default
|
||||
configs:
|
||||
- source: backup_sqlite
|
||||
target: /usr/local/bin/backup_sqlite.py
|
||||
mode: 0444
|
||||
- source: restore_sqlite
|
||||
target: /usr/local/bin/restore_sqlite.py
|
||||
mode: 0444
|
||||
deploy:
|
||||
labels:
|
||||
backupbot.backup.pre-hook: "python3 /usr/local/bin/backup_sqlite.py"
|
||||
backupbot.restore.post-hook: "python3 /usr/local/bin/restore_sqlite.py"
|
||||
|
||||
imap:
|
||||
image: ghcr.io/mailu/dovecot:2.0.23
|
||||
image: ghcr.io/mailu/dovecot:2024.06.67
|
||||
environment: *default-env
|
||||
secrets:
|
||||
- secret_key
|
||||
@@ -130,7 +145,7 @@ services:
|
||||
- default
|
||||
|
||||
smtp:
|
||||
image: ghcr.io/mailu/postfix:2.0.23
|
||||
image: ghcr.io/mailu/postfix:2024.06.67
|
||||
environment: *default-env
|
||||
secrets:
|
||||
- secret_key
|
||||
@@ -142,7 +157,7 @@ services:
|
||||
- app
|
||||
|
||||
antispam:
|
||||
image: ghcr.io/mailu/rspamd:2.0.23
|
||||
image: ghcr.io/mailu/rspamd:2024.06.67
|
||||
environment: *default-env
|
||||
secrets:
|
||||
- secret_key
|
||||
@@ -153,7 +168,8 @@ services:
|
||||
disable: true
|
||||
|
||||
webmail:
|
||||
image: ghcr.io/mailu/webmail:2.0.23
|
||||
image: ghcr.io/mailu/webmail:2024.06.67
|
||||
# entrypoint: "tail -f /dev/null"
|
||||
environment: *default-env
|
||||
networks:
|
||||
- default
|
||||
@@ -167,7 +183,7 @@ services:
|
||||
disable: true
|
||||
|
||||
certdumper:
|
||||
image: ldez/traefik-certs-dumper:v2.8.1
|
||||
image: ldez/traefik-certs-dumper:v2.11.4
|
||||
entrypoint: sh -c '
|
||||
apk add jq
|
||||
; while ! [ -e /traefik/${ACME_JSON} ]
|
||||
@@ -219,6 +235,13 @@ configs:
|
||||
certdumper_post:
|
||||
name: ${STACK_NAME}_certdumper_post_${CERTDUMPER_POST_VERSION}
|
||||
file: certdumper_post.sh
|
||||
backup_sqlite:
|
||||
name: ${STACK_NAME}_backup_sqlite_${BACKUP_SQLITE_VERSION}
|
||||
file: backup_sqlite.py
|
||||
restore_sqlite:
|
||||
name: ${STACK_NAME}_restore_sqlite_${RESTORE_SQLITE_VERSION}
|
||||
file: restore_sqlite.py
|
||||
|
||||
|
||||
secrets:
|
||||
secret_key:
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
type=console
|
||||
debug_modules=dkim
|
||||
@@ -1,7 +0,0 @@
|
||||
sign_networks = "/overrides/dkim_ip.map";
|
||||
path = "/dkim/$domain.$selector.key";
|
||||
use_domain = "header";
|
||||
#use_vault = false;
|
||||
#try_fallback = true;
|
||||
#selector_map = "/overrides/dkim_selectors.map";
|
||||
#selector = "dkim";
|
||||
@@ -1 +0,0 @@
|
||||
{{ env "RELAYNETS" }}
|
||||
@@ -10,9 +10,9 @@
|
||||
|
||||
unknown_local_recipient_reject_code = 550
|
||||
owner_request_special = no
|
||||
virtual_mailbox_maps = regexp:/opt/mailman/var/data/postfix_lmtp, \${podop}mailbox
|
||||
transport_maps = regexp:/opt/mailman/var/data/postfix_lmtp \${podop}transport
|
||||
local_recipient_maps = regexp:/opt/mailman/var/data/postfix_lmtp
|
||||
relay_domains = regexp:/opt/mailman/var/data/postfix_domains \${podop}transport
|
||||
{{ end }}
|
||||
{{ if eq (env "SENDER_LOGINS_POSTFIX_OVERRIDES") "1" }}
|
||||
# https://github.com/Mailu/Mailu/issues/1096
|
||||
@@ -0,0 +1,18 @@
|
||||
# Secret key
|
||||
|
||||
The secret key is now stored as a docker secret instead of a variable in the
|
||||
env file. You need to insert it by running:
|
||||
`abra app secret insert <your mailu app> secret_key v1 <SECRETKEYHERE>`
|
||||
and you can remove `SECRET_KEY` from your config file.
|
||||
|
||||
# `DOMAIN` is now `MAIL_DOMAIN`
|
||||
|
||||
This is important! If your main e-mail domain is something else than the
|
||||
domain you are reaching the web interface at, you need to make changes.
|
||||
I.e. in our setup we have `autonomic.zone` pointing an A record at some server
|
||||
and `mail.autonomic.zone` is a separate server, and MX records are pointing
|
||||
to the server at `mail.autonomic.zone`.
|
||||
In this case:
|
||||
- `DOMAIN` should be `mail.autonomic.zone` - this is what traefik will use to
|
||||
provision a certificate
|
||||
- `MAIL_DOMAIN` should be `autonomic.zone`
|
||||
@@ -0,0 +1,3 @@
|
||||
ALERTA! 🚨 Mailu has dropped support for STARTTLS by default – see details here: https://mailu.io/2024.06/releases.html#starttls-ports-disabled-by-default
|
||||
|
||||
If you are relying on STARTTLS, e.g. SMTP port 587, please copy the example `PORTS` variable from `~/.abra/recipes/mailu/.env.example` BEFORE deploying.
|
||||
@@ -0,0 +1 @@
|
||||
Contains mitigation measures for php2shell
|
||||
@@ -0,0 +1 @@
|
||||
Actual mitigation for php2shell pending further alpine image upgrades
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"config:recommended"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Restore Mailu's SQLite snapshot without replacing the live database inode."""
|
||||
|
||||
import sqlite3
|
||||
from pathlib import Path
|
||||
|
||||
backup_path = Path("/data/backup/main.db")
|
||||
live_path = Path("/data/main.db")
|
||||
|
||||
# The source and destination must already exist. A missing snapshot or live
|
||||
# database is a restore failure, not a reason to create an empty database.
|
||||
with sqlite3.connect(
|
||||
f"{backup_path.as_uri()}?mode=ro", uri=True, timeout=60
|
||||
) as source:
|
||||
if source.execute("PRAGMA integrity_check").fetchall() != [("ok",)]:
|
||||
raise RuntimeError(f"Invalid SQLite snapshot: {backup_path}")
|
||||
with sqlite3.connect(
|
||||
f"{live_path.as_uri()}?mode=rw", uri=True, timeout=60
|
||||
) as destination:
|
||||
source.backup(destination, pages=256, sleep=0.1)
|
||||
|
||||
print(f"SQLite restore complete: {live_path}", flush=True)
|
||||
Reference in New Issue
Block a user