Hello, I have set up authorization in nextcloud via mailcow, according to the instructions on the site. But I get this error:

Unable to exchange code for API access token. HTTP client error: Failed to connect to mail.domain.kz port 443 after 41 ms: Couldn't connect to server.

Nginx logs:
mailcowdockerized-nginx-mailcow-1 | 192.168.10.237 - - [24/Apr/2023:11:10:06 +0500] "GET /oauth/authorize?response_type=code&client_id=497d632196f0&redirect_uri=https%3A%2F%2Fnc.domain.kz%2Fapps%2Fsociallogin%2Fcustom_oauth2%2Fmailcow&scope=profile&state=HA-8OUPJH1DAL6XGCZ7NWR5YB2KQ3TI9SE4MFV0 HTTP/2.0" 200 21345 "https://mail.domain.kz/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 OPR/98.0.0.0 (Edition Yx 08)"
mailcowdockerized-nginx-mailcow-1 | 192.168.10.237 - - [24/Apr/2023:11:10:06 +0500] "GET /cache/b45366c3aa6791f05ffee6ece000389a71291b50.js HTTP/2.0" 200 261419 "https://mail.domain.kz/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 OPR/98.0.0.0 (Edition Yx 08)"
mailcowdockerized-nginx-mailcow-1 | 192.168.10.237 - - [24/Apr/2023:11:10:06 +0500] "GET /api/v1/get/passwordpolicy/html HTTP/2.0" 200 204 "https://mail.domain.kz/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 OPR/98.0.0.0 (Edition Yx 08)"
mailcowdockerized-nginx-mailcow-1 | 192.168.10.237 - - [24/Apr/2023:11:10:07 +0500] "POST /oauth/authorize?response_type=code&client_id=497d632196f0&redirect_uri=https%3A%2F%2Fnc.domain.kz%2Fapps%2Fsociallogin%2Fcustom_oauth2%2Fmailcow&scope=profile&state=HA-8OUPJH1DAL6XGCZ7NWR5YB2KQ3TI9SE4MFV0 HTTP/2.0" 302 0 "https://mail.domain.kz/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 OPR/98.0.0.0 (Edition Yx 08)"
mailcowdockerized-nginx-mailcow-1 | 192.168.10.237 - - [24/Apr/2023:11:10:07 +0500] "GET /apps/sociallogin/custom_oauth2/mailcow?code=8b41662c5dd77e0a21ae60ea8bcb958fa4f4e4dc&state=HA-8OUPJH1DAL6XGCZ7NWR5YB2KQ3TI9SE4MFV0 HTTP/2.0" 401 3902 "https://mail.domain.kz/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 OPR/98.0.0.0 (Edition Yx 08)" "-"

how can i solve the problem?

  • The problem is solved, it was in the wrong settings of the router

17 days later

The problem is solved, it was in the wrong settings of the router

Have something to say?

Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

No one is typing