Programmierus / ldap-mailcow

LDAP account synchronization and authentication for mailcow-dockerized
97 stars 37 forks source link

When redirect to HTTPS is set and no valid SSL then we have an error. #22

Open Widmo opened 3 years ago

Widmo commented 3 years ago

Hi, I set redirect from doc: https://mailcow.github.io/mailcow-dockerized-docs/u_e-80_to_443/

and my sync has stopped working. SSL was self signed. I'm preparing server for swap and cannot upload valid ssl yet.

  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='x.q.y.z', port=443): Max retries exceeded with url: /api/v1/get/mailbox/widmo@xxx.yyy/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1123)')))

I spent many hours debugging, after remove redirect.conf sync was done correctly.

So be careful.

Maybe it's good idea to enable in config 'allow invalid SSL'? or create exclude to nginx.

paz commented 3 years ago

See my pull request, it allows you to add your own SSL cert to trust