Commit Graph
100 Commits
Author SHA1 Message Date
Dimitri Huisman a2c811d28a Prevent creation of unknown/unknown arch.
Set more forgiving timeouts for scenario where image is build without cache.
Set better readable tags.
2023-03-23 07:03:24 +00:00
Dimitri Huisman 1d2053204a Also forgot the --push argument. 2023-03-21 15:22:45 +00:00
Dimitri Huisman 64a132fdd9 Forgot to change the target. 2023-03-21 15:12:43 +00:00
Dimitri Huisman 5bd528319b Provide a changelog for minor releases. The github release will now:
* Provide the changelog message from the newsfragment of the PR that triggered the backport.
* Provide a github link to the PR/issue of the PR that was backported.

Switch to building multi-arch images. The images build for pull requests, master and production
are now multi-arch images for the architectures:
* linux/amd64
* linux/arm64/v8
* linux/arm/v7

Enhance CI/CD workflow with retry functionality. All steps for building images are now automatically
retried. If a build temporarily fails due to a network error, the retried step will still succeed.
2023-03-21 14:47:37 +00:00
Dimitri Huisman ee1f0f94a3 Don't use the header when we don't need it. 2023-03-18 09:17:21 +00:00
Dimitri Huisman f20208fb4b Fix error in check for proxy scenario 2023-03-18 09:05:18 +00:00
Dimitri Huisman 4912fa1dff Fix a typo. 2023-03-18 08:55:32 +00:00
Dimitri Huisman 20bf0e8a65 Add fix for wrong redirect in proxy scenario and accessing WEBROOT_REDIRECT 2023-03-18 08:40:45 +00:00
Dimitri Huisman 29bfc9dd9d Add fallback just in case X-Forwarded-By is empty. 2023-03-18 08:16:30 +00:00
Dimitri Huisman 25b9db4b00 Proxy endpoint was checking real client ip instead of proxy ip
for validating PROXY_AUTH_WHITELIST
2023-03-18 08:14:46 +00:00
Dimitri Huisman 0d048d24d3 Fix build.hcl / CI.yml regarding labels
The version label and versions passed to docs image were based on
the tag. Now we first build the images with -build appended to the
tag, we cannot use the tag as version label.

A new env var is introduced to pass the version to the build.hcl file.
This will be used to set the VERSION label in the image, and pass
as build arguments to the docs image.
2023-03-17 13:05:33 +00:00
Dimitri Huisman 06ac7f507d Add changelog entry. 2023-03-16 18:27:20 +00:00
Dimitri Huisman 120cd34989 Switch the container registry used for deploying images from docker
to ghcr.io (github). Images are now first build with '-build'
appended to the tag. E.g. ghcr.io/mailu/admin:master-build.
This is to prevent the image being available before automatic testing has completed.
In the deploy job, the final image is pushed (this still works the same).

Update setup & documentation for switch to ghcr.io
2023-03-16 17:38:25 +00:00
Dimitri Huisman b99828c4f6 Fix broken link. Add extra clarification for login targets. 2023-03-15 16:04:30 +00:00
Dimitri Huisman 17c68ca86e Add changelog entry for PR2676 2023-03-12 16:01:35 +00:00
Dimitri Huisman 45177bd25a bring back removed blank lines 2023-03-09 08:30:58 +00:00
Dimitri Huisman 7ce28bd6e9 Fix some small errors 2023-03-09 08:28:18 +00:00
Dimitri Huisman 8861ce6edb Change rspamd override system to use include with lowest priority.
All override files are used as if they were placed in the rspamd
local.d folder.

From the newsfragment:
New override system for Rspamd. In the old system, all files were placed in the Rspamd overrides folder.
These overrides would override everything, including the Mailu Rspamd config.

Now overrides are placed in /overrides.
If you use your own map files, change the location to /override/myMapFile.map in the corresponding conf file.
It works as following.
* If the override file overrides a Mailu defined config file,
  it will be included in the Mailu config file with lowest priority.
  It will merge with existing sections.
* If the override file does not override a Mailu defined config file,
  then the file will be placed in the rspamd local.d folder.
  It will merge with existing sections.

For more information, see the description of the local.d folder on the rspamd website:
https://www.rspamd.com/doc/faq.html#what-are-the-locald-and-overrided-directories
2023-03-09 08:21:45 +00:00
Dimitri Huisman 9dffa11f0f Update documentation on how to delete disabled users 2023-02-14 10:00:55 +00:00
Dimitri Huisman 44ad14811d Missed some IF statements that must be modified for normalized config. 2023-02-01 11:12:05 +00:00
Dimitri Huisman d9a6777d9d Forgot to adapt some IF statements. All config is normalized now for front.
So true/false now matches the boolean value True/False.
Instead if {% IF X == 'true' %} we should now use {% IF X %}
2023-02-01 08:51:53 +00:00
Dimitri Huisman 7bcac3bbaa Get the value from the correct dict (args) 2023-01-31 17:26:32 +00:00
Dimitri Huisman 75afe1092d Use server-side password generator for generating token.
Fix setup correctly writing the value for API to mailu.env
Normalize env vars for front container.
Update reverse proxy with API information.
2023-01-31 12:37:25 +00:00
Dimitri Huisman 2ccdfb9a6b Update demo docs with new capabilities 2023-01-31 08:27:24 +00:00
Dimitri Huisman 0673d32306 Fix setup utility setting correct value to env var API
Fix IF statement for enabling API in nginx.conf
Use safer command for regenerating example API token.
2023-01-30 13:16:07 +00:00
Dimitri Huisman 8cb7265eb2 By default disable the API in the setup utility.
Generate a sample token value for API_TOKEN.
Fix small rendering issue when API was disabled in setup.
2023-01-27 13:17:36 +00:00
Dimitri Huisman 18b900699c Bump version of Flask-RESTX to 1.0.5.
This resolves all deprecation warnings caused by Flask-RESTX.
2023-01-25 16:12:14 +00:00
Dimitri Huisman d6e7314f05 Make API configurable via the setup utility
Fix some small bugs in the setup utility
Improve documentation on the API.
2023-01-25 15:30:25 +00:00
Dimitri Huisman b0569035ae Change PUT method to PATCH method.
This better reflects what the interface does.
2023-01-12 10:55:49 +00:00
Dimitri Huisman bcceac359d Merge branch 'apiv1' of https://github.com/ghostwheel42/Mailu into feature-445-restful-api-ghostwheel 2023-01-05 10:18:02 +00:00
Dimitri Huisman 3cb8358090 Process review comments PR#2464
- When visiting root of WEB_API, the swaggerui is shown
- simplify the condition for endpoint WEB_API
2022-12-27 11:32:58 +01:00
Dimitri Huisman 39b0d44079 Use first() instead of all() for better performance
Actually return all data for Get user
Remove non-used code
2022-12-27 11:32:57 +01:00
Dimitri Huisman f9b26bd934 Update User with newly introduced allow spoofing field 2022-12-27 11:32:57 +01:00
Dimitri Huisman 6347c18f8a Process review comments (PR2464) 2022-12-27 11:32:57 +01:00
Dimitri Huisman 61d092922c Process review comments (PR2464) 2022-12-27 11:32:57 +01:00
Dimitri Huisman afb224e796 Update password hash description for user API endpoint 2022-12-27 11:32:57 +01:00
Dimitri Huisman d4e5db5084 Remove unneeded comment 2022-12-27 11:32:56 +01:00
Dimitri Huisman 46d07ec236 Fix syntax styling api documentation. 2022-12-27 11:32:56 +01:00
Dimitri Huisman 67c423d61f Add URL for accessing swaggerui to documentation 2022-12-27 11:32:56 +01:00
Dimitri Huisman 7a36f6bbb9 Use hmac.compare_digest to prevent timing attacks. 2022-12-27 11:32:56 +01:00
Dimitri Huisman 5c9cdfe1de Introduction of the Mailu RESTful API.
Anything that can be configured in the web administration interface,
can also be configured via the Mailu RESTful API.
See the section Advanced configuration in the configuration reference
for the relevant settings in mailu.env for enabling the API.
(API, WEB_API, API_TOKEN).
2022-12-27 11:32:54 +01:00
Dimitri Huisman 6d87fa423c Mention you must restart rspamd for the changes to take effect. 2022-12-22 16:01:30 +00:00
Dimitri Huisman 33497c8e31 Small extra clarification for new documentation 2022-12-22 15:50:42 +00:00
Dimitri Huisman 8afb544a10 Default FETCHMAIL_ENABLED to False 2022-11-16 12:12:04 +00: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
Dimitri Huisman 2a3266b6b8 Forgot to update both deploy jobs 2022-11-04 14:13:06 +01:00
Dimitri Huisman b2e47642f7 Tag the images with latest tag as well. 2022-11-04 13:49:05 +01:00
Dimitri Huisman db7ce8c83e Login docker.io to prevent rate limiting for pulling images 2022-11-01 15:18:03 +00:00
Dimitri Huisman b3151e9904 Actually push the build arm images to ghcr.io 2022-11-01 14:36:17 +00:00
Dimitri Huisman 6549dbf247 Sigh. needs.* context is only available if you include it in needs: 2022-11-01 10:56:33 +00:00
Dimitri Huisman c7cba1b075 Finishing touches for fixing arm builds
- Use self-hosted runners for arm base image
- Use seperate docker image cache for arm build
- Remove unneeded needs items.
2022-11-01 10:49:44 +00:00
Dimitri Huisman e915e444e9 Remove superfluous cache export entry for arm 2022-11-01 09:38:14 +00:00
Dimitri Huisman 06b784da57 Shorten default function by using lambda 2022-10-29 08:57:48 +00:00
Dimitri Huisman 4be0cbf4da Switch workflow to ghcr.io
- Build images & build cache are pushed to ghcr.io.
- Tests will make use of the images pushed to ghcr.io.
- Deploy step only copies images from ghcr.io to docker.io.
- Resolves strange build errors tied to buildx+intermediate builds
- Results in quicker build times.
2022-10-28 11:52:49 +00:00
Dimitri Huisman 6ea2d84a3c Remove outdated wrong documentation 2022-10-19 14:55:22 +00:00
Dimitri Huisman 451738e32b We want the function result. Not the function statement. 2022-10-19 11:35:57 +00:00
Dimitri Huisman f9ba0e688f Removed syntax error 2022-10-19 11:25:42 +00:00
Dimitri Huisman 92cb8c146b Refine build_test_deploy.yml:
Build base image before the other images.
Change cache key to make it is re-used for all builds. This is not
dangerous. The docker build process can determine itself whether
a cache can be safely re-used or not.
2022-10-19 11:02:22 +00:00
Dimitri Huisman 5b21fae968 Add missing Dutch translation 2022-10-05 07:22:42 +00:00
Dimitri Huisman 22fe65e4d8 Use RUNNER_TEMP for storing cache files. 2022-09-01 12:39:23 +00:00
Dimitri Huisman d76d3b4959 Switch to ARM64 self-hosted for ARM build 2022-08-31 18:17:45 +00:00
Dimitri Huisman 5732b2316f Switch to local build cache, cached via actions/cache@v3
The previous method of using gha cache via buildx proved to be
unreliable. Using local cache via actions/cache@v3 is much more
reliable.
The build job will re-use cache from previous workflow runs.
The total workflow time is still similar ~12 minutes.
2022-08-23 21:09:03 +00:00
Dimitri Huisman 312a733ae3 prefix the cache key with a hash (to help with sharding) 2022-08-20 09:18:54 +00:00
Dimitri Huisman f35d82b3a0 Also ${{ github.run_id }} for cache key.
This makes rue that the cache key is unique across workflow runs
2022-08-20 08:51:56 +00:00
Dimitri Huisman d56eb16f52 Hotfix for workflow. For build step do not build from cache.
Make sure cache layers are unique by using ${{ github.ref }}
2022-08-20 08:43:27 +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
Dimitri Huisman 3493e9ffa9 Doh! 2022-08-19 20:32:53 +00:00
Dimitri Huisman 867c71ca83 Fix date (deadline) calculation and comparison in test.py 2022-08-19 20:24:07 +00:00
Dimitri Huisman 9339ce78e8 Fix datetime usage in test.py 2022-08-19 18:57:58 +00: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
Dimitri Huisman a54baeff00 Fixed error in reverse.rst and remove unneeded example block. 2022-08-05 15:42:37 +00:00
Dimitri Huisman aae10e856b Add newsfragment for bugfix for issue 2139 2022-08-05 13:42:42 +00:00
Dimitri Huisman 10c02c0a32 Fix error in reverse proxy example for how to include nginx override.
Also clarified where the file is included in the nginx configuration file.
2022-08-05 13:39:12 +00:00
Dimitri Huisman bfbdfbe312 Remove the misleading text in mailu.env that zstd and lz4 are supported for dovecot mail compression.
Zstd and lz4 are not supported. The reason is that the alpine project does not compile this
into the dovecot package.
Users who want this funcionality, can kindly request the alpine project to compile dovecot
with lz4&zstd support.
2022-08-05 13:19:31 +00:00
Dimitri Huisman 28e409f5ea Fix small typo in config-import example template 2022-08-05 07:17:45 +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 ae18217e07 Fix adding -arm tag correctly to PINNED_MAILU_VERSION in arm.yml. 2022-08-03 13:15:32 +00:00
Dimitri Huisman 4bb0bd8fb2 Forgot to update snappymail test 2022-08-03 11:45:01 +00:00
Dimitri Huisman 7e21ab4007 Merge master cont'd 2022-08-03 09:48:54 +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
Dimitri Huisman 2a527a38cf Deny access to hidden files for snappymail 2022-07-15 14:34:39 +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
Dimitri Huisman 9d0c49a844 Merge branch 'feature-switch-snappymail' of github.com:Diman0/Mailu into feature-switch-snappymail 2022-07-06 13:28:55 +00:00
Dimitri Huisman d19208d3d1 Merge branch 'master' of github.com:Mailu/Mailu into feature-switch-snappymail 2022-07-06 12:35:21 +00:00
Dimitri Huisman 4b491d9de5 Re-enable the built-in nginx resolver for traffic going through the mail plugin.
This is required for passing rDNS/ptr information to postfix.
The mail proxy uses the resolver info for passing XCLIENT info.
See http://nginx.org/en/docs/mail/ngx_mail_proxy_module.html#xclient
Without this info rspamd will flag all messages with DHFILTER_HOSTNAME_UNKNOWN due to the missing rDNS/ptr info.
2022-07-06 08:51:59 +00:00
Dimitri Huisman 5ef383f572 Set language to English for sphinx in conf.py.
The docs have always been generated with the option to treat
warnings as errors. Recently sphinx-build reports using
language=None as a warning. It is expected that a specific
language is set.
2022-06-07 11:20:07 +00:00
Dimitri Huisman dc7613b34a Fix healthcheck 2022-03-22 16:01:26 +00:00
Dimitri Huisman af1cba2b30 Add changelog 2022-03-22 14:34:30 +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
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
Dimitri Huisman dfd5e441bd Fix resolver warning message not being displayed in setup. 2022-02-23 10:41:08 +00:00
Dimitri Huisman 874a0ad24c Fix broken setup. Not all dependencies were pinned. As usual a dependency had a breaking update. 2022-02-18 21:06:53 +00:00
Dimitri Huisman 731a3741ca Update overrides faq for include roundcube 2022-02-17 14:28:41 +00:00