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

269 Commits

Author SHA1 Message Date
Florent Daigniere
63a12d9857 changes requested by ghost 2022-11-24 10:00:00 +01:00
Florent Daigniere
9fa3a3e0c7 doc 2022-11-22 10:17:10 +01:00
Florent Daigniere
9e61a33cb2 Merge branch 'master' of https://github.com/Mailu/Mailu into webmail-hardening 2022-11-22 10:03:38 +01:00
Florent Daigniere
ab852772f9 Bump snappymail to 2.21.3 2022-11-21 16:04:00 +01:00
Florent Daigniere
28d720bbc9 As requested 2022-11-21 14:54:36 +01:00
Florent Daigniere
840b2bd9df block o:0:{} too 2022-11-18 16:00:31 +01:00
Florent Daigniere
017ea5298e typo 2022-11-18 15:52:56 +01:00
Florent Daigniere
2a4f6836cf protect unserialize() 2022-11-18 15:39:32 +01:00
Florent Daigniere
e5ab9821f9 Add snuffleupagus
This seems to work in my limited testing.
2022-11-18 13:25:02 +01:00
Florent Daigniere
56a106ad60 Only one labs section in the conf file 2022-11-13 15:25:46 +01:00
Florent Daigniere
071ad15a97 Better snappymail defaults 2022-11-13 14:34:25 +01:00
Florent Daigniere
6b2cb95a7d This is not required anymore 2022-11-13 14:17:37 +01:00
Florent Daigniere
a508eeaafb Use /dev/shm for tmp 2022-11-13 14:16:44 +01:00
Florent Daigniere
f2f430af5d Redirect the logs where they belong 2022-11-13 14:07:40 +01:00
Florent Daigniere
06c0c78956 Hardening: run the http and php as different users 2022-11-13 13:44:35 +01:00
Florent Daigniere
7ebac75045 fix tests 2022-11-12 16:11:38 +01:00
Florent Daigniere
f3a91d1a18 enable APCu 2022-11-12 16:00:55 +01:00
Florent Daigniere
225322fe88 More hardening 2022-11-12 15:34:43 +01:00
Florent Daigniere
ad17b10c8e redirects should be HTTP/302 2022-11-12 15:31:47 +01:00
Florent Daigniere
1379a58352 Basic hardening 2022-11-12 14:50:30 +01:00
Florent Daigniere
7e722cd0c3 fix #2250: ensure rainloop uses _ADDRESS 2022-11-12 14:10:50 +01:00
Florent Daigniere
224f2f4508 This isn't used anymore
The healthcheck is now done by fpm
2022-11-12 14:01:01 +01:00
Florent Daigniere
a8d405cb48 Verify the gpg signature of webmails 2022-11-12 12:25:03 +01:00
Florent Daigniere
1edef755f1 Fix bug #2466 2022-11-12 11:40:23 +01:00
Florent Daigniere
dc9e2a3e70 Upgrade Snappymail to 2.21 and merge the webmail containers 2022-11-12 11:34:58 +01:00
Dimitri Huisman
0e5443a867
Update php8 to php81. Update snappymail to 2.19.4 2022-11-11 12:08:27 +00:00
Dimitri Huisman
59c5b152b2
Switch to using set -euxo pipefail for better error handling
-e immediately exit when a command fails. No further commands are processed.
-o pipefail, if a series of piped commands fail, do NOt return the last commands returncode, but DO return the return code of the failing command in the pipeline series
-u, raise an error when an unset variable is used. Not using this results in an empty value being used and the script being executed differently without you knowing why.
-x, print each command before executing it. Actual arguments are expanded. So you see the command with the actual parameter values. This is printed in red in the buildx log output.
2022-11-11 09:10:45 +01:00
Dimitri Huisman
f6cdfb3392
Allow Healthcheck requests over IPv6 2022-11-11 08:40:07 +01:00
Dimitri Huisman
2a894cb15d
Process nextgens review remarks 2022-11-10 20:03:26 +01:00
Dimitri Huisman
92f270c94e
Update the webmail images:
Roundcube
  - Switch to base image (alpine)
  - Switch to php-fpm
SnappyMail
  - Switch to base image
  - Upgrade php7 to php8.
2022-11-10 15:51:22 +00:00
Vincent Kling
23d06a5761 Fix a bunch of typos 2022-10-19 19:41:49 +02:00
bors[bot]
04a932bf66
Merge #2423
2423: Correct the extension of files used for Roundcube overrides r=mergify[bot] a=DannyDaemonic

This adds ".inc.php" files to the included overrides while maintaining support for existing ".inc" files previously included via overrides. It also updates the corresponding documentation.

Roundcube itself uses "inc.php" files and these overrides are expected to match that format. Switching to "inc.php" both tells the user that these need to be proper php files and conveys they are used for changing the same settings that Roundcube's inc.php files modify.

## What type of PR?

bug-fix, documentation

## What does this PR do?

- Adds ".inc.php" to the list of include files being built in roundcube's start.py
- Updates override information in the faq section: [How can I override settings?](https://github.com/Mailu/Mailu/blob/master/docs/faq.rst#how-can-i-override-settings)
- Includes changelog recommends using .inc.php moving forward

## Related issue(s)
- This addresses confusion seen in issues like: #2388

## 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: Danny Daemonic <DannyDaemonic@gmail.com>
2022-08-20 15:56:04 +00:00
Dimitri Huisman
dd3f1a3376 Switch to mode=min for GHA cache for docker buildx to prevent ratelimiting in GHA workflow 2022-08-20 07:49:36 +00:00
Danny Daemonic
3eeb7962c2 Correct the extension used for Roundcube overrides
This adds ".inc.php" files to the included overrides while maintaining
support for existing ".inc" files previously included via overrides.

Roundcube itself uses "inc.php" files and these overrides are expected
to match that format. Switching to "inc.php" both tells the user that
these need to be proper php files and conveys they are used for changing
the same settings that Roundcube's inc.php files modify.
2022-08-19 15:56:02 -07: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
Will
72a5bbf53d Update roundcube to 1.5.3 and rcmcarddav plugin 2022-08-14 21:01:56 +00:00
Dimitri Huisman
3aafecafe7 Merge branch 'master' into feat-switch-buildx 2022-08-03 09:45: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
bors[bot]
238daef6d8
Merge #2295
2295: Switch from Rainloop to SnappyMail r=mergify[bot] a=Diman0

## What type of PR?

Feature

## What does this PR do?
As discussed in the project meeting (#1582), we decided we want to switch from Rainloop to an alternative. Rainloop has multiple open security issues which were not patched for a long time. 

We decided to switch to SnappyMail because it is more secure and based on RainLoop. This means that users using RainLoop will still have a webmail that looks familiar for them.

This PR replaces RainLoop with SnappyMail.

### Related issue(s)
- #2215 
- #1582

## 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>
Co-authored-by: Florent Daigniere <nextgens@users.noreply.github.com>
2022-07-28 16:14:19 +00:00
Dimitri Huisman
2a527a38cf Deny access to hidden files for snappymail 2022-07-15 14:34:39 +00:00
bors[bot]
e50f6c58c0
Merge #2360
2360: roundcube: disable apache2 access log r=mergify[bot] a=pommi

## What type of PR?

bug-fix

## What does this PR do?

It disables the access log of apache2 in the roundcube webmail container. Requests are already logged by the front container. The requests logged in the roundcube container contained contained the wrong client IP: the IP address of the front container.

----

Original PR:

~~Roundcube webmail is accessed through the nginx reverse proxy in the front container. Each access logline logged by apache2 in the roundcube container did not contain the actual client IP address, but the IP address of the front container, for example:~~

```
192.168.203.3 - - [28/May/2022:12:33:52 +0000] "POST /?_task=mail&_action=refresh HTTP/1.1" 200 677 "https://[REDACTED]/roundcube/?_task=mail&_mbox=INBOX" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0"
^
IP address of the front container
```

~~By enabling the apache2 remoteip module and configuring it to get the actual client IP address from the X-Forwarded-For header, it logs the correct client IP address to the access log.~~

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

**No changelog or documentation necessary for this minor change.**


Co-authored-by: Pim van den Berg <pim@nethuis.nl>
2022-07-07 09:18:58 +00:00
Dimitri Huisman
ee78a34da4 Process code review feedback
Remove unneeded IF statement in /admin block in nginx.conf of front.
Fix contributions made to Dockerfile, add missing trailing \ and add back curl
Change healthcheck to monitoring page of fpm. Now we check nginx and fpm.
2022-07-06 13:42:13 +00:00
Pim van den Berg
6f884c6c93 roundcube: disable access log
As per discussion in #2360: The front container (nginx reverse proxy) is
already logging all requests, disable the access logs for apache2 in the
roundcube container completely.
2022-06-16 14:26:27 +02:00
Eddy Vervest
baea3d4086
Update Dockerfile
missed this one
2022-05-30 19:18:35 +02:00
Eddy Vervest
c4c442d000
Update Dockerfile
apt is intended for interactive usage, for scripts use apt-get (https://manpages.debian.org/bullseye/apt/apt.8.en.html) to avoid warnings.
2022-05-30 18:38:32 +02:00
Pim van den Berg
e8b7d6afed roundcube: log actual client ip by using apache2 remoteip
Roundcube webmail is accessed through the nginx reverse proxy in the
front container. Each access logline logged by apache2 in the roundcube
container did not contain the actual client IP address, but the IP
address of the front container, for example:

> 192.168.203.3 - - [28/May/2022:12:33:52 +0000] "POST /?_task=mail&_action=refresh HTTP/1.1" 200 677 "https://[REDACTED]/roundcube/?_task=mail&_mbox=INBOX" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0"
  ^
  IP address of the front container

By enabling the apache2 remoteip module and configuring it to get the
actual client IP address from the X-Forwarded-For header, it logs the
correct client IP address to the access log.
2022-05-28 15:02:47 +02:00
Florent Daigniere
c5c2ee9f1c
simplify 2022-05-22 18:02:13 +02:00
Dimitri Huisman
dc7613b34a Fix healthcheck 2022-03-22 16:01:26 +00:00
Dimitri Huisman
22010ddb4f fix applications.ini 2022-03-22 09:18:51 +00:00
Dimitri Huisman
f2f859280c Merge remote-tracking branch 'origin/master' into feature-switch-snappymail 2022-03-22 09:14:53 +00:00
Dimitri Huisman
9519d07ba2 Switch from RainLoop to SnappyMail 2022-03-22 09:04:56 +00:00
the-djmaze
a3c01a2bbf
Update application.ini
`contacts_autosave` is part of `[defaults]`, not `[plugins]`
2022-03-11 12:26:13 +01:00
bors[bot]
bcecbda9de
Merge #2195
2195: roundcube: Add /overrides directory in include r=mergify[bot] a=mnival

Added the /overrides directory in the roundcube config.inc.php file

## What type of PR?

bug-fix

## What does this PR do?

### Related issue(s)
none

Co-authored-by: mnival <1595998+mnival@users.noreply.github.com>
Co-authored-by: Dimitri Huisman <diman@huisman.xyz>
2022-02-18 10:42:17 +00:00
bors[bot]
b73963aae5
Merge #2207
2207: Update webmail container configuration to support MESSAGE_SIZE_LIMIT r=mergify[bot] a=marioja

## What type of PR?

bug-fix

## What does this PR do?

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

## 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: Mario Jauvin <marioja@users.noreply.github.com>
2022-02-17 14:04:59 +00:00
Mario Jauvin
490e27e229 Start fastcgi process manager after config files updated 2022-02-13 20:40:08 -05:00
bors[bot]
6d348b1650
Merge #2196
2196: roundcube-carddav : Use des_key for pwstore_scheme  r=nextgens a=mnival

roundcube-carddav: Configuring pwstore_scheme in carddav plugin with des_key because Mailu is incompatible with encrypted

https://github.com/mstilkerich/rcmcarddav/blob/master/doc/ADMIN-SETTINGS.md#password-storing-scheme

## What type of PR?

bug-fix

## What does this PR do?

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

Co-authored-by: mnival <1595998+mnival@users.noreply.github.com>
2022-02-13 15:56:38 +00:00
Mario Jauvin
e47d9bf9be Revert "Set client_max_body_size in default nginx config file"
This reverts commit db39d6b1e2.
2022-01-31 21:44:59 -05:00
Mario Jauvin
db39d6b1e2 Set client_max_body_size in default nginx config file 2022-01-31 16:37:23 -05:00
Mario Jauvin
53a8543772 update permission 2022-01-31 13:59:08 -05:00
Mario Jauvin
5a909bd45d Add config.py and set permissions 2022-01-31 13:53:40 -05:00
Mario Jauvin
7dc9802447 Added subprocess import 2022-01-31 12:19:15 -05:00
Mario Jauvin
a9f4fc1b3c Use MESSAGE_SIZE_LIMIT in webmail container also
The webmail container should use the same value as the front container.
2022-01-31 11:40:33 -05:00
mnival
5695bbb0f6 Configuring pwstore_scheme in carddav plugin with des_key because Mailu is incompatible with encrypted 2022-01-28 22:03:18 +01:00
Eric
d9ea9f7009
Update php.ini
matching rainloop php to roundcube's: timezone is a parameter in mailu.env
2022-01-28 10:45:39 -07:00
mnival
4b9781210f Add /overrides directory in include 2022-01-28 16:02:27 +01:00
Alexander Graf
37855153b8
fixed plugin path 2022-01-17 18:12:53 +01:00
willofr
93a94d33ce
update roundcube to 1.5.2 (security fix)
New roundcube release (1.5.2) where a XSS is addressed: https://roundcube.net/news/2021/12/30/update-1.5.2-released
2022-01-05 11:17:31 +01:00
bkraul
d494dd7d2a Fixes #2131 2022-01-03 07:56:52 -06:00
Dimitri Huisman
b248026933 Fix #2117. Gpg-agent package was missing for roundcube image. 2022-01-01 10:51:11 +00:00
Florent Daigniere
6d5926ef29 prettify 2021-12-21 16:06:34 +01:00
Dimitri Huisman
385cb28bf2 Correctly calculate and set SESSION_TIMEOUT in roundcube 2021-12-20 22:13:18 +00:00
Dimitri Huisman
ab80316df6 Fix error in roundcube config 2021-12-20 21:24:03 +00:00
Florent Daigniere
3a46ee073c Make roundcube use SESSION_TIMEOUT 2021-12-20 11:36:56 +01:00
Alexander Graf
1a41657f90
add documentation, allow overrides, clean plugins 2021-12-18 17:43:21 +01:00
Alexander Graf
b3d48cc20f
fixed health check 2021-12-18 16:43:18 +01:00
Alexander Graf
e7e283663d
Merge remote-tracking branch 'upstream/master' into update_roundcube 2021-12-17 22:23:08 +01:00
Alexander Graf
64acfacc73
duh. typo 2021-12-17 15:55:16 +01:00
Alexander Graf
547ad253e1
added plugin selection, derive key, clean env 2021-12-17 15:54:05 +01:00
Alexander Graf
7c2c2dc65a
updated to carddav 4.3.0 2021-11-30 17:18:59 +01:00
Alexander Graf
1ebdb26979
updated to rc 1.5.1 2021-11-29 14:21:26 +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
423b8a6b9b
Merge branch 'master' into update_roundcube 2021-11-07 21:35:53 +01:00
DjVinnii
a6beb234ff Set timezone in roundcube.ini 2021-11-04 16:17:11 +01:00
DjVinnii
225160610b Set default TZ in Dockerfiles 2021-11-04 14:22:12 +01:00
Alexander Graf
6003e11533 duh. add timezone (again) 2021-11-03 19:32:31 +01:00
Alexander Graf
949efcf537 prevent endless redirect loop on nginx failure 2021-11-03 19:16:37 +01:00
Alexander Graf
c89045ed03 duh 2021-11-03 15:20:30 +01:00
Alexander Graf
920ac4cd21 updated to php8. fixed login. fixed max_filesize. 2021-11-03 15:18:00 +01:00
Alexander Graf
46d27e48ff Merge remote-tracking branch 'upstream/master' into update_roundcube 2021-11-03 13:57:06 +01:00
DjVinnii
a1f0c20583 Add tzdata to webmails 2021-11-02 15:32:27 +01:00
Alexander Graf
ee45475567 updated roundcube. added cleanup run at startup 2021-11-02 12:21:40 +01:00
Dimitri Huisman
5232bd38fd Simplify webmail logout. 2021-10-26 12:07:36 +00:00
Dimitri Huisman
44d2448412 Updated SSO logic for webmails. Fixed small bug rate limiting. 2021-10-25 19:21:38 +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
16691e83ad re-enable mod_rewrite in roundcube
moved chown/mkdir/symlink from start.py to Dockerfile
2021-09-24 18:15:00 +02:00
Diman0
7083b3f7c6 Fix roundcube sso header issue
Removed apache rewrite module.
2021-09-24 12:10:21 +02:00
Alexander Graf
6c510e2e86 enabled caching via .htaccess 2021-09-06 13:48:13 +02:00