I really like how Thunderbird 15.0 has build in support for populate chat services like Google Talk, Twitter, and XMPP (aka Jabber).
What I don’t like is that Thunderbird’s support for these is minimal, and when things don’t work it is almost impossible to figure out why.
Here are two issues I ran into and their solution.
Jabber/XMPP Accounts seems stuck on “Connecting”
Before you assume that you ran to the issues I did, try port 5223 rather than port 5222. Port 5223 is the old school “secure” port for XMPP/Jabber. The more modern way is that port 5222 is used, but the server then negotiates a secure connection.
For me the root cause turned out to be a special feature in how XMPP looks up servers. If a company doesn’t want to open a port on their main server (for example bigcompany.com) they can add a special internet name lookup (DNS Record) saying “my jabber server is really over on the other server). These kind of records are called DNS SRV records.
Most XMPP clients do this for you automatically, but Thunderbird 15.0 doesn’t do this, fortunately, you can do the same look up yourself and then tell Thunderbird to user the other server instead.
How to Lookup the Actual XMPP Server for an Account
Instead of running command line tools, some helpful souls haven put together online tools to find your XMPP server, so that’s what we’ll us:
- Open your web browser to https://kingant.net/check_xmpp_dns/.
- In the text field under Check DNS SRV records for XMPP, enter the part of your XMPP/Jabber account that happens after the @.
- If the results say “ERROR”, then the problem you are having is not due to the SRV record feature, but something else.
- In the Client records for section of the results, locate the Target column, and copy the value immediately under it.
- Go back to Thunderbird, choose Tools->Account Settings…”, click on your XMPP account in the left hand ride, and then paste into the Server field.
Click on the Check button.
Click on OK to close the preferences window.
How to Fix when You Connect and then are Immediately Disconnected from the XMPP Server
Once I had done the previous steps to fix server lookup, I immediately found that my account was immediately disconnected.
After verifying the username and password, I did some investigation and determined that my XMPP/Jabber server has an “invalid” SSL certificate. You may be wondering how a server might have an invalid certificate? The answer is that valid certificates cost money and require a unique internet address for the server. If you are using a free service from a small company, or even an internal server, odds are good that they won’t be springing for an officially signed SSL certificate any time soon.
All is not lost though, you can tell Thunderbird that you trust the server, and that Thunderbird should also.
- In Thunderbird open the Preferences windows.
- Click on the Advanced tab.
- Click on the Certificates section.
- Click on View Certificates.
- Click on the Servers tab.
- Click on Add Exception….
- In the Location: field, delete https:// and enter the server name you looked up the SRV section above. If you got an ERROR when looking up the SRV record, enter the part of your XMPP/Jabber account that happens after the @.
- After the server name enter :5222. Be sure and include the colon (:).
- Click on Get Certificate
- Make sure Permanently Store this Exception is checked.
- Click on Confirm this Exception.
- Click on OK.
With any luck you will now be able able to connect to your Jabber/XMPP server.
Please suggest improvements to these directions in the comments.
Depending on the server, you may hove to use port 5223 instead of 5222. I had to. Otherwise good HOWTO.
It’s possible the certificate your XMPP server has was correct, here is why:
Let’s assume that you are connecting the account firstname.lastname@example.org and that the SRV record for domail.tld points to xmpp.provider.net.
In this case, the XMPP specification says that the server should send you a valid certificate for “domain.tld”.
However, you configured Thunderbird to connect directly to xmpp.provider.net, so Thunderbird expects a valid certificate for that hostname, which isn’t the case is the server is correctly configured and sends a valid certificate but for domain.tld.
(Of course it’s also possible that the certificate was indeed self-signed.)
Thanks for writing a clear tutorial on how to work around the lack for DNS SRV support in Thunderbird, I’m sure lots of users will find this handy!
In my case I was dealing with an expired certificate, but good point about the potential mismatch due to pointing at the SRV designated server. The port 5222 vs. 5223 is a good point also, so I will update the How To accordingly.
Thanks for the tip-off about the certificate being key to “the server has disconnected” message. In my case I needed to add a local CA to the cert store and then it worked beautifully.
Absolutely no messages on the client-side to help debug that!
xmpp + TB http://t.co/v4KlWLtt
On Mac OS X one has to import the certificate to the keyring and declare it trustworthy prior to import the cert to thunderbird.
That’s an excellent point.
I had previously set up other chat clients (like Adium) on Mac OS X, so I didn’t know that needed to be done even for Thunderbird chat.
Thanks for the info!
Your tutorial was fantastic. Thanks for this post. Thunderbird now works for me for the internal Openfire server that I have setup.
Great how to! I knew there had to be a way, just wish they made this simpler. Thanks for getting me connected!
Thanks! Works perfect with Thunderbird!
Amazing how setting up XMPP clients are so easy on Pidgin and Spark, but it’s extremely difficult with Thunderbird.
Thanks. The only guide I can find that gets it working.
Hi, good stuff stays forever.
Still works on TB 45 … also thanks to the Guys created https://kingant.net/check_xmpp_dns/.
It worked perfectly for me.
thanks a lot
Very, very thanks. It’s works now!
Pingback: Back to XMPP – davelevy . info / wiki