{"id":13566742,"url":"https://github.com/smartlyway/email-autoconfig-php","last_synced_at":"2025-04-04T00:32:08.667Z","repository":{"id":114898197,"uuid":"128845920","full_name":"smartlyway/email-autoconfig-php","owner":"smartlyway","description":"Allows to configure an email service automatically in some email clients by configuring autodiscover / autoconfig protocols (with PHP)","archived":false,"fork":false,"pushed_at":"2023-08-05T19:57:57.000Z","size":5,"stargazers_count":47,"open_issues_count":3,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-04T21:37:07.393Z","etag":null,"topics":["autoconfig","autoconfig-thunderbird","autoconfiguration","email"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smartlyway.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-04-09T23:33:11.000Z","updated_at":"2024-10-30T10:17:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"abc57abd-4374-43f0-944c-04cbfc995a26","html_url":"https://github.com/smartlyway/email-autoconfig-php","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlyway%2Femail-autoconfig-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlyway%2Femail-autoconfig-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlyway%2Femail-autoconfig-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartlyway%2Femail-autoconfig-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smartlyway","download_url":"https://codeload.github.com/smartlyway/email-autoconfig-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247103290,"owners_count":20884023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autoconfig","autoconfig-thunderbird","autoconfiguration","email"],"created_at":"2024-08-01T13:02:15.769Z","updated_at":"2025-04-04T00:32:08.212Z","avatar_url":"https://github.com/smartlyway.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# Email autoconfig\nWhen you create a self-hosted email service, you have to inform your customers about the email protocol settings (commonly IMAP and SMTP servers, ports, security, usernames and passwords) so they can configure their accounts in their email clients. If those users are not tech savvy, they may call support or the IT manager to ask for help. This causes IT managers \u0026 support loose their wonderful time.\n\n## Autoconfig: the solution\nWhat most email providers do is to setup email autoconfigure so email clients accessing the service can guess using the email address' domain and the autoconfig settings which protocol settings have to use to use the mail service.\n\nBasically, autoconfigure makes configuring email accounts easy for everyone.\n\n### One client, one configuration\nDespite that, every email client uses its own autoconfiguration protocols so it's required to setup each autoconfig protocol for each email client if you want the email service to autoconfigure in all email clients you support. \n\n#### Thunderbird\nSetting up Thunderbird autoconfiguration is the easiest autoconfig setup. You just have to place an [XML config file](https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration/FileFormat/HowTo) named `config-v1.1.xml` and place it in the autoconfig subdomain, inside a `mail` path.\n\nSo if you want to setup Thunderbird autoconfiguration for domain `example.org`, you have to write a config file visible in the following URL:\n\nhttp://autoconfig.example.org/mail/config-v1.1.xml\n\nThe file `mail/config-v1.1.xml` in this repository is a tested configuration file that provides autoconfiguration for Thunderbird in the production environment.\n\n##### Configuration guides:\n- https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration\n- https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration/FileFormat/HowTo\n- https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat\n\n#### Microsoft Outlook\nThings get complicated with Microsoft Outlook. \n\n1. **Create DNS record**\nYou must first create a DNS record:\n\n|    Service    | Protocol | Value, Destination, Target | Port | Priority | Weight | TTL  |\n|:-------------:|:--------:|:--------------------------:|:----:|:--------:|:------:|:----:|\n| _autodiscover |   _tcp   |   {{domain}}   |  443 |     5    | 0      | 3600 |\n\n2. **Create _autoconfig XML_ file**\nIt must by dynamic, it will receive a POST request and must reply with a valid XML given the email address requested. The URL of the XML service must be the following one:\n\nhttps://{{domain}}/Autodiscover/Autodiscover.xml\n\n\u003e We use PHP, so we've created a folder named `Autodiscover.xml` and placed inside an `index.php` file so the browser can request the URL and the server executes PHP code\n\nContents of the XML request and response can be found at repository for generating the response and in the sources to check the request Microsoft Outlook triggers to perform autodiscover (autoconfig) protocol\n\n##### Configuration guides:\nGeneric one at sources (archive.org)\n\n##### Testing tools:\nhttps://testconnectivity.microsoft.com\n\n#### iOS / macOS mail application\nTo autoconfigure iOS and macOS default mail application, we must define a mobile configuration profile file (`.mobileconfig`) with the settings to install in the mail application. This file will be automatically generated for every email passed as input. You must then provide the user this file dynamically via a web form or once generated via email, instant messaging, etc... We've tested using a URL with a GET parameter set.\n\nSample file to generate it in PHP is available on `btcassessors.mobileconfig` directory\n\n##### Configuration guides:\nhttps://developer.apple.com/library/content/featuredarticles/iPhoneConfigurationProfileRef/Introduction/Introduction.html\n\n# Sources\nThe information has been extracted generally from this URLs:\nhttp://web.archive.org/web/20120828065248/http://moens.ch/2012/05/31/providing-email-client-autoconfiguration-information/\nhttps://github.com/Tiliq/autodiscover.xml\n\nRepo is an abstraction of https://github.com/BTCAssessors/email-autoconfig\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartlyway%2Femail-autoconfig-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmartlyway%2Femail-autoconfig-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartlyway%2Femail-autoconfig-php/lists"}