| 1 | # Autoconfiguration in Dekko {#dev_autoconfig} |
| 2 | |
| 3 | During the account creation via the setup wizard. Dekko attempts to find an xml or json configuration file for the server |
| 4 | details based on the users domain name. |
| 5 | |
| 6 | ## XML Configuration file format |
| 7 | |
| 8 | This has been modelled on mozilla's ISPDB with a few new additions |
| 9 | |
| 10 | ```json |
| 11 | |
| 12 | <?xml version="1.0"?> |
| 13 | <clientConfig version="1.2"> |
| 14 | <emailProvider id="example.com"> |
| 15 | <domain>example.com</domain> |
| 16 | <domain>example.net</domain> |
| 17 | |
| 18 | <displayName>Google Mail</displayName> |
| 19 | <displayShortName>GMail</displayShortName> |
| 20 | |
| 21 | <incomingServer type="imap"> |
| 22 | <hostname>imap.example.com</hostname> |
| 23 | <port>993</port> |
| 24 | <socketType>SSL</socketType> |
| 25 | <!-- "plain": no encryption |
| 26 | "SSL": SSL 3 or TLS 1 on SSL-specific port |
| 27 | "STARTTLS": on normal plain port and mandatory upgrade to TLS via STARTTLS |
| 28 | --> |
| 29 | <username>%EMAILLOCALPART%</username> |
| 30 | <!-- "password-cleartext", |
| 31 | "plain" (deprecated): |
| 32 | Send password in the clear |
| 33 | (dangerous, if SSL isn't used either). |
| 34 | AUTH PLAIN, LOGIN or protocol-native login. |
| 35 | "password-encrypted", |
| 36 | "secure" (deprecated): |
| 37 | A secure encrypted password mechanism. |
| 38 | Can be CRAM-MD5 or DIGEST-MD5. Not NTLM. |
| 39 | "NTLM": |
| 40 | Use NTLM (or NTLMv2 or successors), |
| 41 | the Windows login mechanism. |
| 42 | "GSSAPI": |
| 43 | Use Kerberos / GSSAPI, |
| 44 | a single-signon mechanism used for big sites. |
| 45 | "client-IP-address": |
| 46 | The server recognizes this user based on the IP address. |
| 47 | No authentication needed, the server will require no username nor password. |
| 48 | "none": |
| 49 | No authentication |
| 50 | <authentication>password-cleartext</authentication> |
| 51 | |
| 52 | <!-- These are imap related configurations useful for a client to know --> |
| 53 | <imap> |
| 54 | <!-- You can explicitly blacklist certain imap extensions if they are known to cause issue. |
| 55 | If you are the service provider then you should disable these extensions on the server. |
| 56 | For some though it's not possible to access the server in this way, so this provides a means |
| 57 | too stop the client from using them. --> |
| 58 | <blacklist>ID</blacklist> |
| 59 | <blacklist>CONDSTORE</blacklist> |
| 60 | <!-- For servers that don't support IDLE you can configure the interval for sending NOOP to keep the connection alive. |
| 61 | This interval can vary for various reasons, so this is a way to configure what's best for your server. |
| 62 | Note: The interval should be defined in minutes and anything less than 1 minute will get rounded up to 1 minute. --> |
| 63 | <noopInterval>5</noopInterval> |
| 64 | <!-- For imap servers that don't support the SPECIAL-USE extension you can set the special folders manually here --> |
| 65 | <folders> |
| 66 | <!-- Add full mailbox path including seperator (if any) https://tools.ietf.org/html/rfc6154 --> |
| 67 | <all>[Gmail]/All Mail</all> |
| 68 | <archive>[Gmail]/All Mail</archive> |
| 69 | <drafts>[Gmail]/Drafts</drafts> |
| 70 | <flagged>[Gmail]/Flagged</flagged> |
| 71 | <junk>[Gmail]/Spam</junk> |
| 72 | <sent>[Gmail]/Sent</sent> |
| 73 | <trash>[Gmail]/Trash</trash> |
| 74 | </folders> |
| 75 | </imap> |
| 76 | |
| 77 | <password>optional: the user's password</password> |
| 78 | </incomingServer> |
| 79 | |
| 80 | <outgoingServer type="smtp"> |
| 81 | <hostname>smtp.googlemail.com</hostname> |
| 82 | <port>587</port> |
| 83 | <socketType>STARTTLS</socketType> <!-- see above --> |
| 84 | <username>%EMAILLOCALPART%</username> <!-- if smtp-auth --> |
| 85 | <authentication>password-cleartext</authentication> |
| 86 | </outgoingServer> |
| 87 | |
| 88 | <identities> |
| 89 | <identity type="primary"> |
| 90 | <name>Dan Chapman</name> |
| 91 | <email>[email protected]</email> |
| 92 | <replyTo>[email protected]</replyTo> |
| 93 | <organization>Dekko Project</organization> |
| 94 | <signature>Sent with Dekko</signature> |
| 95 | </identity> |
| 96 | <identity> |
| 97 | <name>Dan Chapman</name> |
| 98 | <email>[email protected]</email> |
| 99 | <organization></organization> |
| 100 | <signature>Sent with love :-)</signature> |
| 101 | </identity> |
| 102 | </identities> |
| 103 | |
| 104 | <!-- A page where the ISP describes the configuration. |
| 105 | This is purely informational and currently mainly for |
| 106 | maintenance of the files and not used by the client at all. |
| 107 | Note that we do not necessarily use exactly the config suggested |
| 108 | by the ISP, e.g. when they don't recommend SSL, but it's available, |
| 109 | we will configure SSL. |
| 110 | The text content should contains a description in the native |
| 111 | language of the ISP (customers), and a short English description, |
| 112 | mostly for us. |
| 113 | --> |
| 114 | <documentation url="http://www.example.com/help/mail/thunderbird"> |
| 115 | <descr lang="en">Configure Dekko for IMAP</descr> |
| 116 | <descr lang="de">Dekko mit IMAP konfigurieren</descr> |
| 117 | </documentation> |
| 118 | |
| 119 | </emailProvider> |
| 120 | <clientConfigUpdate url="https://www.example.com/config/mozilla.xml" /> |
| 121 | </clientConfig> |
| 122 | |
| 123 | ``` |
| 124 | |
| 125 | ## JSON Configuration format |
| 126 | |
| 127 | ### (Not implemented yet in Dekko v0.6.11, still WIP) |
| 128 | |
| 129 | Attribute values are the same as for the xml config so I won't duplicate those here |
| 130 | |
| 131 | ```json |
| 132 | { |
| 133 | "version": 1.0, |
| 134 | "clientConfig": { |
| 135 | "provider": { |
| 136 | "domains": { |
| 137 | "domain": "example.com", |
| 138 | "domain": "example.org" |
| 139 | } |
| 140 | }, |
| 141 | "displayName": "Google Mail", |
| 142 | "displayShortName": "GMail", |
| 143 | "servers": { |
| 144 | "incoming": { |
| 145 | "imap": { |
| 146 | "hostname": "imap.example.org", |
| 147 | "port": 993, |
| 148 | "socketType": "SSL", |
| 149 | "username": "%EMAILLOCALPART%", |
| 150 | "authentication": "password-cleartext", |
| 151 | "config": { |
| 152 | "blacklist": { |
| 153 | "extension": "ID", |
| 154 | "extension": "CONDSTORE" |
| 155 | }, |
| 156 | "noopInterval": 5, |
| 157 | "folders": { |
| 158 | "all": "[Gmail]/All Mail", |
| 159 | "archive": "[Gmail]/All Mail", |
| 160 | "drafts": "[Gmail]/Drafts", |
| 161 | "flagged": "[Gmail]/Flagged", |
| 162 | "junk": "[Gmail]/Spam", |
| 163 | "sent": "[Gmail]/Sent", |
| 164 | "trash": "[Gmail]/Trash" |
| 165 | } |
| 166 | } |
| 167 | } |
| 168 | }, |
| 169 | "outgoing": { |
| 170 | "smtp": { |
| 171 | "hostname": "smtp.example.org", |
| 172 | "port": 587, |
| 173 | "socketType": "STARTTLS", |
| 174 | "username": "%EMAILLOCALPART%", |
| 175 | "authentication": "GSSAPI" |
| 176 | } |
| 177 | } |
| 178 | }, |
| 179 | "identities": { |
| 180 | "identity": { |
| 181 | "primary": true, |
| 182 | "name": "Dan Chapman", |
| 183 | "email": "[email protected]", |
| 184 | "replyTo": "[email protected]", |
| 185 | "organization": "Dekko Project", |
| 186 | "signature": "Sent with Dekko" |
| 187 | }, |
| 188 | "identity": { |
| 189 | "primary": false, |
| 190 | "name": "Dan Chapman", |
| 191 | "email": "[email protected]", |
| 192 | "organization": "", |
| 193 | "signature": "Sent with love :-)" |
| 194 | } |
| 195 | }, |
| 196 | "documentation": {} |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | ``` |
| 201 | |
| 202 | ## Multiple servers |
| 203 | |
| 204 | incomingServer and outgoingServer may appear several times. They are in order of priority, |
| 205 | the first entry should generally be used, unless there's a specific factor or policy which prefers a later config. |
| 206 | |
| 207 | For example, there may be configs with STARTTLS and normal SSL. Use the first entry listed. |
| 208 | If that fails (server config change), you can try the second config. |
| 209 | |
| 210 | ## Placeholders |
| 211 | |
| 212 | The email address (before @ or with domain) that the user entered can be used as placeholder in the config file, |
| 213 | so the file is the same for all users (i.e. static). |
| 214 | |
| 215 | Placeholders: |
| 216 | |
| 217 | * %EMAILADDRESS% (full email address of the user, usually entered by the user) |
| 218 | * %EMAILLOCALPART% (email address, part before @) |
| 219 | * %EMAILDOMAIN% (email address, part after @) |
| 220 | * %REALNAME% (needed?) |
| 221 | |
| 222 | These placeholders can be used as value or value part in most settings which take a string. |
| 223 | |
| 224 | ## Location |
| 225 | |
| 226 | For Dekko to be able to find the configuration file it needs to found in a well known location or directly from Dekko's |
| 227 | ISPDB (Only really suitable for large providers, but open to hosting it for you) |
| 228 | |
| 229 | If you would just like to use your current conifugration for thunderbird then make sure that it's located at |
| 230 | |
| 231 | "http://autoconfig.example.org/mail/config-v1.1.xml" or "http://example.org/.well-known/autoconfig/mail/config-v1.1.xml" |
| 232 | |
| 233 | To use an updated new configuration file with the new additional options then make sure it can be located at on of these locations: |
| 234 | |
| 235 | ### For XML configs |
| 236 | |
| 237 | "http://autoconfig.example.org/mail/config-v1.2.xml" or "http://example.org/.well-known/autoconfig/mail/config-v1.2.xml" |
| 238 | |
| 239 | ### For JSON configs |
| 240 | |
| 241 | "http://autoconfig.example.org/mail/config-v1.json" or "http://example.org/.well-known/autoconfig/mail/config-v1.json" |
| 242 | |
| 243 | ### Dekko ISPDB |
| 244 | |
| 245 | If you would like to submit you config to [Dekko's ISPDB](https://autoconfig.dekkoproject.org/v1.2) then submit |
| 246 | a merge proposal or attach the config to a bug report at [launchpad.net/dekko-autoconfig](https://launchpad.net/dekko-autoconfig) |
| 247 | |
| 248 | ## SRV records |
| 249 | |
| 250 | Dekko also supports looking up SRV service labels to configure an IMAP/SMTP server. Any labels added using the methods |
| 251 | 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. |
| 252 | |
| 253 | This is pretty much the last chance saloon to find some useful credentials. |