Definition
Authoritative definition
Example
Real-world example
<?xml version="1.0" encoding="UTF-8"?>
<clientConfig version="1.1">
<emailProvider id="freenet.de">
<domain>freenet.de</domain>
<displayName>Freenet Mail</displayName>
<displayShortName>Freenet</displayShortName>
<incomingServer type="imap">
<hostname>imap.freenet.de</hostname>
<port>993</port>
<socketType>SSL</socketType>
<authentication>password-encrypted</authentication>
<username>%EMAILADDRESS%</username>
</incomingServer>
<incomingServer type="imap">
<hostname>imap.freenet.de</hostname>
<port>143</port>
<socketType>STARTTLS</socketType>
<authentication>password-encrypted</authentication>
<username>%EMAILADDRESS%</username>
</incomingServer>
<incomingServer type="pop3">
<hostname>pop.freenet.de</hostname>
<port>995</port>
<socketType>SSL</socketType>
<authentication>password-cleartext</authentication>
<username>%EMAILADDRESS%</username>
</incomingServer>
<incomingServer type="pop3">
<hostname>pop.freenet.de</hostname>
<port>110</port>
<socketType>STARTTLS</socketType>
<authentication>password-cleartext</authentication>
<username>%EMAILADDRESS%</username>
</incomingServer>
<outgoingServer type="smtp">
<hostname>smtp.freenet.de</hostname>
<port>465</port>
<socketType>SSL</socketType>
<authentication>password-encrypted</authentication>
<username>%EMAILADDRESS%</username>
</outgoingServer>
<outgoingServer type="smtp">
<hostname>smtp.freenet.de</hostname>
<port>587</port>
<socketType>STARTTLS</socketType>
<authentication>password-encrypted</authentication>
<username>%EMAILADDRESS%</username>
</outgoingServer>
<documentation url="https://kundenservice.freenet.de/hilfe/email/programme/config/index.html">
<descr lang="de">Allgemeine Beschreibung der Einstellungen</descr>
<descr lang="en">Generic settings page</descr>
</documentation>
<documentation url="https://kundenservice.freenet.de/hilfe/email/programme/config/thunderbird/imap-thunderbird/imap/index.html">
<descr lang="de">TB 2.0 IMAP-Einstellungen</descr>
<descr lang="en">TB 2.0 IMAP settings</descr>
</documentation>
</emailProvider>
</clientConfig>
How to probe mail servers
To determine a server's capabilities, you can contact the server directly and talk the POP/IMAP/SMTP protocol manually (assuming you already know the hostname).
For non-SSL, use netcat -v hostname port
(preferred) or telnet hostname port
as "client".
-
POP3, port 110: when you see
+OK WEB.DE POP3-Server
or similar, enterCAPA
, hit return. -
IMAP, port 143: when you see
* OK mwinf2j04 IMAP4 server ready
or similar, enter1 CAPABILITY
, hit return. -
SMTP, port 587 or 25: when you see
220 mail.gmx.net GMX Mailservices ESMTP
or similar, enterEHLO example.net
, hit return.
In all cases, the server should respond with a list of capabilities.
SSL / STARTTLS
There are 2 SSL variants: normal SSL and STARTTLS.
Normal SSL
The old-style SSL (including TLS, which is just the new name for SSL) has a special port:
-
POP3 via SSL: port 995
-
IMAP via SSL: port 993
-
SMTP via SSL: port 465
On Linux, you can contact the server via
openssl s_client -connect hostname:port
You should see output about the SSL handshake and the certificate. Important is what is listed as "CN=". This must be the same as the hostname that you contacted, otherwise the certificate is not valid (or you need to use another hostname).
If you see nothing, then probably the server does not support SSL.
After that, you can have the same protocol exchange as with netcat on standard ports, as listed above.
STARTTLS
STARTTLS is a special, new form of SSL, which works on the standard ports (e.g. port 143 for IMAP). You can contact the server via netcat as mentioned above. If you see "STARTTLS" (for IMAP, SMTP) or "STLS" (for POP) listed as one of the capabilities, the server should support STARTTLS.
To try it out, on Linux, you can contact the server via
openssl s_client -connect hostname:port -starttls proto
...where "proto" is imap
, pop3
or smtp
. For example:
openssl s_client -connect imap.example.com:143 -starttls imap
You should get the same response as described above for openssl.
Configuration file format
Add the appropriate port and socket type for each server, depending on protocol and SSL support. For example,
for IMAP with SSL:
<port>993<port>
<socketType>SSL</socketType>
for IMAP with STARTTLS:
<port>143<port>
<socketType>STARTTLS</socketType>
for IMAP without any SSL (deprecated!):
<port>143<port>
<socketType>plain</socketType>
Use SSL
Please do not submit or serve any configurations without SSL! There's no reason in 2010 why users still need to read mail entirely unprotected.
If you are an ISP and think the server load is too high, try adding an SSL accelerator. They are cheap and widely used. In fact, even most freemail (!) providers these days support SSL, so if users pay you money for ISP service, that's all the more reason to give them proper service. But first simply try to enable software SSL - small servers may be fine with SSL and without any additional installations.
Valid certificate
Either way, be sure to use a valid certificate:
-
issued by a CA recognized by Firefox / Thunderbird
-
not expired
-
the CN in the cert must match the hostname that Thunderbird contacts and that is listed as <hostname> in the configuration file. If they don't match, Thunderbird must assume that the user may be under attack, otherwise the SSL guarantees no longer hold. Thunderbird either warns the user or ignores the server. (Note that you can get certificates for free these days, for example from startssl.com.)