1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-14 10:53:30 +02:00
Commit Graph

1246 Commits

Author SHA1 Message Date
Florent Daigniere
c0c91691fd Fix the issue on /admin/fetch/edit 2022-11-14 16:24:09 +01:00
Alexander Graf
b0b64a8e63
Use FLASK_DEBUG, fix assets, show startup errors. 2022-11-14 15:44:12 +01:00
Florent Daigniere
505bb79a78 Don't set the secure Cookie flag if TLS_FLAVOR=notls 2022-11-14 15:11:11 +01:00
Florent Daigniere
08a9ab9a56 Improve fetchmail 2022-11-14 12:18:35 +01:00
bors[bot]
8a90f83bd0
Merge #2514
2514: Update deps r=mergify[bot] a=ghostwheel42

## What type of PR?

update python dependencies

## What does this PR do?

Update python deps in base image


Co-authored-by: Alexander Graf <ghostwheel42@users.noreply.github.com>
2022-11-11 15:53:25 +00:00
bors[bot]
745c211c4a
Merge #2523
2523: fix JS error r=mergify[bot] a=nextgens

## What type of PR?

bug-fix

## What does this PR do?

It fixes a bug whereby one may have to click twice on the submit button depending on timing.

e.trigger() will error out on most browsers.

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2022-11-09 15:34:37 +00:00
bors[bot]
0839490beb
Merge #2479
2479: Rework the anti-spoofing rule r=mergify[bot] a=nextgens

## What type of PR?

Feature

## What does this PR do?

We shouldn't assume that Mailu is the only MTA allowed to send emails on behalf of the domains it hosts.
We should also ensure that it's non-trivial for email-spoofing of hosted domains to happen

Previously we were preventing any spoofing of the envelope from; Now we are preventing spoofing of both the envelope from and the header from unless some form of authentication passes (is a RELAYHOST, SPF, DKIM, ARC)

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

## 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
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2022-11-09 15:16:36 +00:00
Florent Daigniere
c91c9df134 fix error 2022-11-09 11:52:53 +01:00
Alexander Graf
e0d2432c6b
Rename data-ordered to data-sort 2022-11-08 16:22:24 +01:00
Alexander Graf
2a4402cdc2
Fix datatable for list fo sign-up domains 2022-11-08 13:27:57 +01:00
Alexander Graf
af6cf5fd1d
Fix language selector without session 2022-11-08 13:27:57 +01:00
Alexander Graf
2778641e78
Fix screen reader title of language selector 2022-11-08 13:27:56 +01:00
Alexander Graf
4776094ea7
Configure datatables on missing tables, add sign in button to sso page. 2022-11-08 13:27:56 +01:00
Alexander Graf
6218b36372
configure datatables via html5 data attributes 2022-11-08 13:27:56 +01:00
Alexander Graf
a74396a9ef
Fix wtforms usage 2022-11-08 13:27:33 +01:00
Alexander Graf
4b179d9008
Merge branch 'master' into hibp 2022-11-07 23:05:51 +01:00
Alexander Graf
36019a8ce9
Don't show Dockerfile before building 2022-11-07 16:48:58 +01:00
Alexander Graf
91e12d510d
Use default password used everywhere else 2022-11-07 16:35:01 +01:00
Alexander Graf
defd533319
Don't duplicate hidden fields 2022-11-07 16:16:09 +01:00
Alexander Graf
db87a0f3a1
Move temporary db into container and show docker run command 2022-11-04 23:51:32 +01:00
Alexander Graf
f7caaddbec
Speed up asset building when developing 2022-11-04 23:39:39 +01:00
Alexander Graf
71263f1a8c
Add more env variables and restyle code 2022-11-04 23:21:11 +01:00
Alexander Graf
fd8570ec34
Remove unused QUOTA_STORAGE_URL 2022-11-04 22:20:08 +01:00
Alexander Graf
bbeb211d72
Listen to localhost by default 2022-11-04 21:41:31 +01:00
Alexander Graf
1d90dc3ea3
Allow running without redis 2022-11-04 18:54:59 +01:00
Alexander Graf
c507b765be
Improve dev runner 2022-11-04 18:29:45 +01:00
Alexander Graf
8732b70b30
Add shell script to run admin dev environment 2022-11-04 18:08:23 +01:00
Alexander Graf
ea636a1835
Fix hibp test 2022-11-04 15:13:56 +01:00
Alexander Graf
311f41c331
Add missing hidden fields 2022-11-04 13:35:38 +01:00
Alexander Graf
27a5f9db65
Reformatting 2022-11-04 13:35:13 +01:00
Vincent Kling
83fdc07a6f Default FETCHMAIL_ENABLED to True 2022-11-04 11:59:26 +01:00
Florent Daigniere
54e9858633 this 2022-11-03 18:42:19 +01:00
Florent Daigniere
14f802fb4a untested but that should work 2022-11-03 18:38:55 +01:00
bors[bot]
e0ff135a00
Merge #2498
2498: Implement ITERATE in podop r=mergify[bot] a=nextgens

## What type of PR?

Feature

## What does this PR do?

This makes ``doveadm -A`` work.

The easiest way to try it out is:
```
doveadm dict iter proxy:/tmp/podop.socket:auth shared/userdb

or 

doveadm user '*'
```

The protocol is described at https://doc.dovecot.org/developer_manual/design/dict_protocol/
The current version of dovecot is not using flags... so there's little gain in implementing them.

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

## 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.


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
Co-authored-by: Alexander Graf <ghostwheel42@users.noreply.github.com>
2022-11-03 16:54:24 +00:00
Alexander Graf
c57706ad27
Duh 2022-11-03 17:50:39 +01:00
Alexander Graf
46773f639b
Return 404 is user-id cannot be parsed 2022-11-03 17:45:21 +01:00
Alexander Graf
595b32cf97
Fix quota return value 2022-11-03 17:37:21 +01:00
Alexander Graf
bec0b1c3b2
Fix variable name 2022-11-03 17:26:27 +01:00
Florent Daigniere
001acd60ac doh2 2022-11-03 16:44:18 +01:00
Alexander Graf
dec5309ef9
Fix typo 2022-11-03 16:39:29 +01:00
Florent Daigniere
6b7026ef69 Here too 2022-11-03 16:28:07 +01:00
Florent Daigniere
24b2c7c04a doh 2022-11-03 16:25:10 +01:00
Florent Daigniere
66250e396c refactor 2022-11-03 16:19:44 +01:00
wkr
d920b3d037 fix(auto-reply): include start and end dates in the auto-reply period; issue #2512 2022-11-02 17:48:22 +01:00
Alexander Graf
91f86a4c2a
Resolve using socrate function 2022-10-31 23:58:52 +01:00
Florent Daigniere
9cb8df57c6 enforce at least 8 chars 2022-10-31 19:48:13 +01:00
Florent Daigniere
afbaabd8cd v1 2022-10-31 19:41:40 +01:00
Florent Daigniere
c1f571a4c3 Speed things up.
If we want to go further than this we should change podop's incr(), pass
the flags and make admin process the results.
2022-10-31 08:48:55 +01:00
Florent Daigniere
cf34be967c Implement ITERATE 2022-10-30 20:15:10 +01:00
bors[bot]
12480ccbff
Merge #2328
2328: Feature: Configurable default spam threshold used for new users r=mergify[bot] a=enginefeeder101

## What type of PR?

Feature

## What does this PR do?

This PR adds functionality to set a custom default spam threshold
for new users. The environment variable ``DEFAULT_SPAM_THRESHOLD`` is
used for this purpose. When not set, it defaults back to 80%, as the
default value was before.

If ``DEFAULT_SPAM_THRESHOLD`` is set to a value that Python cannot
parse as an integer, a ValueError is thrown. There is no error handling
for that case built-in. Should that be done?

## 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
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: enginefeeder101 <enginefeeder101@users.noreply.github.com>
Co-authored-by: Dimitri Huisman <diman@huisman.xyz>
2022-10-29 11:44:04 +00:00
Dimitri Huisman
06b784da57
Shorten default function by using lambda 2022-10-29 08:57:48 +00:00
bors[bot]
9975a793fe
Merge #2458
2458: Fix: Don't update updated_at on quota_bytes_used change r=mergify[bot] a=DjVinnii

## What type of PR?

bug-fix

## What does this PR do?

This PR makes sure that the `updated_at` field is not updated when `quota_bytes_used` is updated. All other updates to the `User` model still updates the `updated_at` field. 

This is done by explicitly using an method in the `Base` class triggering [`flag_modified`][url-flag-modified].

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

## 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.

<!-- LINKS-->
[url-flag-modified]: https://docs.sqlalchemy.org/en/14/orm/session_api.html#sqlalchemy.orm.attributes.flag_modified


Co-authored-by: Vincent Kling <v.kling@vinniict.nl>
2022-10-28 20:09:10 +00:00
bors[bot]
5703e97c73
Merge #2460
2460: Switch to a base image containing base tools and the podop and socrate libs r=mergify[bot] a=ghostwheel42

## What type of PR?

enhancement of build process

## What does this PR do?

Changes build.hcl to build core images using a base image.
Also adds a "assets" base image for the admin container.


Co-authored-by: Alexander Graf <ghostwheel42@users.noreply.github.com>
Co-authored-by: Pierre Jaury <pierre@jaury.eu>
Co-authored-by: kaiyou <pierre@jaury.eu>
Co-authored-by: Dimitri Huisman <52963853+Diman0@users.noreply.github.com>
2022-10-28 15:21:56 +00:00
Vincent Kling
6363acf30a Add dont_change_updated_at to fetch_done 2022-10-28 10:19:30 +02:00
Vincent Kling
6b785abb01 Rename flag_updated_at_as_modified to dont_change_updated_at 2022-10-28 10:05:47 +02:00
Florent Daigniere
84a722eabc Optimize the query 2022-10-24 19:31:53 +02:00
Vincent Kling
8a60b658b4 Implement FETCHMAIL_ENABLED 2022-10-20 13:41:35 +02:00
Vincent Kling
23d06a5761 Fix a bunch of typos 2022-10-19 19:41:49 +02:00
Florent Daigniere
0204c9e59d doh 2022-10-19 16:08:29 +02:00
Florent Daigniere
8775a2bf04 untested code that may just work 2022-10-19 15:28:20 +02:00
Florent Daigniere
3e51d15b03 Remove the strict anti-spoofing rule. 2022-10-18 15:58:53 +02:00
Alexander Graf
d9bf6875e1
Optimize build order for better caching 2022-10-17 16:20:52 +02:00
Alexander Graf
146921f619
Move curl to base image 2022-10-14 14:34:58 +02:00
Alexander Graf
4c1071a497
Move all requirements*.txt to base image 2022-10-14 14:34:27 +02:00
Alexander Graf
a29f066858
Move even more python deps to base image 2022-10-12 16:32:27 +02:00
Alexander Graf
52dd09d452
Fix assets build process #2 2022-10-12 16:32:26 +02:00
Alexander Graf
768c0cc1ce
Fix assets build process 2022-10-12 16:32:26 +02:00
Alexander Graf
9fe452e3d1
Use base image when building core images 2022-10-12 16:32:20 +02:00
Alexander Graf
295d7ea675
Move assets to own Dockerfile 2022-10-12 16:32:20 +02:00
Vincent Kling
bda404182f Replace before update listener with method in the Base class 2022-10-07 11:17:46 +02:00
bors[bot]
1cdc4e76b4
Merge #2455
2455: Fix/missing tanslations r=mergify[bot] a=DjVinnii

## What type of PR?

Fix/Enhancement

## What does this PR do?
Add missing Dutch translation, as well as the German translation for `Start of vacation`

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

## 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
- [ ] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Vincent Kling <v.kling@vinniict.nl>
Co-authored-by: Alexander Graf <ghostwheel42@users.noreply.github.com>
Co-authored-by: Dimitri Huisman <diman@huisman.xyz>
2022-10-05 12:44:18 +00:00
Dimitri Huisman
5b21fae968 Add missing Dutch translation 2022-10-05 07:22:42 +00:00
Alexander Graf
7682b4fa7f
Fix typo and translate Website with Webseite 2022-09-27 11:50:16 +02:00
Alexander Graf
ffa7d6c565
Updated german translation 2022-09-26 15:22:38 +02:00
Vincent Kling
102d96bc7d Implement event lister to keep updated_at unchanged on quota_bytes_used updates 2022-09-26 09:48:29 +02:00
Vincent Kling
a02a2c26a7 Fix typo 2022-09-25 10:34:41 +02:00
Vincent Kling
486dd06ca8 Add missing German translation for Start of vacation 2022-09-23 15:17:26 +02:00
Vincent Kling
84f60116ea Add missing Dutch translations 2022-09-23 15:14:15 +02:00
Florent Daigniere
6a0e881522 Introduce TLS_PERMISSIVE for port 25
This new advanced setting to harden cipher configuration on port 25. Changing the default is strongly discouraged, please read the documentation before doing so.
2022-09-12 12:53:57 +02:00
Vincent Kling
bab3f0f5a4 Remove POD_ADDRESS_RANGE 2022-09-01 15:08:26 +02:00
bors[bot]
7ed1da5bf1
Merge #2440
2440: The ARM wheels don't work r=mergify[bot] a=nextgens

## What type of PR?

bug-fix

## What does this PR do?

Remove piwheels to ensure we always rebuild on ARM

### Related issue(s)
- closes #2439
- #1200


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2022-08-31 13:39:19 +00:00
Florent Daigniere
35a794cfd6 The ARM wheels don't work 2022-08-31 13:44:54 +02:00
Florent Daigniere
355589a23c Apparently SQLAlchemy needs to be told explictely 2022-08-30 14:26:10 +02:00
Florent Daigniere
30b3a3771e Prevent signups with accounts where an alias exists 2022-08-27 18:09:52 +02:00
Dimitri Huisman
81c9e01d24 finishing touches for PR# 2328
Antispam.rst contained a syntax error.
Move config description to common section which is more fitting.
Fixed wrong assignment of default value for DEFAULT_SPAM_THRESHOLD in models.py.
2022-08-19 17:58:33 +00:00
Florent Daigniere
1500936232 Some people will need this at runtime 2022-08-19 19:32:42 +02:00
Florent Daigniere
bd5fd9536d doh 2022-08-19 19:25:49 +02:00
Florent Daigniere
e0643cf45c Disable the cache; don't upgrade pip if not req 2022-08-19 19:23:29 +02:00
Florent Daigniere
f760024812 These are required for the healthcheck 2022-08-19 19:08:10 +02:00
Florent Daigniere
19eda03a49 Build wheels only if we have to. 2022-08-19 18:48:23 +02:00
bors[bot]
53de7b7d60
Merge #2403
2403: Feature: switch CI/CD from build to buildx r=mergify[bot] a=Diman0

## What type of PR?

Feature and enhancement

## What does this PR do?

Switch from docker build to buildx for CI/CD.
    - The main workflow file has been optimised and simplified.
    - Images are built in parallel when building locally resulting in much faster build times.
    - The github action workflow is about 50% faster.
    - Arm images are built as well. These images are not tested due to restrictions of github actions (no arm runners). The tags of the images have -arm appended to it. The arm images are built on merge on master and release branch (x.y). They do not influence the normal CI/CD workflow used for bors (for PR) and real releases (merge on master and branch x.y for x86_64). 
    - Arm images (and normal x86_64 images) can also be built locally.
    - Reusable workflow is introduced for building, testing and deploying the images. This allows the workflow to be reused for other purposes in the future.
    - Workflow can be manually triggered. This allows forked Mailu projects to also use the workflow for building images.

The main workflow makes use of github actions cache to store the cache layer. This layer is used to quickly rebuilt the images in the testing step and deploy step.

Unfortunately the building the arm images fails sometimes due to timeouts. Sometimes the connection to github actions cache is very slow. Restarting the workflow from the last failed step resolves this. I have not observed this with the normal build.

Just as previous time, you can use a forked project for testing the changes (https://github.com/Diman0/Mailu_Fork). You should still have owner access. I have created branch 1.11 for testing. You can see I already push 4 times to branch 1.11 (current version is 1.11.3).

### Related issue(s)
- Mention an issue like: #001
- closes #2383 
- closes #1830
- closes #1200

## 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
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Dimitri Huisman <diman@huisman.xyz>
2022-08-19 13:19:13 +00:00
bors[bot]
bae15c0af3
Merge #2404
2404: Forwarding emails option in user settings did not support 1 letter do… r=mergify[bot] a=Diman0

…mains.

## What type of PR?

Bug-fix

## What does this PR do?

Forwarding emails option in user setting did not support 1 letter domains. The regex for checking the validity of  multiple email addresses string has been modified to allow 1 letter domains and to allow 1 letter local part.

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

## 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.

- [n/a] 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: Dimitri Huisman <diman@huisman.xyz>
2022-08-04 15:33:11 +00:00
Dimitri Huisman
57865495d4 Forwarding emails option in user settings did not support 1 letter domains. 2022-08-04 14:51:20 +00:00
Dimitri Huisman
f6de2b2938 Switch from docker build to buildx for CI/CD.
- The main workflow file has been optimised and simplified.
- Images are built in parallel when building locally resulting in faster build times.
- The github action workflow is about 50% faster.
- Arm images are built as well. These images are not tested due to restrictions of github actions (no arm runners). The tags of the images have -arm appended to it.
- Arm images can also be built locally.
- Reusable workflow is introduced for building, testing and deploying the images.
  This allows the workflow to be reused for other purposes in the future.
- Workflow can be manually triggered. This allows forked Mailu projects to also use the workflow for building images.
2022-08-03 09:36:53 +00:00
Alexander Graf
c478e26d68
Encode domain part of email addresses before returning. 2022-07-28 16:21:34 +02:00
Alexander Graf
5179cf0618
Fix localpart splitting and make code more readable. 2022-07-28 16:20:01 +02:00
enginefeeder101
82860d0f80
Moved parsing environment variable to global application config dictionary
Per requested changes added the ``DEFAULT_SPAM_THRESHOLD`` to the main
application configuration dictionary in ``configuration.py`` and updated
``models.py`` accordingly.
No error handling is added, as that was not required.
2022-06-08 17:13:38 +02:00
enginefeeder101
6c83d25312
Configurable default spam threshold used for new users
This commit adds functionality to set a custom default spam threshold
for new users. The environment variable ``DEFAULT_SPAM_THRESHOLD`` can
be used for this purpose. When not set, it defaults back to 80%, as the
default value was before
If ``DEFAULT_SPAM_THRESHOLD`` is set to a value that Python cannot
parse as an integer, a ValueError is thrown. There is no error handling
for that case built-in.
2022-06-08 16:59:28 +02:00
Alexander Graf
e75201bb34
Add default to column spam_mark_as_read 2022-05-25 08:54:10 +02:00
Florent Daigniere
04b7ddfffd Merge remote-tracking branch 'upstream/master' into Riscue-master 2022-05-22 19:01:31 +02:00
Florent Daigniere
d2aa647a9f l10n 2022-05-22 19:00:46 +02:00
bors[bot]
6f89209f9f
Merge #2302
2302: Update alpine-linux to 3.14.5 - Zlib security FIX r=mergify[bot] a=willofr

## What type of PR?
Security fix

## What does this PR do?
Update alpine docker image to alpine-3.14.5

- closes #2291

## 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] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Will <will@packer-output-c8fcfb40-3d93-4475-8f87-e14a9dd683b6>
2022-04-02 10:33:34 +00:00
Will
a54a784168 Update alpine-linux to 3.14.5 - Zlib security FIX 2022-03-30 09:08:28 +00:00
hitech95
fc8926493c admin: graceful fail on user fetch in basic auth
Signed-off-by: hitech95 <nicveronese@gmail.com>
2022-03-27 13:17:57 +02:00
bors[bot]
c15e4e6015
Merge #2276
2276: Autoconfig of email clients r=mergify[bot] a=nextgens

## What type of PR?

Feature

## What does this PR do?

It provides auto-configuration templates for email clients and encourages them to use implicit TLS (see https://nostarttls.secvuln.info/)

There are numerous caveats:
- it will only work if suitable DNS records are created and certificates obtained (autoconfig, autodiscover, ...)
- the mobileconfig file isn't signed
- the credentials will be prompted... we could/should provision a token on each request instead
- it currently doesn't advertise caldav
- it's IMAP only

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

## 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
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2022-03-22 08:53:47 +00:00
bors[bot]
8cc91bad75
Merge #2281 #2285 #2286 #2287
2281: Update alpine-linux to 3.14.4 - OpenSSL security FIX r=mergify[bot] a=willofr

## What type of PR?
Security fix

## What does this PR do?
Update Dockerfiles to use alpine-linux 3.14.4 which contains a security fix for openssl
https://alpinelinux.org/posts/Alpine-3.12.10-3.13.8-3.14.4-released.html

## 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] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


2285: Update names of language json files r=mergify[bot] a=ghostwheel42

## What type of PR?

bug-fix

## What does this PR do?

language json files of datatables i18n have been renamed
this updates the mappings to the current names


2286: Fix typo in Traefik reverse proxy docs r=mergify[bot] a=ghostwheel42

Slight typo in the Traefik reverse proxy docs. Found through running into the issue on my own instance.

## What type of PR?

documentation

## What does this PR do?

Adds  #2282 to master


2287: Fix typo in docs: cert not certs r=mergify[bot] a=ghostwheel42

## What type of PR?

documentation

## What does this PR do?

just a typo

Co-authored-by: Will <will@packer-output-c8fcfb40-3d93-4475-8f87-e14a9dd683b6>
Co-authored-by: willofr <willofr@users.noreply.github.com>
Co-authored-by: Alexander Graf <ghostwheel42@users.noreply.github.com>
Co-authored-by: DAHPr0gram3r <cbillwork02@gmail.com>
2022-03-18 22:36:50 +00:00
Alexander Graf
d70596d431
Update names of language json files 2022-03-18 20:53:46 +01:00
Alexander Graf
64ad6931e9
Move 'is_valid_user = user is not None' into else 2022-03-18 20:08:16 +01:00
Alexander Graf
630a4e9b5e
Update auth.py
Add spaces
2022-03-18 20:05:16 +01:00
Maximilian Fischer
8775dc5b15 Fixing AUTH_RATELIMIT_IP not working on imap/pop3/smtp
#2283
2022-03-17 20:36:23 +01:00
Will
d02296c3bc Update alpine-linux to 3.14.4 - OpenSSL security FIX 2022-03-17 10:40:42 +00:00
Florent Daigniere
ce9dc3a335 ghostwheel42's suggestion 2022-03-17 11:39:57 +01:00
Florent Daigniere
83140322e0 ghostwheel42's suggestion 2022-03-17 11:38:22 +01:00
Florent Daigniere
3aa735cc2d ghostwheel42's suggestion 2022-03-17 11:37:01 +01:00
Florent Daigniere
9bc963f19b don't think the escaping is required but it was there 2022-03-16 14:58:43 +01:00
Florent Daigniere
3e6f3a95a4 Reflect the data from the POST 2022-03-16 14:43:14 +01:00
Florent Daigniere
14931c4acd doh 2022-03-16 14:14:03 +01:00
Florent Daigniere
c6c444cfa7 simplify 2022-03-16 14:04:02 +01:00
Florent Daigniere
373e6d2161 doh 2022-03-16 14:04:02 +01:00
Florent Daigniere
184c9bc566 Add json redirect 2022-03-16 14:04:02 +01:00
Florent Daigniere
9a2d8d63a3 Search and replace wasn't a good idea 2022-03-16 14:04:02 +01:00
Florent Daigniere
c50750054b Allow POST 2022-03-16 14:04:02 +01:00
Florent Daigniere
71897f4ff0 Doh 2022-03-16 14:04:02 +01:00
Florent Daigniere
6fc1273b58 Add a link to autoconfigure apple devices 2022-03-16 14:04:02 +01:00
Florent Daigniere
0bccb5045c STARTTLS is a bad idea 2022-03-16 14:04:02 +01:00
Florent Daigniere
81b592f3cb try to get LE certs for the new names 2022-03-16 14:04:02 +01:00
Florent Daigniere
a3f9e2beee Use priorities instead 2022-03-16 14:04:02 +01:00
Florent Daigniere
2b62a6327a Do explicit TLS where possible 2022-03-16 14:04:02 +01:00
Florent Daigniere
c817eaf608 Add the SRV record for autodiscover 2022-03-16 14:04:02 +01:00
Florent Daigniere
cdc92aa65b Mobileconfig apple style 2022-03-16 14:04:02 +01:00
Florent Daigniere
ccd2cad4f1 Autodiscovery microsoft style 2022-03-16 14:04:02 +01:00
Florent Daigniere
523cee1680 Autoconfig mozilla-style 2022-03-16 14:04:02 +01:00
bors[bot]
0b25854de0
Merge #2210
2210: Add input validation for domain creation r=mergify[bot] a=0pc0deFR

## What type of PR?

bug-fix

## What does this PR do?

This patch add the input validation for domain creation.

### Related issue(s)
- Mention an issue like: #1817
- Auto close an issue like: closes #1817


Co-authored-by: Kevin Falcoz <0pc0defr@gmail.com>
Co-authored-by: Dimitri Huisman <diman@huisman.xyz>
2022-03-12 12:34:30 +00:00
İbrahim Akyel
f65e2fc469 Feature: Marking "Read" spam mails 2022-03-11 16:58:50 +03:00
Florent Daigniere
a7f9a35fa1
Merge branch 'master' into fix2274 2022-03-09 19:33:04 +01:00
Florent Daigniere
a4ed464170 doh 2022-03-09 19:29:39 +01:00
Florent Daigniere
0bfbb3bcd4
doh 2022-03-08 13:10:27 +01:00
Florent Daigniere
cd3eee4c51 ghostwheel42's suggestion 2022-03-07 09:09:36 +01:00
Florent Daigniere
d723326b8e style 2022-03-07 09:04:40 +01:00
Florent Daigniere
f01d8cd9b9 improve 2022-03-05 18:41:06 +01:00
Florent Daigniere
7b9c4e01f7 improve 2022-03-05 18:36:27 +01:00
Florent Daigniere
91de20c49c Fix exception in logs
This was occuring when you had square brackets in the domain part
2022-03-05 18:22:58 +01:00
Florent Daigniere
8cf76afbab Catch the ValueError instead 2022-03-05 18:01:30 +01:00
Florent Daigniere
08aa32a5df Revert "Don't bother running the query without an address"
This reverts commit dc81979550.
2022-03-05 17:59:44 +01:00
Florent Daigniere
7ce7f2096b belt, braces and suspenders 2022-03-05 14:54:54 +01:00
Florent Daigniere
dc81979550 Don't bother running the query without an address
This should solve the following in admin logs:
"WARNING in nginx: Invalid user 'xxxx': (builtins.ValueError)
invalid email address (no "@")"
2022-03-05 14:33:20 +01:00
bors[bot]
2e9b14d536
Merge #2254
2254: Send ISRG_X1 on port 25, make DANE pin that r=mergify[bot] a=nextgens

## What type of PR?

bug-fix

## What does this PR do?

Ensure we send ISRG_X1 in the handshake on port 25 (non-interactive, size doesn't really matter).

Update the DANE pin to reflect the change.

I am not sure whether we will need to add --preferred-chain= in the future; This may be the case when letsencrypt decides to use X2/the ECDSA chain

This needs to be tested on a letsencrypt account that isn't mine (I'm opted in for the alternate cert chains)

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

## 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.

There's already a towncrier news for it

Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2022-02-24 13:22:57 +00:00
Dimitri Huisman
c40a0f4b80 Change link in warning to master. Master is always available. 1.9 will be unavaiable in the future. 2022-02-23 10:48:53 +00:00
Florent Daigniere
e4a32b55f5 Send ISRG_X1 on port 25, make DANE pin that 2022-02-19 14:35:45 +01:00
Florent Daigniere
d3e7ea5389 spell it out 2022-02-19 13:30:36 +01:00
Florent Daigniere
a8dc20962a workaround a bug in coredns 2022-02-19 13:02:52 +01:00
Dimitri Huisman
55a601de5a Add missing import for validators, improve behaviour when an error occurs. 2022-02-17 13:09:15 +00:00
Dimitri Huisman
7d801c560c Improve if statement 2022-02-17 12:45:35 +00:00
Florent Daigniere
9466ad4131 fix #2220 2022-02-13 15:40:20 +01:00
Kevin Falcoz
278d74ce6f
Add title attribute on user-panel div 2022-02-01 13:53:11 +01:00
Kevin Falcoz
3fe1dbe881
Add input validation for domain creation 2022-02-01 13:08:30 +01:00
Kevin Falcoz
c69f886a73 Update code with ghostwheel42 comments 2022-02-01 09:10:51 +01:00
Kevin Falcoz
3e394faf92
Patch function "Display Name" into admin page 2022-01-31 16:40:37 +01:00
Florent Daigniere
b9e614145f there too 2022-01-21 15:01:23 +01:00
Florent Daigniere
b7fb8c661a switch to new API 2022-01-21 14:54:49 +01:00
Billy Chan
90394d7d8c 🎨 use resolver.resolve 2022-01-21 21:17:37 +08:00
shing6326
32446f03e7
Update start.py
fix missing leading . for the resolver test
2022-01-21 15:47:22 +08:00
bors[bot]
1e53530164
Merge #2144
2144: Enable unbound by default, warn if the DNS resolver doesn't work r=mergify[bot] a=nextgens

## What type of PR?

bug-fix

## What does this PR do?

Enable unbound by default, warn if the DNS resolver doesn't work

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

## 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.


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
Co-authored-by: Florent Daigniere <nextgens@users.noreply.github.com>
2022-01-12 13:21:49 +00:00
Florent Daigniere
a9da0c084a
syntax error 2022-01-12 13:44:17 +01:00
Florent Daigniere
a2f6243382
remove the error variable 2022-01-12 13:34:18 +01:00
Florent Daigniere
b12616b93f
Make the recommendation clearer 2022-01-12 09:55:14 +01:00
Alexander Graf
f809be39bf
supply missing fields argument 2022-01-11 18:53:01 +01:00
Florent Daigniere
7bd1fd3489 fix 2145 2022-01-07 09:07:32 +01:00
Florent Daigniere
379fe18f7a test dns resolvers at startup 2022-01-05 18:49:30 +01:00
Florent Daigniere
98973223fd
reduce TTL to 1d 2022-01-05 11:37:29 +01:00
Florent Daigniere
792893caae change TTL to 1y 2022-01-05 10:41:25 +01:00
Florent Daigniere
671f3e382a Fix 2138: Pin DANE with the full cert 2022-01-05 10:38:27 +01:00
Florent Daigniere
7f89a29790 Fix 2125
Make the caller responsible to know whether the rate-limit code should
be called or not
2022-01-03 13:38:21 +01:00
bors[bot]
65d905fe62
Merge #2099
2099: update Dockerfile to alpine 3.14.3 r=mergify[bot] a=willofr

## What type of PR?
Security fix

## What does this PR do?
Updated the Dockerfile to use the latest alpine version 3.14.3 where several CVEs have been fixed: https://alpinelinux.org/posts/Alpine-3.14.3-released.html
New images successfully built on my test env.

### 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
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Will <will@packer-output-c8fcfb40-3d93-4475-8f87-e14a9dd683b6>
Co-authored-by: willofr <willofr@users.noreply.github.com>
2021-12-31 12:06:53 +00:00
bors[bot]
3eca813182
Merge #2116
2116: fix 2114: redirect old path r=mergify[bot] a=nextgens

## What type of PR?

bug-fix

## What does this PR do?

Old paths may still be cached in browsers, it's easy enough to redirect them

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


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2021-12-30 15:24:51 +00:00
Florent Daigniere
c4675e6e75 fix 2114: redirect old path 2021-12-30 15:29:56 +01:00
Dimitri Huisman
b4d3d4b3c9 Preparations for 1.9 release. 2021-12-29 14:40:45 +00:00
Dimitri Huisman
51d94b8d14 Fix issue 2102 2021-12-22 17:40:51 +00:00
Will
b2abbc8856 update Dockerfile to alpine 3.14.3 2021-12-22 09:19:44 +00:00
Florent Daigniere
bee6e980e3 doh 2021-12-21 16:23:27 +01:00
Florent Daigniere
58d0faff7f ensure we clear the token on delete() 2021-12-21 15:59:00 +01:00
Florent Daigniere
2b29cfb3f0 fix cleanup_sessions() 2021-12-21 15:55:59 +01:00
Florent Daigniere
f0247a2faf Use self where appropriate 2021-12-21 15:45:05 +01:00
Florent Daigniere
c161a2c987 syntax 2021-12-21 15:42:12 +01:00
bors[bot]
18865bf03b
Merge #2094
2094: Sessions tweaks r=mergify[bot] a=nextgens

## What type of PR?

bug-fix

## What does this PR do?

- Make all sessions permanent, introduce SESSION_TIMEOUT and PERMANENT_SESSION_LIFETIME.
- Prevent the creation of a session before there is a login attempt
- Ensure that webmail tokens are in sync with sessions

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

## 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
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
Co-authored-by: Dimitri Huisman <diman@huisman.xyz>
2021-12-21 13:08:48 +00:00
Dimitri Huisman
d40be05117 Fix missing edit buttons in alias, relay and fetchmail lists in admin. 2021-12-21 12:10:04 +00:00
Florent Daigniere
a28c7f903e do it once 2021-12-21 09:50:01 +01:00
Dimitri Huisman
f88daa1e77 Add missing cast to int 2021-12-20 21:07:25 +00:00
Florent Daigniere
5f313310d4 regenerate() shouldn't extend lifetime 2021-12-20 09:37:11 +01:00
Florent Daigniere
fe18cf9743 Fix 2080
Ensure that webmail tokens are in sync with sessions
2021-12-19 23:24:44 +01:00
Florent Daigniere
02c93c44f2 Tweak sessions
simplify:
- make all sessions permanent by default
- update the TTL of sessions on access (save always)
- fix session-expiry, modulo 8byte precision
2021-12-19 20:52:51 +01:00
Florent Daigniere
ea96a68eb4 don't create a session if we don't have to 2021-12-19 20:48:29 +01:00
Florent Daigniere
346ace5fb3 Make webmail the default action 2021-12-18 15:38:07 +01:00
bors[bot]
08be233607
Merge #2058
2058: Implement versioning for CI/CD workflow. r=mergify[bot] a=Diman0

## What type of PR?

Feature!

## What does this PR do?
This PR introduces 3 things
- Add versioning (tagging) for branch x.y (1.8). E.g. 1.8.0, 1.8.1 etc.
  - docker repo will contain x.y (latest) and x.y.z (pinned version) images.
  - The X.Y.Z tag is incremented automatically. E.g. if 1.8.0 already exists, then the next merge on 1.8 will result in the new tag 1.8.1 being used.
- Make the version available in the image.
  -  For X.Y and X.Y.Z write the version (X.Y.Z) into /version on the image and add a label with version=X.Y.Z
	  -  This means that the latest X.Y image shows the pinned version (X.Y.Z e.g. 1.8.1) it was based on. Via the tag X.Y.Z you can see the commit hash that triggered the built.
  -  For master write the commit hash into /version on the image and add a label with version={commit hash}
-  Automatic releases. For x.y triggered builts (e.g. merge on 1.9) do a new github release for the pinned x.y.z (e.g. 1.9.2). 
  -  Release shows a static message (see RELEASE_TEMPLATE.md) that explains how to reach the newsfragments folder and change the branch to the tag (x.y.z) mentioned in the release. Now you can get the changelog by reading all newsfragment files in this folder.

This PR does not change anything to our workflow (what we (human persons) do). Our processes are still exactly the same. The above introduced logic is automatic. When we backport to X.Y all the magic for creating the pinned version X.Y.Z is handled by the CI/CD workflow.

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

## 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
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.

## Testing
Suggested testing steps. This should cover all situations including BORS. It does require that you use your own docker repo or temporarily create a new one.
Suggested testing steps.
1. Create new github repo.
2. Add the required docker secrets to the project (see beginning of CI.yml for the secret names), DOCKER_UN, DOCKER_PW, DOCKER_ORG, DOCKER_ORG_TESTS.
3. Clone the project.
4. Copy the contents of the PR to the cloned project.
5. Push to your new github repo.
6. Now master images are built. Check that images with tag master are pushed to your docker repo
7. Check with docker inspect nginx:master that it has the label version={commit hash}.
8. Run an image, run `docker-compose exec <name> cat /version`. Note that /version also contains the pinned version. For master the pinned version is the commit hash.
9. Create branch 1.8. 
10. Push branch 1.8 to repo.
11. Note that tags 1.8 and 1.8.0 are built and pushed to docker repo
12. Inspect label and /version. Note that 1.8 and 1.8.0 both show version 1.8.0.
13. Push another commit to branch 1.8.
14. Note that tags 1.8 and 1.8.1 are built and pushed to docker repo
15. Inspect label and /version. Note that 1.8 and 1.8.1 both show version 1.8.1.
16. Let's check BORS stuff.
17. Create branch testing.
18. Push the commit with the exact commit text (IMPORTANT!!): `Try #1234:`'.
19. Note that images are built and pushed for tag `pr-1234`.
20. Inspect label and /version. Note that the version is `pr-1234`.
20. Create branch staging.
21. Push the commit with commit text: `Merge #1234`.
22. Note that this image is not pushed to docker (as expected).

but you could also check the GH repo and docker repo I used:
https://github.com/Diman0/Mailu_Fork
https://hub.docker.com/r/diman/rainloop/tags

Co-authored-by: Dimitri Huisman <diman@huisman.xyz>
2021-12-15 09:29:08 +00:00
Dimitri Huisman
d76773b1df Also check the SMTP port for webmail/token 2021-12-14 14:52:15 +00:00
Dimitri Huisman
f26fa8da84 Fix Webmail token check. Fix Auth-Port for Webmail. #2079 2021-12-14 11:26:33 +00:00
Florent Daigniere
4fffdd95e9 Reduce logging level 2021-12-05 15:07:06 +01:00
Dimitri Huisman
f7677543c6 Process code review remarks
- Moved run to bottom of Dockerfile to allow using unmodified / cached states.
- Simplified bash code in deploy.sh.
- Improved the large bash one-liner in CI.yml. It could not handle >9 for 1.x.
2021-11-18 17:21:56 +00:00
Dimitri Huisman
56dd70cf4a Implement versioning for CI/CD workflow (see #1182). 2021-11-17 20:00:04 +00:00
Alexander Graf
aa1d605665
Merge remote-tracking branch 'upstream/master' into passlib 2021-11-16 10:21:08 +01:00
Alexander Graf
84a5514a97
fixed auto reply form 2021-11-12 12:19:45 +01:00
Alexander Graf
cf7914d050
fixed field iteration 2021-11-11 16:00:00 +01:00
Alexander Graf
fd5bdc8650
added localized date output 2021-11-11 12:20:52 +01:00
Alexander Graf
0315ed78d9
Merge remote-tracking branch 'upstream/master' into update_deps 2021-11-11 11:49:48 +01:00
bors[bot]
56cbc56df7
Merge #2044
2044: Vault/rspamd: don't return any key for relayed domains r=mergify[bot] a=nextgens

## What type of PR?

enhancement

## What does this PR 

Don't return any key for relayed domains. We may want to revisit this (ARC signing)... but in the meantime it saves from a scary message in rspamd.
    
```signing failure: cannot request data from the vault url: /internal/rspamd/vault/v1/dkim/ ...```


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2021-11-08 16:01:10 +00:00
bors[bot]
78dd13a217
Merge #2042
2042: Add MESSAGE_RATELIMIT_EXEMPTION r=mergify[bot] a=nextgens

## What type of PR?

Enhancement

## What does this PR do?

Add a new knob called ```MESSAGE_RATELIMIT_EXEMPTION```.

### Related issue(s)
- #1774

## 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
- [ ] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2021-11-08 15:29:50 +00:00
Florent Daigniere
6bf1a178b9 Go with ghostwheel42's suggestion 2021-11-08 09:34:02 +01:00
Florent Daigniere
b68033eb43 only parse it once 2021-11-08 09:23:24 +01:00
Alexander Graf
82e14f1292
Merge branch 'master' into update_deps 2021-11-07 21:25:08 +01:00
bors[bot]
f0188d9623
Merge #2034
2034: Add timezone to containers r=mergify[bot] a=DjVinnii

## What type of PR?

Enhancement

## What does this PR do?
This PR adds the tzdata package so that the environment variable `TZ` can be used to set the timezone of containers.

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

## 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
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: DjVinnii <vincentkling@msn.com>
2021-11-07 18:52:43 +00:00
Florent Daigniere
dc6e970a7f handle HTTP too 2021-11-07 12:41:29 +01:00
Florent Daigniere
bbef4bee27 Don't return any key for relayed domains
We may want to revisit this (ARC signing)... but in the meantime
it saves from a scary message in rspamd

signing failure: cannot request data from the vault url: /internal/rspamd/vault/v1/dkim/ ...
2021-11-07 12:20:31 +01:00
Florent Daigniere
6c6b0b161c Set the right flags on the rate_limit cookie 2021-11-06 10:45:59 +01:00
Florent Daigniere
f9373eacab Merge remote-tracking branch 'upstream/master' into misc 2021-11-06 10:05:59 +01:00
Florent Daigniere
5714b4f4b0 introduce MESSAGE_RATELIMIT_EXEMPTION 2021-11-06 10:05:52 +01:00
DjVinnii
30d7e72765 Move TZ to Advanced settings 2021-11-05 14:44:12 +01:00
DjVinnii
225160610b Set default TZ in Dockerfiles 2021-11-04 14:22:12 +01:00
DjVinnii
81e33d3679 Add default TZ to config manager 2021-11-04 13:21:37 +01:00
Alexander Graf
97e79a973f fix sso login button spacing again 2021-11-04 08:32:53 +01:00
Alexander Graf
73ab4327c2 updated database libraries (sqlalchemy etc.)
this is working fine, but introduces a sqlalchemy warning
when using config-import:

  /app/mailu/schemas.py:822:
    SAWarning: Identity map already had an identity for (...),
    replacing it with newly flushed object.
    Are there load operations occurring inside of an event handler
    within the flush?
2021-11-03 22:57:07 +01:00
Alexander Graf
4669374b9e use python wheels 2021-11-03 22:55:41 +01:00
Alexander Graf
85d86d4156 some more libs updated 2021-11-03 22:55:26 +01:00
Alexander Graf
ffd99c3fa8 updated flask
ConfigManager should not replace app.config - this is causing trouble
with some other flask modules (swagger).
Updated ConfigManager to only modify app.config and not replace it.
2021-11-03 22:21:26 +01:00
Alexander Graf
87884213c4 update misc helper libs 2021-11-03 22:03:51 +01:00
Alexander Graf
56f65d724d update babel 2021-11-03 21:52:59 +01:00
Alexander Graf
5238b00f0b update alembic 2021-11-03 21:33:39 +01:00
Alexander Graf
f613205fe1 update tenacity 2021-11-03 21:30:34 +01:00
Alexander Graf
833ccb5544 reload page using GET when selecting language 2021-11-03 20:38:00 +01:00
Alexander Graf
8b15820b01 fix sso login button spacing 2021-11-03 20:35:05 +01:00
Alexander Graf
26fb108a3f updated Flask-Login 2021-11-03 20:22:47 +01:00
Alexander Graf
abc4112242 updated Werkzeug, Click and Flask-Migrate 2021-11-03 20:12:20 +01:00
Alexander Graf
f1d7bedd1b fix display of range inputs (again) 2021-11-03 19:54:15 +01:00
Alexander Graf
13e6793c9f Merge remote-tracking branch 'upstream/master' into update_deps 2021-11-03 19:35:51 +01:00
Alexander Graf
aca1e13648 update socrate - will be removed later 2021-11-02 20:47:53 +01:00
Alexander Graf
866741bcbe updated WTForms-Components deps 2021-11-02 19:22:58 +01:00
Alexander Graf
ef19869cde updated redis 2021-11-02 18:06:26 +01:00
Alexander Graf
d8efd3057c updated idna 2021-11-02 17:52:25 +01:00
Alexander Graf
8ad8cde0e2 removed some obsolete requirements 2021-11-02 17:06:28 +01:00
Alexander Graf
3ac1b3d86c update pyyaml and pygments 2021-11-02 17:02:54 +01:00
Alexander Graf
40cdff4911 updated dnspython 2021-11-02 16:49:25 +01:00
Alexander Graf
dcbe55f062 updated crypto 2021-11-02 16:28:37 +01:00
Alexander Graf
771b2d1112 duh 2021-11-02 16:21:31 +01:00
Alexander Graf
23d0cd0466 update tabluate. fix audit.py and include in container 2021-11-02 15:55:20 +01:00
Alexander Graf
8d90a74624 update werkzeug to 1.x 2021-11-02 15:39:41 +01:00
bors[bot]
5e212ea46d
Merge #2036
2036: round display of range inputs to 2 decimals r=mergify[bot] a=ghostwheel42

## What type of PR?

small fix

## What does this PR do?

rounds display of range inputs to 2 decimals 

### Related issue(s)

- small fix to #1966

## 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
- [X] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Alexander Graf <ghostwheel42@users.noreply.github.com>
2021-11-02 13:34:59 +00:00
Alexander Graf
80be3506da upgrade pip. completed reqs via pip freeze 2021-11-02 13:32:12 +01:00
Alexander Graf
598b2df5a0 update wtforms 2021-11-02 13:04:40 +01:00
Alexander Graf
e8b5f1a185 round display of range inputs to 2 decimals 2021-11-02 12:59:59 +01:00
DjVinnii
1d6809193b Add tzdata to core 2021-11-02 11:18:21 +01:00
Florent Daigniere
f3c93212c6 The Rate-limiter should run after the deny 2021-10-31 19:41:12 +01:00
Alexander Graf
9bc685c30b removed some more whitespace 2021-10-29 15:34:00 +02:00
Alexander Graf
8c31699baf fixed locale selector for no_NB 2021-10-29 15:29:20 +02:00
Alexander Graf
882a27f87c simplified if's and added external link icon 2021-10-29 15:07:25 +02:00
Alexander Graf
3141ffe791 removed some whitespace 2021-10-29 14:26:23 +02:00
Dimitri Huisman
6b16756d92 Fix acessing antispam via sidebar. 2021-10-29 09:22:46 +00:00
Dimitri Huisman
3449b67c86 Process code review remarks PR2023 2021-10-29 08:18:50 +00:00
Dimitri Huisman
8784971b7f Merge rate limiting and failed login logging 2021-10-28 18:55:35 +00:00
Dimitri Huisman
503044ef6e Reintroduce ProxyFix. Use two buttons for logging in. 2021-10-27 21:51:49 +00:00
Dimitri Huisman
c42ad8e71e Forgot to include changes for url_for of base.html 2021-10-27 18:49:36 +00:00
Dimitri Huisman
fb0f005343 Get rid of complicated prefix logic. Further simplify /static handling and nginx config. 2021-10-27 18:36:50 +00:00
Dimitri Huisman
da788ddee3 Merge branch 'fix-sso-1929' of github.com:Diman0/Mailu into fix-sso-1929 2021-10-27 12:38:18 +00:00
Dimitri Huisman
bdcc183165 Redirect to configured ENV VAR for Admin/Webmail, further simplify nginx config. 2021-10-27 11:24:10 +00:00
Florent Daigniere
fee13e6c4b Save a redirect 2021-10-27 11:11:22 +02:00
Florent Daigniere
d3f07a0882 Simplify the handling of /static 2021-10-27 10:56:34 +02:00
Dimitri Huisman
a47afec4ee Make logic more readable. 2021-10-27 08:22:36 +00:00
Dimitri Huisman
48764f0400 Ensure all requests from the page sso go through the page sso. 2021-10-27 08:06:53 +00:00
Dimitri Huisman
aab258d284 Move handling of logging out in admin, to sso logout page. 2021-10-26 11:54:25 +00:00
Dimitri Huisman
615743b331 Improve indendation of conditions. 2021-10-26 11:39:56 +00:00
Dimitri Huisman
5d81846c5d Introduce the shared stub /static for providing all static files 2021-10-26 11:30:06 +00:00
Dimitri Huisman
44d2448412 Updated SSO logic for webmails. Fixed small bug rate limiting. 2021-10-25 19:21:38 +00:00
Dimitri Huisman
f9eee0cbaf Adapt HEALTHCHECK to new URL 2021-10-25 17:43:53 +00:00
Dimitri Huisman
ed7adf52a6 Merge branch 'master' of github.com:Diman0/Mailu into fix-sso-1929 2021-10-25 17:31:25 +00:00
Dimitri Huisman
913a6304a7 Finishing touches. Introduce /static stub for handling all static files. 2021-10-25 17:24:41 +00:00
bors[bot]
a1192d8039
Merge #1987
1987: Enhancement to the rate limits r=mergify[bot] a=nextgens

## What type of PR?

enhancement

## What does this PR do?

Turn the rate-limiters into something useful (that won't fire for no reason).

- fix rate-limiting on /webdav/
- it changes the rate-limiting behaviour from limiting a single IP address to a subnet of a reasonable size (/24 on v4 and /56 on v6 both are now configurable) : AUTH_RATELIMIT_IP / AUTH_RATELIMIT_IP_V4_MASK / AUTH_RATELIMIT_IP_V6_MASK
- It ensures we only use IP-based rate-limits for attempts on accounts that do not exist
- it creates a new rate limit preventing attackers from targetting a specific user account (separate from what's above) : AUTH_RATELIMIT_USER
- it introduces a rate limiting exemption mechanism whereby, upon authentication, users will see their source-ip address being exempt for a specific amount of time AUTH_RATELIMIT_EXEMPTION_LENGTH. A similar mechanism is available for web-based sessions (see below)
- It introduces in AUTH_RATELIMIT_EXEMPTION a comma separated list of network CIDRs that will be exempt from both types of rate limiting
- it implements device-tokens, as described on https://owasp.org/www-community/Slow_Down_Online_Guessing_Attacks_with_Device_Cookies to ensure that genuine users aren't locked-out by a malicious attacker abusing the rate-limit feature.

Things that could be improved include:
- the IP-based rate limiter flags attempts against "non-existing" accounts: it could go further and flag the number of unique non-existing accounts attempted (to prevent the case of a user making a typo in his MUA configuration)
- the IP address exemption mechanism doesn't pin the exemption to a specific username: any real user can trivially bypass the rate limits (and attempt to brute-force someone else's account)

### Related issue(s)
- close #1926
- close #1745 
- close #1915


## 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
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
Co-authored-by: Diman0 <diman@huisman.xyz>
Co-authored-by: Florent Daigniere <nextgens@users.noreply.github.com>
2021-10-16 15:52:47 +00:00
Florent Daigniere
693b578bbb The second strip isn't necessary 2021-10-16 17:24:12 +02:00
Florent Daigniere
1c6165213c better that way 2021-10-16 16:54:56 +02:00
Florent Daigniere
34497cff20 doh 2021-10-16 16:35:48 +02:00
Florent Daigniere
e8871dd77f doh 2021-10-16 16:06:13 +02:00
Florent Daigniere
5b72c32251 Doh 2021-10-16 15:44:26 +02:00
Florent Daigniere
19b784b198 Parse the network configuration only once
thanks @ghostwheel42
2021-10-16 15:18:41 +02:00
Florent Daigniere
98742268e6 Make it more readable 2021-10-16 15:12:20 +02:00
Florent Daigniere
94bbed9746 Ensure we have the right IP 2021-10-16 10:39:43 +02:00
Florent Daigniere
c5bd82650f doh 2021-10-16 10:30:57 +02:00
Florent Daigniere
99c81c20a7 Introduce AUTH_RATELIMIT_EXEMPTION
This disables rate limiting on specific CIDRs
2021-10-16 10:26:38 +02:00
Florent Daigniere
c674f1567a Merge branch 'ratelimits' of https://github.com/nextgens/Mailu into ratelimits 2021-10-16 09:55:15 +02:00
Florent Daigniere
8414dd5cf0 Merge remote-tracking branch 'upstream/master' into ratelimits 2021-10-16 09:52:20 +02:00
Florent Daigniere
e14d2e7c03 Error out explictely if Auth-Port isn't set 2021-10-16 09:49:01 +02:00
Florent Daigniere
abaa2e8cc3 simplify client_ip 2021-10-16 09:46:21 +02:00
Florent Daigniere
de276a6822 Simplify extract_network_from_ip 2021-10-16 09:45:10 +02:00
Florent Daigniere
3bda8368e4 simplify the Auth-Status check 2021-10-16 09:39:34 +02:00
Florent Daigniere
2dd9ea1506 simplify 2021-10-16 09:36:49 +02:00
Florent Daigniere
068170c0ff Use app instead of flask.current_app where possible 2021-10-16 09:35:01 +02:00
Florent Daigniere
57b0dd490c Initialize user_email in all cases 2021-10-16 09:29:17 +02:00
qy117121
b1425015ef
Update messages.po
Fix wrong text
2021-10-16 03:51:22 +08:00
bors[bot]
afffe4063e
Merge #2018
2018: show dmarc record for report domain in domain details r=mergify[bot] a=ghostwheel42

## What type of PR?

documentation

## What does this PR do?

show dmarc record for report domain in domain details

### Related issue(s)

closes #1382

## 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: Alexander Graf <ghostwheel42@users.noreply.github.com>
2021-10-15 12:52:16 +00:00
bors[bot]
9f2aa0aadc
Merge #1986 #2014
1986: Document how to setup client autoconfig r=mergify[bot] a=nextgens

## What type of PR?

enhancement

## What does this PR do?

Document how to setup autoconfig. This works with most open-source MUAs (thunderbird, evolution, ...)

We could go further than that by providing dynamic configuration (issue an auth token for each MUA request)... but it won't work unless a new DNS entry (and matching certificate) is created.

### Related issue(s)
- #224

## 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
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


2014: Update Chinese translation r=mergify[bot] a=qy117121

## What type of PR?

translation

## What does this PR do?

Update Chinese translation. Use `zh` instead of `zh_CN`.

### Related issue(s)

none

## Prerequistes
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
- [X] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
Co-authored-by: qy117121 <mixuan121@gmail.com>
Co-authored-by: Alexander Graf <ghostwheel42@users.noreply.github.com>
2021-10-15 12:29:46 +00:00
Alexander Graf
7fe15ea9cf added dmarc record for report domain 2021-10-15 14:22:50 +02:00
bors[bot]
a5b1d36171
Merge #2017
2017: rspamd: get dkim keys via REST API instead of filesystem r=mergify[bot] a=ghostwheel42

## What type of PR?

enhancement

## What does this PR do?

rspamd now uses hashicorp's vault api v1 to get dkim keys and selectors for a domain.
this allows future enhancement (multiple keys) without reconfiguring and restarting rspamd.
it also makes mounting the /dkim volume into the rspamd container unnecessary.

### Related issue(s)

- improves and closes #2012 
- allows to implement key rotation using multiple selectors (see #1700)
- allows to implement dkim for alternate domains (see #1519)
- fixes and closes #1345 (selector transmitted by admin container is used)
- closes #1179 (no keys on disk)
- allows to implement key rotation from the outside (ie. via a helper script talking to some dns provider's api) (see #547)

## 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: Alexander Graf <ghostwheel42@users.noreply.github.com>
2021-10-15 12:08:40 +00:00
Alexander Graf
7b0c5935a8 only support GET method in vault 2021-10-15 13:16:37 +02:00
Alexander Graf
303fae00fb cleanup modules. use dkim selector from config 2021-10-14 23:25:42 +02:00