[Guide] Autoconfig + autodiscover for simple platforms

Discussion in 'Tips/Tricks/Mods' started by cfoe, Nov 22, 2012.

  1. cfoe

    cfoe Member

  2. cfoe

    cfoe Member

    I updated the guide to correctly work with Outlook >= 2007
    Now it is on both clients (Outlook and Thunderbird) possible to add an account with only username and password.
     
  3. inside83

    inside83 Member

    Hi

    I just glanced over your guide.
    Does it support nginx?
     
  4. cfoe

    cfoe Member

    You need the rewrite that is in the .htaccess but you need to add it to the vhost config in nginx. This works for me:
    Code:
    server {
       listen *:80;
       server_name discover.domain.de autoconfig.* autodiscover.*;
       root  /var/www/discover.domain.de/web;
       index index.html;
       error_log /var/log/nginx/discover.domain.de/error.log;
       access_log /var/log/nginx/discover.domain.de/access.log combined;
       #location ^~ /autodiscover/ {
      #  index autodiscover.php;
      #  rewrite ^/.*$ /autodiscover.php last;
       #}
       rewrite ^/autodiscover/autodiscover\.xml$ /autodiscover/autodiscover.php;
     
       location = /robots.txt {
         allow all;
         log_not_found off;
         access_log off;
       }
       location ~ \.php$ {
         try_files $uri =404;
         include /etc/nginx/fastcgi_params;
         fastcgi_pass unix:/var/lib/php5-fpm/discover.sock;
         fastcgi_index index.php;
         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
         fastcgi_param PATH_INFO $fastcgi_script_name;
         fastcgi_intercept_errors on;
       }
    }

    Sorry but I dont see the option to properly post code here on the forum.
     
    Last edited: Jan 21, 2015
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    There is a icon in the editor bar that looks a bit like a newspaper article, when yu click on that icon, it will open varius code post options.
     
  6. cfoe

    cfoe Member

    Thanks-
     
  7. theWeird

    theWeird Member

    Thanks for digging for this old post.
    I've been working on a tool to offer autodiscovery for mail clients in a multiserver environment but just didn't manage to get it working for outlook.
    Using some single lines of Christians code I just finished my plugin.
    https://github.com/SpicyWeb-de/isp-mailConfig (Setup Instruction included)
     
    30uke likes this.
  8. inside83

    inside83 Member

    @cfoe
    So I put your code in "nginx Directives" box of my site?
    Any additional settings?
    DNS entries?
     
  9. cfoe

    cfoe Member

  10. dmgeurts

    dmgeurts Member

    Updated for ISPConfig 3.1, apache 2.4 and added option to manually configure the mail server FQDN as the detected server name wasn't ideal for my mirrored setup. https://github.com/dmgeurts/isp-mailConfig
     
    30uke, grasomega, SupuS and 1 other person like this.
  11. 30uke

    30uke Active Member HowtoForge Supporter

    Update: resolved. Thanks :)
    Thanks for this tool. I did follow all the instructions but for some reason I am being directed to the default site when I run a test.
    When I change the following link it will not direct my request correctly: https://discover.my-service.com/mail/config-v1.1.xml?emailaddress=user%40my-mail.com
    I did check the DNS records and these all seem te be fine.
    I am running the service at discover.s1.gigabitjes.nl and a queries for https://discover.s1.gigabitjes.nl or https://discover.s1.gigabitjes.nl/mail/ ends up at 000default.tld. This is of course included in the above URL eg https://disover.s1.gigabitjes.nl/mail/config-v1.1.xml?emailaddress=test%40mydomain.com (where "mydomain.com" is the domain which I am testing).
    I am hoping you could point me into the right direction :)
     
    Last edited: Nov 10, 2019
    dmgeurts likes this.
  12. 30uke

    30uke Active Member HowtoForge Supporter

    Update: resolved. Thanks :)
    Thanks for the updated version. I am struggling with it a bit, but I appreciate the update.
     
    Last edited: Nov 10, 2019
    dmgeurts likes this.
  13. 30uke

    30uke Active Member HowtoForge Supporter

    @dmgeurts, @theWeird: update :: some progress! I am able to get the xml output with the test URL now :)
     
    dmgeurts likes this.
  14. pzajda

    pzajda Member HowtoForge Supporter

    Hello,

    Thanks for this work.

    Would it be possible to include instructions for Nginx please?
     
  15. dmgeurts

    dmgeurts Member

    Sorry, I don't use Nginx. If you have suggestions I can add those.
     
  16. dmgeurts

    dmgeurts Member

    Anyone else having issues running this on PHP 7.2 or is it just me? I moved from 5.6 on Ubuntu 16.04 to 7.2 on Ubuntu 18.04 and it's no longer working. Pulling my hair out trying to figure out why the login call isn't working.

    Tested the account credentials and that's fine. SSL is forced and using a valid certificate. The errors thrown: can't connect to host.
     

Share This Page