# Autoconfiguration in Dekko {#dev_autoconfig} During the account creation via the setup wizard. Dekko attempts to find an xml or json configuration file for the server details based on the users domain name. ## XML Configuration file format This has been modelled on mozilla's ISPDB with a few new additions ```json example.com example.net Google Mail GMail imap.example.com 993 SSL %EMAILLOCALPART% ID CONDSTORE 5 [Gmail]/All Mail [Gmail]/All Mail [Gmail]/Drafts [Gmail]/Flagged [Gmail]/Spam [Gmail]/Sent [Gmail]/Trash optional: the user's password smtp.googlemail.com 587 STARTTLS %EMAILLOCALPART% password-cleartext Dan Chapman dan@workemail.com dan@otherworkemail.com Dekko Project Sent with Dekko Dan Chapman dan@personalemail.com Sent with love :-) Configure Dekko for IMAP Dekko mit IMAP konfigurieren ``` ## JSON Configuration format ### (Not implemented yet in Dekko v0.6.11, still WIP) Attribute values are the same as for the xml config so I won't duplicate those here ```json { "version": 1.0, "clientConfig": { "provider": { "domains": { "domain": "example.com", "domain": "example.org" } }, "displayName": "Google Mail", "displayShortName": "GMail", "servers": { "incoming": { "imap": { "hostname": "imap.example.org", "port": 993, "socketType": "SSL", "username": "%EMAILLOCALPART%", "authentication": "password-cleartext", "config": { "blacklist": { "extension": "ID", "extension": "CONDSTORE" }, "noopInterval": 5, "folders": { "all": "[Gmail]/All Mail", "archive": "[Gmail]/All Mail", "drafts": "[Gmail]/Drafts", "flagged": "[Gmail]/Flagged", "junk": "[Gmail]/Spam", "sent": "[Gmail]/Sent", "trash": "[Gmail]/Trash" } } } }, "outgoing": { "smtp": { "hostname": "smtp.example.org", "port": 587, "socketType": "STARTTLS", "username": "%EMAILLOCALPART%", "authentication": "GSSAPI" } } }, "identities": { "identity": { "primary": true, "name": "Dan Chapman", "email": "dan@workemail.com", "replyTo": "dan@otherworkemail.com", "organization": "Dekko Project", "signature": "Sent with Dekko" }, "identity": { "primary": false, "name": "Dan Chapman", "email": "dan@personalemail.com", "organization": "", "signature": "Sent with love :-)" } }, "documentation": {} } } ``` ## Multiple servers incomingServer and outgoingServer may appear several times. They are in order of priority, the first entry should generally be used, unless there's a specific factor or policy which prefers a later config. For example, there may be configs with STARTTLS and normal SSL. Use the first entry listed. If that fails (server config change), you can try the second config. ## Placeholders The email address (before @ or with domain) that the user entered can be used as placeholder in the config file, so the file is the same for all users (i.e. static). Placeholders: * %EMAILADDRESS% (full email address of the user, usually entered by the user) * %EMAILLOCALPART% (email address, part before @) * %EMAILDOMAIN% (email address, part after @) * %REALNAME% (needed?) These placeholders can be used as value or value part in most settings which take a string. ## Location For Dekko to be able to find the configuration file it needs to found in a well known location or directly from Dekko's ISPDB (Only really suitable for large providers, but open to hosting it for you) If you would just like to use your current conifugration for thunderbird then make sure that it's located at "http://autoconfig.example.org/mail/config-v1.1.xml" or "http://example.org/.well-known/autoconfig/mail/config-v1.1.xml" To use an updated new configuration file with the new additional options then make sure it can be located at on of these locations: ### For XML configs "http://autoconfig.example.org/mail/config-v1.2.xml" or "http://example.org/.well-known/autoconfig/mail/config-v1.2.xml" ### For JSON configs "http://autoconfig.example.org/mail/config-v1.json" or "http://example.org/.well-known/autoconfig/mail/config-v1.json" ### Dekko ISPDB If you would like to submit you config to [Dekko's ISPDB](https://autoconfig.dekkoproject.org/v1.2) then submit a merge proposal or attach the config to a bug report at [launchpad.net/dekko-autoconfig](https://launchpad.net/dekko-autoconfig) ## SRV records Dekko also supports looking up SRV service labels to configure an IMAP/SMTP server. Any labels added using the methods outlined in [RFC6186](https://tools.ietf.org/html/rfc6186) will be checked for **after** all checks for autoconfiguration have been done and had no success. This is pretty much the last chance saloon to find some useful credentials.