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

2993 Commits

Author SHA1 Message Date
qy117121
866f784d06
Create messages.po
Update the translation
2021-10-14 15:05:32 +08:00
qy117121
251eea5553
Update messages.po
Updated translation
2021-10-14 15:03:23 +08:00
Florent Daigniere
7277e0b4e4
Merge branch 'master' into ratelimits 2021-10-12 14:47:00 +02:00
bors[bot]
8c8c1b2015
Merge #1997
1997: Prevent traceback when using non-email in login r=mergify[bot] a=ghostwheel42

There's a traceback when the username used to log via SMTPAUTH
in is not an email address:

=== before ===
```
[...] ERROR in app: Exception on /internal/auth/email [GET]
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1179, in _execute_context
    context = constructor(dialect, self, conn, *args)
  File "/usr/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 719, in _init_compiled
    param.append(processors[key](compiled_params[key]))
  File "/usr/lib/python3.9/site-packages/sqlalchemy/sql/type_api.py", line 1201, in process
    return process_param(value, dialect)
  File "/app/mailu/models.py", line 60, in process_bind_param
    localpart, domain_name = value.lower().rsplit('`@',` 1)
ValueError: not enough values to unpack (expected 2, got 1)
[...]
[parameters: [{'%(140657157923216 param)s': 'foobar'}]]
```

=== after ===
```
[...] WARNING in nginx: Invalid user 'foobar': (builtins.ValueError) invalid email address (no "`@")`
```

## What type of PR?

enhancement

## What does this PR do?

replace traceback (ERROR) with error message (WARNING)

### 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
- [ ] 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-12 12:07:08 +00:00
bors[bot]
9b01e663b2
Merge #2007
2007: allow sending emails as user+detail@domain.tld r=mergify[bot] a=ghostwheel42

## What type of PR?

bug-fix or enhancement

## What does this PR do?

Allows sending emails with an added "+detail" in the local part.
 
### Related issue(s)

closes #1948

## 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: Alexander Graf <ghostwheel42@users.noreply.github.com>
Co-authored-by: root <ghostwheel42@users.noreply.github.com>
Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2021-10-09 17:01:25 +00:00
Florent Daigniere
e127e6b32f clarify the documentation 2021-10-09 18:58:51 +02:00
Florent Daigniere
14360f8926 RECIPIENT_DELIMITER can have several characters 2021-10-09 18:28:50 +02:00
root
8c59f35697 use RECIPIENT_DELIMITER for splitting 2021-10-09 17:43:09 +02:00
Alexander Graf
6a8066c0ae renamed newsfragment 2021-10-09 17:18:53 +02:00
Alexander Graf
22ed2b7f90 add newsfragment 2021-10-09 17:17:40 +02:00
Alexander Graf
1d571dedfc split localpart into user and tag 2021-10-09 17:11:12 +02:00
bors[bot]
c22d853c1a
Merge #2005
2005: SESSION_COOKIE_SECURE and HTTP won't work; make it explicit by displaying an alert r=mergify[bot] a=nextgens

## What type of PR?

enhancement

## What does this PR do?

Display an explicit alert and disable the login form (using javascript) when we have SESSION_COOKIE_SECURE=True and clients using HTTP to access it.

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

## 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: Alexander Graf <ghostwheel42@users.noreply.github.com>
2021-10-09 13:50:02 +00:00
Florent Daigniere
d131d863ba The if needs to be inside the block 2021-10-09 15:44:56 +02:00
bors[bot]
61bd1da247
Merge #1992
1992: Improve unbound configuration r=mergify[bot] a=nextgens

## What type of PR?

enhancement

## What does this PR do?

Improve the unbound configuration:
- remove settings that were default
- don't setup IPv6 if it's not configured
- enable qname minimization (for privacy)
- add a minimum TTL of 5m (prevent excessive resource usage and naive rebinding attacks)

## 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: Florent Daigniere <nextgens@freenetproject.org>
2021-10-08 22:50:35 +00:00
Alexander Graf
aaf3ddd002 moved javascript to app.js 2021-10-08 20:06:21 +02:00
Florent Daigniere
b48779ea70 SESSION_COOKIE_SECURE and HTTP won't work 2021-10-08 10:17:03 +02:00
bors[bot]
7678365ab3
Merge #2002
2002: Misc improvements to the postfix configuration r=mergify[bot] a=nextgens

## What type of PR?

enhancement

## What does this PR do?

- It removes a useless "Received" header
- It changes the SRS key from SECRET_KEY to a subkey (this will affect "in flight" bounces)

### Related issue(s)
- #466

## 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>
2021-10-03 09:19:30 +00:00
Florent Daigniere
502affbe66 Use the regexp engine since we have one 2021-10-03 10:14:49 +02:00
Florent Daigniere
a349190e52 simplify 2021-10-02 10:19:57 +02:00
Florent Daigniere
4a78d646db doh 2021-10-01 15:05:38 +02:00
Florent Daigniere
65ee1c1ef2 doh 2021-10-01 15:04:45 +02:00
Florent Daigniere
10d78a888b Derive a new subkey for SRS 2021-10-01 15:00:10 +02:00
Florent Daigniere
995ce8d437 Remove OUTCLEAN_ADDRESS
I believe that this isn't relevant anymore as we don't use OpenDKIM
anymore

Background on:
https://bofhskull.wordpress.com/2014/03/25/postfix-opendkim-and-missing-from-header/
2021-10-01 14:54:04 +02:00
bors[bot]
3f8aa4adfa
Merge #1998
1998: Fix healthcheck r=mergify[bot] a=ghostwheel42

## What type of PR?

bug-fix

## What does this PR do?

- fixes health check of roundcube container (introduced with sso / endless redirect)
- silence logging of health checks
- write php error log directly to /dev/stderr

### 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
- [ ] 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-09-28 11:33:12 +00:00
Alexander Graf
ef9e1ac279 remove health check from log 2021-09-28 12:29:57 +02:00
Alexander Graf
7380b248cf direct logging of php errors to stderr 2021-09-28 11:16:40 +02:00
Alexander Graf
cd17aa0c43 repair failing health-check 2021-09-28 11:06:59 +02:00
Alexander Graf
65133a960a Prevent traceback when using non-email in login
There's a traceback when the username used to log via SMTPAUTH
in is not an email address:

=== before ===
```
[...] ERROR in app: Exception on /internal/auth/email [GET]
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1179, in _execute_context
    context = constructor(dialect, self, conn, *args)
  File "/usr/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 719, in _init_compiled
    param.append(processors[key](compiled_params[key]))
  File "/usr/lib/python3.9/site-packages/sqlalchemy/sql/type_api.py", line 1201, in process
    return process_param(value, dialect)
  File "/app/mailu/models.py", line 60, in process_bind_param
    localpart, domain_name = value.lower().rsplit('@', 1)
ValueError: not enough values to unpack (expected 2, got 1)
[...]
[parameters: [{'%(140657157923216 param)s': 'foobar'}]]
```

=== after ===
```
[...] WARNING in nginx: Invalid user 'foobar': (builtins.ValueError) invalid email address (no "@")
```
2021-09-28 10:38:37 +02:00
Florent Daigniere
1cf0f76b52 not required anymore 2021-09-27 09:04:15 +02:00
Florent Daigniere
739702a034 doc 2021-09-25 16:31:11 +02:00
Florent Daigniere
e9f84d7d99 Improve the unbound configuration 2021-09-25 16:25:59 +02:00
bors[bot]
5236196288
Merge #1991
1991: re-enable mod_rewrite in roundcube r=mergify[bot] a=ghostwheel42

## What type of PR?

bug-fix

## What does this PR do?

re-enabled mod_rewrite to make use of safeguards in .htaccess
fixed permissions of /var/www/html to make sso.php symlink work with htaccess safeguards enabled
moved chown/mkdir/symlink from start.py to Dockerfile

### Related issue(s)

undo of #1990

## 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: Alexander Graf <ghostwheel42@users.noreply.github.com>
2021-09-25 11:58:38 +00:00
Alexander Graf
16691e83ad re-enable mod_rewrite in roundcube
moved chown/mkdir/symlink from start.py to Dockerfile
2021-09-24 18:15:00 +02:00
Florent Daigniere
7d56ed3b70 Merge branch 'master' of https://github.com/Mailu/Mailu into ratelimits 2021-09-24 13:40:59 +02:00
Florent Daigniere
464a117e9f this should be changed too 2021-09-24 13:37:00 +02:00
Florent Daigniere
862fdda55b Tweak the wording 2021-09-24 13:35:41 +02:00
Diman0
ac496eed19 Update setup with new rate limit config vars. 2021-09-24 12:57:17 +02:00
bors[bot]
71c5ca9fea
Merge #1990
1990: Fix roundcube sso login r=mergify[bot] a=Diman0

## What type of PR?

bug-fix

## What does this PR do?

It fixes SSO login for roundcube. PR #1966 added additional apache modules in the roundcube dockerfile. The additional rewrite module breaks the sso login. This PR removes the unused apache rewrite module.

### Related issue(s)
#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.

- [ ] 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: Diman0 <diman@huisman.xyz>
2021-09-24 10:31:17 +00:00
Diman0
e3fa74768a Add newsfragment. 2021-09-24 12:16:42 +02:00
Diman0
7083b3f7c6 Fix roundcube sso header issue
Removed apache rewrite module.
2021-09-24 12:10:21 +02:00
bors[bot]
dd88ff6dab
Merge #1989
1989: Fix #1988 r=mergify[bot] a=nextgens

## What type of PR?

bug-fix

## What does this PR do?

Fix a merge issue

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


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
2021-09-24 09:05:24 +00:00
Florent Daigniere
1e07b85fa1 doh 2021-09-24 10:20:21 +02:00
Florent Daigniere
24aadf2f52 ensure we log when the rate limiter hits 2021-09-24 10:07:41 +02:00
Florent Daigniere
64bc7972cc Make AUTH_RATELIMIT_IP 60/hour as discussed 2021-09-24 09:57:28 +02:00
Florent Daigniere
cab0ce2017 doh 2021-09-23 19:01:09 +02:00
Florent Daigniere
a9340e61f5 Log auth attempts on /admin 2021-09-23 18:48:23 +02:00
Florent Daigniere
89ea51d570 Implement rate-limits 2021-09-23 18:40:49 +02:00
Florent Daigniere
1157868370 Document how to setup autoconfig 2021-09-23 16:08:52 +02:00
bors[bot]
4c5c6c3b5f
Merge #1966
1966: AdminLTE3 optimizations & compression and caching r=mergify[bot] a=ghostwheel42

## What type of PR?

enhancement, bugfix

## What does this PR do?

Optimization and cleanup of styles and javascript code for AdminLTE 3
Adds caching headers, gzip and robots.txt to nginx.

### Related issue(s)

Makes #1800 even better. Thanks to `@DjVinnii` and `@Diman0` for the good work.
Closes #1905

## 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: Alexander Graf <ghostwheel42@users.noreply.github.com>
Co-authored-by: Dimitri Huisman <diman@huisman.xyz>
2021-09-22 10:00:34 +00:00
bors[bot]
b329971b87
Merge #1971
1971: Updated Polish translation. r=mergify[bot] a=ghostwheel42

## What type of PR?

translation

## What does this PR do?

Update polish translation. Used `pl/LC_MESSAGES/messages.po` from PR #1751 created by `@martys71`
Part of Discussion of 1.9 roadmap #1930

### Related issue(s)

closes #1751 

## 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: Alexander Graf <ghostwheel42@users.noreply.github.com>
2021-09-22 09:01:37 +00:00