Watch
1
0
Fork
You've already forked Mailu
0
mirror of https://github.com/Mailu/Mailu.git synced 2026-11-29 20:02:06 +00:00
Insular email distribution - mail server as Docker images https://mailu.io
  • Python 78.7%
  • HTML 10.5%
  • JavaScript 2.4%
  • Shell 2.3%
  • PHP 1.9%
  • Other 4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
bors-mailu[bot] e22230fa3e
Merge #4254
4254: Show why a database upgrade failed r=nextgens a=auguruk

## What type of PR?

bug-fix

## What does this PR do?

When a migration stops with a `RuntimeError`, `flask db upgrade` exits with status 1 but prints nothing, so the admin container fails to start without saying why.

`migrations/env.py` loads `alembic.ini` with `fileConfig(...)`. Its default, `disable_existing_loggers=True`, disables every logger that already exists, including `flask_migrate`. Flask-Migrate catches the migration's `RuntimeError`, logs it through that logger and calls `sys.exit(1)`, so the message is dropped. This hides the collision list from the lowercase migration (`9a5866105f5a`, #2695), and the one in #4253.

Passing `disable_existing_loggers=False` keeps that logger enabled. With a user and an alias sharing an address, the upgrade in #4253 now prints:

```
ERROR [flask_migrate] Error: These addresses exist as both a user and an alias:
  a@example.com
Remove or rename the user or the alias, then retry.
```

Before this change, it printed nothing.

The new unit test fails on master and passes with the change.

### Related issue(s)
- Found while working on #4253 (#4252)

## Prerequisites
- [x] In case of feature or enhancement: documentation updated accordingly
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Michael Judd <mike@axpero.com>
2026-11-29 17:21:09 +00:00
.agents/skills/mailu-dev-setup Update test file reference in SKILL.md 2026-11-29 09:52:38 +01:00
.github Update pytest command to exclude rebuild_fts_test.py 2026-11-29 09:16:50 +01:00
core Show why a database upgrade failed 2026-11-29 15:51:48 +00:00
design Remove traefik certdumper 2026-11-05 17:26:48 +01:00
docs Make PostgreSQL usable again 2026-11-29 10:31:09 +00:00
optional Update all dependencies 2026-11-28 14:55:36 +00:00
scripts Fix purge_user.sh 2024-05-03 14:31:18 +02:00
setup Update all dependencies 2026-11-28 14:55:36 +00:00
tests Show why a database upgrade failed 2026-11-29 15:51:48 +00:00
towncrier Show why a database upgrade failed 2026-11-29 15:51:48 +00:00
webmails Update all dependencies 2026-11-28 14:55:36 +00:00
.gitignore Major dep upgrade 2026-09-24 14:00:56 +02:00
.mergify.yml revert 2026-08-17 11:28:29 +02:00
AGENTS.md Move admin unit tests and run in parallel 2026-11-29 08:46:51 +01:00
AUTHORS.md Update AUTHORS.md. 2024-03-26 08:55:16 +01:00
bors.toml Switch to github actions for CI/CD 2021-06-26 08:25:15 +00:00
CHANGELOG.md Remove traefik certdumper 2026-11-05 17:26:48 +01:00
CLAUDE.md Move admin unit tests and run in parallel 2026-11-29 08:46:51 +01:00
CODE_OF_CONDUCT.md Add a code of conduct, fixes #319 2017-11-12 11:42:53 +01:00
CONTRIBUTING.md Fix a bunch of typos 2022-10-19 19:41:49 +02:00
ISSUE_TEMPLATE.md docs: remove references to defunct Matrix room 2026-04-21 10:42:52 +00:00
LICENSE.md Rename the freeposte/mailu directory and database 2016-10-29 13:42:39 +02:00
PULL_REQUEST_TEMPLATE.md fix spelling 2021-09-13 15:23:05 +02:00
pyproject.toml Fix the package setting 2019-09-17 21:13:35 +02:00
README.md Add OAuth 2.0 mail client authentication 2026-11-05 13:45:08 +01:00
RELEASE_TEMPLATE.md Update version to 2.+ in release template 2023-05-09 19:56:13 +02:00
renovate.json Configure Renovate and attest release artifacts 2026-11-28 23:22:17 +01:00
SECURITY.md Clarify security reporting guidance 2026-11-29 08:47:06 +01:00

Mailu

Mailu is a simple yet full-featured mail server as a set of Docker images. It is free software (both as in free beer and as in free speech), open to suggestions and external contributions. The project aims at providing people with an easily setup, easily maintained and full-featured mail server while not shipping proprietary software nor unrelated features often found in popular groupware.

Most of the documentation is available on our Website. You can also try our demo server before setting up your own.

Features

Main features include:

  • Standard email server, IMAP and IMAP+, SMTP and Submission with auto-configuration profiles for clients
  • Advanced email features, aliases, domain aliases, custom routing, full-text search of email attachments, IMAP METADATA, and BURL-enabled submission for supporting mail clients
  • Web access, multiple Webmails and administration interface
  • User features, aliases, auto-reply, auto-forward, fetched accounts, managesieve, OpenPGP key publication through WKD, passkey sign-in to Webmail
  • Mail-client authentication, OAuth 2.0 authorization and revocable sessions for compatible clients, with a Thunderbird add-on available at /admin/client
  • Admin features, global admins, announcements, per-domain delegation, quotas, passkey sign-in and user passkey management
  • Security, enforced TLS, DANE, MTA-STS, Letsencrypt!, outgoing DKIM, anti-virus scanner, Snuffleupagus, block malicious attachments
  • Antispam, auto-learn, greylisting, DMARC and SPF, anti-spoofing
  • Freedom, all FOSS components, no tracker included

Domains

Contributing

Mailu is free software, open to suggestions and contributions. All components are free software and compatible with the MIT license. All specific configuration files, Dockerfiles and code are placed under the MIT license.