Commit Graph

5028 Commits

Author SHA1 Message Date
Sebastian Wilke
aeb3a15f92 Merge branch '2024.06' of https://github.com/heviat/Mailu-OIDC into 2024.06 2025-01-24 22:21:13 +01:00
Sebastian Wilke
b9ca0e28b4 Fix managesieve test 2025-01-24 22:21:04 +01:00
Sebastian
94f265827a Merge pull request #49 from heviat/oidc
Fix #39
2025-01-24 22:09:47 +01:00
Sebastian Wilke
11b3e2f3e7 Fix #39 2025-01-24 22:06:33 +01:00
Sebastian
aafdf5f0bd Merge pull request #41 from heviat/Wombosvideo-patch-1
Update README.md
2025-01-05 20:12:15 +00:00
Luca
e9185ad16c Update README.md
- Update maintainer information to reflect legal changes.
- Add information about upcoming release of custom configuration assistant
2025-01-04 13:16:47 +01:00
Sebastian Wilke
27a866b0b6 Remove arm-build dependency for deploy 2024.06.7 2024-12-29 14:11:29 +01:00
Sebastian Wilke
f08494c277 Undo boolean refactoring 2024-12-29 13:46:37 +01:00
Sebastian Wilke
d0e4fe8924 Fix boolean values 2024-12-29 13:33:11 +01:00
Sebastian Wilke
bbab7cd924 Add push trigger 2024-12-29 13:14:16 +01:00
Sebastian Wilke
344674c603 Merge branch 'oidc' into 2024.06 2024-12-29 13:12:48 +01:00
bors-mailu[bot]
fbefca44ca Merge #3697
3697: Include sensible error messages for LMTP protocol (backport #3696) r=mergify[bot] a=mergify[bot]

Running into the rate limit yields difficult to debug log messages by the smtp container. Specifically the `Temporary user lookup failure` message by the smtp container is misleading.

## Example

Although this is running on Podman, the bugs are in the Python code and almost certainly are not influenced by the host infrastructure. (Leaving aside that I likely have a configuration problem, because the client IP address is not passed along correctly. But the present fix applies nevertheless and is not related to any specific cause of the rate limit triggering.) 

### smtp logs

```shell
> podman logs --since "2024-12-25T07:33:31" --until "2024-12-25T07:33:33" systemd-mail-smtp
Dec 25 08:33:31 example postfix/smtpd[398]: connect from front[10.115.0.96]
INFO:root:Connect
Dec 25 08:33:31 example postfix/smtpd[398]: 6774324DE71C1: client=systemd-mail-front[10.115.0.96]
INFO:root:Connect
Dec 25 08:33:31 example postfix/cleanup[428]: 6774324DE71C1: message-id=<CAPhkJv+GTxVtwn6eNbBzPscohn6fgkhrYd2gEpUm2prr-5_7bg@mail.gmail.com>
Dec 25 08:33:32 example postfix/qmgr[376]: 6774324DE71C1: from=<SRS0=O1up=TS=gmail.com=fabiamos@example.com>, size=3968, nrcpt=1 (queue active)
Dec 25 08:33:32 example postfix/lmtp[429]: 6774324DE71C1: host front[10.115.0.96] said: 451 4.3.0 <fabian@example.com> Temporary user lookup failure (in reply to RCPT TO command)
Dec 25 08:33:32 example postfix/lmtp[429]: connect to front[10.115.0.9]:2525: Connection refused
Dec 25 08:33:32 example postfix/lmtp[429]: 6774324DE71C1: to=<fabian@example.com>, orig_to=<me+fancy@example.com>, relay=none, delay=0.63, delays=0.61/0.01/0.01/0, dsn=4.4.1, status=deferred (connect to front[10.115.0.9]:2525: Connection refused)
```

### admin logs

```shell
> podman logs --since "2024-12-25T07:33:31" --until "2024-12-25T07:33:33" systemd-mail-admin
10.115.0.96 - - [25/Dec/2024:08:33:31 +0100] "GET /internal/auth/email HTTP/1.0" 200 0 "-" "-"
[2024-12-25 08:33:32,030] WARNING in limiter: Authentication attempt from 10.115.0.99 has been rate-limited.
[2024-12-25 08:33:32,030] ERROR in app: Exception on /internal/auth/email [GET]
Traceback (most recent call last):
  File "/app/venv/lib/python3.12/site-packages/flask/app.py", line 1473, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/flask/app.py", line 882, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/flask/app.py", line 880, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.12/site-packages/flask/app.py", line 865, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/mailu/internal/views/auth.py", line 27, in nginx_authentication
    status, code = nginx.get_status(flask.request.headers['Auth-Protocol'], 'ratelimit')
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/mailu/internal/nginx.py", line 140, in get_status
    return status, codes[protocol]
                   ~~~~~^^^^^^^^^^
KeyError: 'lmtp'
10.115.0.96 - - [25/Dec/2024:08:33:32 +0100] "GET /internal/auth/email HTTP/1.0" 200 0 "-" "-"
```

## What type of PR?

bug-fix

## What does this PR do?

### Related issue(s)
None

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [x] In case of feature or enhancement: documentation updated accordingly - not an enhancement
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file. - is a minor change
<hr>This is an automatic backport of pull request #3696 done by [Mergify](https://mergify.com).

Co-authored-by: Fabian Stanke <me+github@fmos.at>
2024-12-27 10:33:27 +00:00
Fabian Stanke
da8a1f2882 Adds towncrier entry for PR #3696 as requested
(cherry picked from commit 8a13316a0d)
2024-12-27 09:51:47 +00:00
Fabian Stanke
a4e3ade323 Include error messages for LMTP
These are difficult to debug log messages, when instead of an error message one gets a stack trace with `KeyError: 'lmtp'`

(cherry picked from commit ec1e49d137)
2024-12-27 09:51:47 +00:00
bors-mailu[bot]
91d477dfe0 Merge #3692
3692: Ensure mobileconfig has the right content-type (backport #3691) r=mergify[bot] a=mergify[bot]

## What type of PR?

bug-fix

## What does this PR do?

Ensure Apple mobileconfig is served using the right Content-Type

### Related issue(s)
- #3684

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] 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.
<hr>This is an automatic backport of pull request #3691 done by [Mergify](https://mergify.com).

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2024-12-23 11:29:18 +00:00
Florent Daigniere
7323fbd4a0 Ensure mobileconfig has the right content-type
(cherry picked from commit 64d0bb603d)
2024-12-22 19:15:27 +00:00
Sebastian Wilke
95943b7f7a Merge branch 'oidc' of https://github.com/heviat/Mailu-OIDC into oidc 2024-12-17 20:34:15 +01:00
Sebastian Wilke
4615e1139d Remove bord job 2024-12-17 20:34:06 +01:00
Sebastian
bbe3c09585 Merge pull request #21 from heviat/oidc
Update from upstream
2024-12-17 19:30:48 +00:00
Sebastian
2d5d49c9c2 Merge branch 'master' into oidc 2024-12-17 20:23:41 +01:00
Sebastian Wilke
8f236d2ed0 Fix Dockerfiles 2024-12-17 20:16:28 +01:00
Sebastian Wilke
d2e69cc6c8 Merge remote-tracking branch 'upstream/2024.06' into oidc 2024-12-17 20:07:41 +01:00
bors-mailu[bot]
32fb10cb07 Merge #3653
3653: Don't check empty passwords against HIBP (backport #3650) r=nextgens a=mergify[bot]

## What type of PR?

bug-fix

## What does this PR do?

Don't check empty passwords against HIBP; Apparently some password managers will trigger a race condition otherwise

### Related issue(s)
- closes #3633

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] 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.
<hr>This is an automatic backport of pull request #3650 done by [Mergify](https://mergify.com).

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2024-11-17 20:20:11 +00:00
Florent Daigniere
1805ef4480 Don't check empty passwords against HIBP
(cherry picked from commit f1c5ac5b14)
2024-11-17 14:48:36 +00:00
bors-mailu[bot]
af5cbc92f2 Merge #3649
3649: Upgrade snappymail to v2.38.2 (backport #3648) r=mergify[bot] a=mergify[bot]

## What type of PR?

bug-fix

## What does this PR do?

Upgrade snappymail to v2.38.2. This is a security fix for [GHSA-2rq7-79vp-ffxm](https://github.com/the-djmaze/snappymail/security/advisories/GHSA-2rq7-79vp-ffxm) (mXSS)

### Related issue(s)

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] 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.
<hr>This is an automatic backport of pull request #3648 done by [Mergify](https://mergify.com).

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2024-11-17 14:47:40 +00:00
Florent Daigniere
37964c8d93 doh; v2.38.2
(cherry picked from commit 6f3257f3b2)
2024-11-17 12:34:22 +00:00
Florent Daigniere
59400f0f1b Upgrade snappymail to v2.38.2
(cherry picked from commit d4a3d5aeae)
2024-11-17 12:34:22 +00:00
bors-mailu[bot]
cfae470cbb Merge #3623
3623: alpine 3.20.3 (backport #3622) r=mergify[bot] a=mergify[bot]

## What type of PR?

bug-fix

## What does this PR do?

Upgrade from alpine 3.20.0 to alpine 3.20.3 ; We need a fix for [CVE-2024-5535](https://security.alpinelinux.org/vuln/CVE-2024-5535)

### Related issue(s)


## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] 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.
<hr>This is an automatic backport of pull request #3622 done by [Mergify](https://mergify.com).

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2024-10-21 21:26:20 +00:00
bors-mailu[bot]
50415d8c4d Merge #3619
3619: Filter logs line based and in binary mode without decoding utf-8 (backport #3618) r=mergify[bot] a=mergify[bot]

## What type of PR?

bug-fix

## What does this PR do?

try at fixing decoding errors when filtering logs

### Related issue(s)
- closes #3398

<hr>This is an automatic backport of pull request #3618 done by [Mergify](https://mergify.com).

Co-authored-by: Alexander Graf <ghostwheel42@users.noreply.github.com>
2024-10-21 21:13:35 +00:00
Florent Daigniere
5b2456cc8e alpine 3.20.3
(cherry picked from commit 152b45a0e9)
2024-10-21 10:33:17 +00:00
Alexander Graf
9dae649f31 Flush buffer on flush() and flush explicitely after subprocess has ended
(cherry picked from commit f16467b984)
2024-10-17 15:36:22 +00:00
Alexander Graf
a910f4caac Add newsfragment
(cherry picked from commit 70e28df9c7)
2024-10-17 15:36:22 +00:00
Alexander Graf
5e8fdd4c9e Filter logs line based and in binary mode without decoding utf-8
(cherry picked from commit 4a49234afa)
2024-10-17 15:36:21 +00:00
bors-mailu[bot]
7e41c04659 Merge #3616
3616: Ensure healthchecks timeout (backport #3608) r=mergify[bot] a=mergify[bot]

## What type of PR?

bug-fix

## What does this PR do?

Ensure healthchecks timeout

### Related issue(s)
- close #3398
- close #3602

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] 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.
<hr>This is an automatic backport of pull request #3608 done by [Mergify](https://mergify.com).

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2024-10-17 13:39:09 +00:00
Florent Daigniere
df3329962c Ensure healthchecks timeout
(cherry picked from commit 7aaf7ec17b)

# Conflicts:
#	towncrier/newsfragments/3398.misc
2024-10-17 12:58:46 +00:00
bors-mailu[bot]
59a4668518 Merge #3614
3614: Fix http2 (backport #3613) r=mergify[bot] a=mergify[bot]

## What type of PR?

bug-fix

## What does this PR do?

Fix http2; it does not require IPv6 nor certificates

### Related issue(s)

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] 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.
<hr>This is an automatic backport of pull request #3613 done by [Mergify](https://mergify.com).

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2024-10-16 07:24:01 +00:00
Florent Daigniere
450c78f7b0 Fix http2
(cherry picked from commit fb49ef9057)
2024-10-15 19:33:41 +00:00
bors-mailu[bot]
6b5bb5fcd1 Merge #3559
3559: Fix #3531 (backport #3557) r=mergify[bot] a=mergify[bot]

## What type of PR?

bug-fix

## What does this PR do?

Ensure we have both RSA and ECDSA certs when using letsencrypt now that the default behaviour from certbot has changed.
This is only important for new installs, not those renewing existing certs.

### Related issue(s)
- closes #3531

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] 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.
<hr>This is an automatic backport of pull request #3557 done by [Mergify](https://mergify.com).

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2024-09-23 09:16:11 +00:00
bors-mailu[bot]
4b2d42e208 Merge #3480
3480: Maybe fix #3402 (backport #3465) r=mergify[bot] a=mergify[bot]

## What type of PR?

bug-fix

## What does this PR do?

Fix a potential problem with SO_REUSEADDR that may prevent admin from starting up

### Related issue(s)
- close #3402 

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] 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.
<hr>This is an automatic backport of pull request #3465 done by [Mergify](https://mergify.com).

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2024-09-22 13:28:04 +00:00
Florent Daigniere
e47da4ba0d Fix #3531
(cherry picked from commit 8e4af5ad05)
2024-09-22 13:25:31 +00:00
Florent Daigniere
bd7a5bd235 Add delay
(cherry picked from commit c11815b3a0)
2024-09-13 07:29:26 +00:00
Florent Daigniere
6d2daebe68 Maybe fix #3402
(cherry picked from commit 8b34fbe881)
2024-09-13 07:29:25 +00:00
bors-mailu[bot]
a28aa0d1a0 Merge #3469
3469: Fix overrides (backport #3468) r=nextgens a=mergify[bot]

## What type of PR?

bug-fix

## What does this PR do?

Fix broken overrides introduced in 2024.06.17

### Related issue(s)
- closes #3467

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] 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.
<hr>This is an automatic backport of pull request #3468 done by [Mergify](https://mergify.com).

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2024-09-12 21:27:56 +00:00
Florent Daigniere
4dc2e0b48a Need sleep.
(cherry picked from commit 07f0ec3d0b)
2024-09-12 21:26:07 +00:00
bors-mailu[bot]
12248380f0 Merge #3464
3464: Fix #3450 (backport #3463) r=mergify[bot] a=mergify[bot]

## What type of PR?

bug-fix

## What does this PR do?

Ensure we can do more than 100 parallel sessions.
This will use more RAM.

### Related issue(s)
- close #3450

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] 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.
<hr>This is an automatic backport of pull request #3463 done by [Mergify](https://mergify.com).

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
Co-authored-by: Florent Daigniere <nextgens@users.noreply.github.com>
Co-authored-by: Dimitri Huisman <diman@huisman.xyz>
2024-09-12 20:16:20 +00:00
Dimitri Huisman
4ec2e5c5d3 Fix rst syntax
(cherry picked from commit 14a75a101d)
2024-09-12 15:34:10 +00:00
Florent Daigniere
e7caca3e08 As per review
(cherry picked from commit 12e94b7616)
2024-09-12 15:34:09 +00:00
Florent Daigniere
c193cf1d60 play it safe
(cherry picked from commit f4ab22edbc)
2024-09-12 15:34:09 +00:00
Florent Daigniere
0bdb9e1cea Apply suggestions from code review
Co-authored-by: Alexander Graf <ghostwheel42@users.noreply.github.com>
(cherry picked from commit cdf8ee8820)
2024-09-12 15:34:09 +00:00
Florent Daigniere
cb3ed1598d doh
(cherry picked from commit c6c4c09f08)
2024-09-12 15:34:09 +00:00