Setting up Office 365 with Mozilla Thunderbird

Recently I had to use an Office 365 mail account with Mozilla Thunderbird. For some reason, Office365 domains are not recognised by default by Thunderbird and such the automatic configuration doesn't work. This took quite a while to debug, as Thunderbird has no built in options for connecting to Exchange servers, hence you have to set up IMAP and SMTP.

Below is my working configuration at the time of writing. It may change with updates of Office 365, but I hope this helps if you're having problems!

Step 1 - New Account

File->New->Existing mail account

Your Name: <The name you wish emails to be sent from>
Email address: xxxx@domain.co.uk
Password: xxxxxxxx

Step 2 - Manual Setup

Click Continue followed by Manual Config and enter the server settings below:

Incoming Mail:
Type: IMAP
Server: outlook.office365.com
Port: 993
Username: xxxx@domain.co.uk
Security: SSL/TLS
Authentication method: Normal password

Outgoing Mail:
Type: SMTP
Server: outlook.office365.com
Port: 587
Username: xxxx@domain.co.uk
Security: STARTTLS
Authentication method: Normal password

Step 3 - Finish setup

Click Re-test followed by Done