Commit Graph

92 Commits (0c82caf817626ee0eca22e99efd962ca90ccadb5)

Author SHA1 Message Date
bors[bot] b668eccc17
Merge
1181: Update to address issue  (HTTP headers) r=muhlemmer a=bladeswords

This change should remove the duplicate `x-xss-protection` header and also the `x-powered-by` header.  Hopefully a pull request to main is appropriate, but may be worth back porting to 1.7.

Tested config by modifying live 1.7 nginx config and reloading.  Has had the desired outcome of removing the headers.

```/etc/nginx # nginx -t -c /etc/nginx/nginx.conf 
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
/etc/nginx # nginx -s reload
```

These steps were based on:
- https://serverfault.com/questions/928912/how-do-i-remove-a-server-added-header-from-proxied-location
- https://serverfault.com/questions/929571/overwrite-http-headers-comming-back-from-a-web-application-server-proxied-in-ngi
- http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_hide_header

## What type of PR?

Enhancement

## What does this PR do?
Removes duplicate and unneeded headers.  See issue  

### Related issue(s)
- issue:  

## 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/guide.html#changelog) entry file.


Co-authored-by: bladeswords <bladeswords@users.noreply.github.com>
Michael Wyraz c20976f071 Allow smtp auth login for TLS port (similar to SSL port)
bors[bot] 20e00ac0c4
Merge
1158: Use nginx for kubernetes ingress r=kaiyou a=micw

## What type of PR?

enhancement

## What does this PR do?

Currently, kubernetes uses a complex ingress setting which is not portable across different ingress controllers. This PR simplifies the ingress and delegates everythins special to Mailu to the front container,

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

## Prerequistes

- [x] In case of feature or enhancement: documentation updated accordingly
- [x] Unless it's docs or a minor change: add [changelog]

Co-authored-by: Michael Wyraz <michael@wyraz.de>
bladeswords b13d143b34
Update to address issue (HTTP headers)
This change should remove the duplicate `x-xss-protection` header and also the `x-powered-by` header.  Hopefully a pull request to main is appropriate, but may be worth back porting to 1.7.

Tested config by modifying live 1.7 nginx config and reloading.  Has had the desired outcome of removing the headers.

```/etc/nginx # nginx -t -c /etc/nginx/nginx.conf 
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
/etc/nginx # nginx -s reload
```

These steps were based on:
- https://serverfault.com/questions/928912/how-do-i-remove-a-server-added-header-from-proxied-location
- https://serverfault.com/questions/929571/overwrite-http-headers-comming-back-from-a-web-application-server-proxied-in-ngi
- http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_hide_header
bors[bot] e46153c0b1
Merge
1114: Resolve HOST to ADDRESS only if ADDRESS is not already set r=mergify[bot] a=micw

## What type of PR?

bug-fix

## What does this PR do?

~Makes the rsolving from hosts to ips at startup configurable~

I rewrote the pull request after  was merged. Now it resolves HOSTs to ADDRESSes only of ADDRESSes are not already set. So on kubernetes we can jsut set the address and have working service discovery.

### Related issue(s)
- closes 

## Prerequistes

~Minor change, backward compatible~
Changelog will be added

Co-authored-by: Michael Wyraz <michael@wyraz.de>
Thomas Sänger 5fa87fbdf7
front: advertise real capabilites of mail-backends
Michael Wyraz 92645bcd4a Use nginx for kubernetes ingress
Michael Wyraz de2f166bd1 Resolve HOST_* to *_ADDRESS only if *_ADDRESS is not already set
kaiyou 4afbc09d6e Remove unnecessary host variable assignments
Tim Möhlmann ed0fb77a01
Catch empty WEBMAIL and WEBDAV address
Ionut Filip 075417bf90 Merged master and fixed conflicts
hoellen 9de5dc2592 Use python package socrate instead of Mailustart
Dario Ernst 1dbda71401 Adapt shared layer conf to now really-missing mailustart in admin (after merging webpack)
Dario Ernst 0306be1eed Re-add missing MailuStar in admin
It turns out we were all blind and admin *does* use MailuStart
Dario Ernst ce0c24e076 Merge branch 'master' into HorayNarea-feat-upgrade-alpine
Dario Ernst 53f754f5ac Remove MailuStart from admin and correct layer-sharing comments
Thomas Sänger 2c7d1d2f71
use HTTP/1.1 for proxyied connections
Dario Ernst bb2edb6eb6 Revert "Move alpine version definition out to variable"
This reverts commit c787e4bdbd.
Dario Ernst c787e4bdbd Move alpine version definition out to variable
Dario Ernst a253ca47fe Use official Mailu/MailuStart
Dario Ernst d1f80cca99 Update Dockerfiles to most recent alpine 3.10
Thomas Sänger ef3c6c407a upgrade alpine base-image
Ionut Filip 4c25c83419 HOST_* and *_ADDRESS variables cleanup
Abel Alfonso Fírvida Donéstevez 39444c794e Install bash in alpine based images.
This fix https://github.com/Mailu/Mailu/issues/918

Bash shell is used by default in Kubernetes' dashboard console, which is very
useful for admins.
Ionut Filip f8dffe5a19
Resolve hosts in admin
Ionut Filip 004a431e97
Change to mailustart functions
Tim Möhlmann 049ca9941f
Cleanup syntax and fix typo
Tim Möhlmann 71cda7983e
Merge branch 'master' into feat-logging
Tim Möhlmann 7d01bb2a4d
LOG_LEVEL docs and changelog entry
Tim Möhlmann b04a9d1c28
Implement debug logging for template rendering
Tim Möhlmann 5636e7f5a7
Remove to avoid matching webroot
Tim Möhlmann 4f93e09028
Implement favicon package
Credit to:
- https://stackoverflow.com/a/19590415/1816774
- https://realfavicongenerator.net/
Tim Möhlmann 24828615cf
Webmail on root, fixes
Tim Möhlmann c7dcfee882
Merge pull request from pgeorgi/extend-nginx
nginx: Allow extending config with overrides
Tim Möhlmann 6ca8ed437d
Merge pull request from Nebukadneza/add_front_certificate_reload
Add certificate watcher for external certs to reload nginx
Dario Ernst 1aa97c9914 Add certificate watcher for external certs to reload nginx
In case of TLS_FLAVOR=[mail,cert], the user supplies their own certificates.
However, since nginx is not aware of changes to these files, it cannot
reload itself e.g. when the certs get renewed.

To solve this, let’s add a small daemon in the place of
`letsencrypt.py`, which uses a flexible file-watching framework and
reloads nginx in the case the certificates change ….
Tim Möhlmann c00910ca4b
Merge remote-tracking branch 'upstream/master' into extend-nginx
Tim Möhlmann 97d338e68a
Rectify 'endif' placement
Tim Möhlmann 425cdd5e77
Fix syntax errors
Tim Möhlmann 20f1faf6d0
Send 404 when nothing server at '/'
Prevents Nginx welcome screen
Tim Möhlmann 2de4995fec
Don't redirect when webmail is served on '/'
Tim Möhlmann 9dd447e23b
Add login method to smtp_auth under ssl
Fixes 
Patrick Georgi eac4d553a9 nginx: Allow extending config with overrides
To facilitate this, the default redirect at / can be disabled, even if
the default remains at redirecting to the webmailer.

The extensions are within the host scope and are read from
$ROOT/overrides/nginx/*.conf.
Tim Möhlmann 42e2dbe35d
Standarize image by using shared / similair layers
Thomas Sänger 603b6e7390
Merge pull request from usrpro/fix-nginx-healthcheck
Fix nginx healthcheck
Tim Möhlmann 81b24f61e8
Merge branch 'master' into feat-healthchecks
Tim Möhlmann c3e89967fb
Fix front health checking
- Specified seperated /health path in order to allow for healthcheck even if webmail and admin are not seletectd. This also allows healthchecking fom external services like DNS load balancers;
- Make curl not to fail on TLS because localhost is not included in the certificates.
mergify[bot] bce1487338
Merge pull request from hacor/master
Kubernetes fixed for production
Paul Williams 78bd5aea1c enable http2, because it's that easy
hoellen d4f32c3e7d remove rewrite if webmail is on root