Outlook's autodiscover and Thunderbird's autoconfig implemented with the Python webframework Bottle.
Just plain ol' Python.
Create the following DNS records (instead of example.com use your own domain):
Essential records:
autoconfig.example.com A <ip of your server>
_autodiscover._tcp.example.com SRV 10 10 443 autoconfig.example.com.
Optional recommended records:
_imaps._tcp.example.com SRV 0 1 993 <your mailserver's subdomain>
_submission._tcp.example.com SRV 0 1 587 <your mailserver's subdomain>
- Clone this repository
- Edit the
config.xml
file so it fits your mailserver - Create a new user with limited rights: (e.g.
useradd -s /usr/sbin/nologin --system autuxcover
) - Give this user persmissions for the directory:
chown autuxcover:autuxcover /path/to/the/repo -R
- Copy the
autuxcover.service
file into the/etc/systemd/system/
directory on your system (if your system has systemd) - Edit the execution path in the newly copied file and maybe user and group if your's have different names
- Start the service
systemctl start autuxcover.service
- Create a new NGINX virtual host (edit certificate paths and server_name):
server {
listen 443 ssl http2;
listen [::]:443;
server_name autoconfig.example.com;
ssl_certificate /path/to/your/certificate.crt;
ssl_certificate_key /path/to/your/key.key;
location / {
proxy_pass http://127.0.0.1:8089;
proxy_redirect default;
}
}
- Reload NGINX:
nginx -s reload
- Done!
You can check if everything is correct here or by doing a right click while holding CTRL on the Outlook icon in the taskbar and selecting "Email-Autodiscover test".
Simply try to add a new email account in your Thunderbird client and make sure you don't have to enter your server settings manually.
You may have to change the port from 8089 to something else if some service already uses that port on your system.
It is also recommended to change the debug=True
into debug=False
if you are planning to use this on production scale.
Some older versions of Outlook may use the so-called Guesssmart which basically tries every possible POP3, IMAP and SMTP combination to find the correct settings. This creates a lot of requests to the server, so please beware that you might have to adjust some anti-spam or anti-brute-force mechanisms on your server (e.g. fail2ban, ...).
This project is licensed under the GNU General Public License Version 3 - see the LICENSE file for details.