Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 accessing https://autodiscover.my.domain.pt/autodiscover/autodiscover.xml #47

Closed
famaia opened this issue Jun 22, 2018 · 3 comments

Comments

@famaia
Copy link

famaia commented Jun 22, 2018

Impacted versions
0.10.2

Distribution: Centos
Codename: Centos 7
Arch: 64 Bits
Database: None
Steps to reproduce
Configuration of automx with NGINX

Full trace using - current behaviour
Accessing https://autodiscover.my.domain.pt/autodiscover/autodiscover.xml

2018-06-20 01:41:25,049 DEBUG: HTTP_HOST: autodiscover.my.domain.pt
2018-06-20 01:41:25,049 DEBUG: HTTPS: on
2018-06-20 01:41:25,049 DEBUG: wsgi.multithread: False
2018-06-20 01:41:25,049 DEBUG: HTTP_UPGRADE_INSECURE_REQUESTS: 1
2018-06-20 01:41:25,049 DEBUG: HTTP_CACHE_CONTROL: max-age=0
2018-06-20 01:41:25,049 DEBUG: REQUEST_URI: /autodiscover/autodiscover.xml
2018-06-20 01:41:25,050 DEBUG: HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8
2018-06-20 01:41:25,050 DEBUG: wsgi.version: (1, 0)
2018-06-20 01:41:25,050 DEBUG: wsgi.run_once: False
2018-06-20 01:41:25,050 DEBUG: wsgi.errors: <open file 'wsgi_errors', mode 'w' at 0x7f093c948660>
2018-06-20 01:41:25,050 DEBUG: REMOTE_PORT: 57450
2018-06-20 01:41:25,051 DEBUG: HTTP_ACCEPT_LANGUAGE: pt-PT,pt;q=0.9,en-US;q=0.8,en;q=0.7
2018-06-20 01:41:25,051 DEBUG: REQUEST_SCHEME: https
2018-06-20 01:41:25,051 DEBUG: UWSGI_APPID: utodiscover.my.domain.pt|
2018-06-20 01:41:25,051 DEBUG: uwsgi.version: 2.0.16
2018-06-20 01:41:25,051 DEBUG: CONTENT_TYPE:
2018-06-20 01:41:25,051 DEBUG: wsgi.file_wrapper:
2018-06-20 01:41:25,052 DEBUG: HTTP_ACCEPT_ENCODING: gzip, deflate, br
2018-06-20 01:41:25,052 DEBUG: --------------- END environ ---------------
2018-06-20 01:41:25,052 DEBUG: Request GET: QUERY_STRING:
2018-06-20 01:41:25,052 WARNING: Error in autoconfig request!

Expected behavior
Should return configuration of Outlook

@InToSSH
Copy link

InToSSH commented Jan 8, 2019

It looks like you just opened this URL in your browser, this will not work and it will produce 500 error code as the request is supposed to be a POST request, not GET request. In the body of the POST request you have to have a XML with your request, like email address, which should look like this:

<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006">
    <Request>
      <EMailAddress>user@contoso.com</EMailAddress>
      <AcceptableResponseSchema>
         http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a
       </AcceptableResponseSchema>
    </Request>
  </Autodiscover>

You can simulate this by using Postman for example, or of couse by using the built-in automx-test command.

@gianks
Copy link

gianks commented Jul 13, 2019

Hi, i have the same problem with autoconfig using automx-test:

`
$ automx-test automx@XXX.it

Testing Autoconfig ...
Connecting to http://autoconfig.XXX.it/mail/config-v1.1.xml?emailaddress=automx@XXX.it ...

HTTP/1.1 500 Internal Server Error
Server: nginx/1.14.2
Date: Sat, 13 Jul 2019 13:32:21 GMT
Content-Type: text/xml
Content-Length: 0
Connection: keep-alive
Trying fallback URL ...
Connecting to http://XXX.it/.well-known/autoconfig/mail/config-v1.1.xml?emailaddress=automx@XXX.it ...
`

How can i debug the real cause? There are no interesting info in the nginx error log.
Thanks

@variablenix
Copy link

Looks like it may be a misconfiguration with Nginx. Check what automx.log is reporting wherever you specified the location in automx.conf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants