Credits to PixlOne for O365Interactive mode and headless Davmail
Step 1: Get Davmail.
- I'm on Arch Linux, so I installed it from the AUR.
- Use O365Interactive for Protocol, and uncheck
Local POP port
,Caldav HTTP port
, andLocal LDAP port
. Keep everything else as the default, and hit save.
- I'm using Mailspring, which I believe is the best mail client I can get for free. [Not Sponsored]
- Use manual config (IMAP/SMTP) to setup the account.
- Use
<your WatIAM username>@uwaterloo.ca
as your username and your WatIAM password. - Use
localhost
as the server. - Use the ports set in Davmail (1143 for IMAP and 1025 for SMTP by default).
- Set any authentication to None.
- The first time you attempt to connect, you'll get a Davmail popup and the UWaterloo adfs page will open. Login with your credentials, and paste the link you reach at the end into the Davmail prompt.
- Success! Your mail should now work. Davmail basically acts as an interpreter between the O365/Exchange network and IMAP/SMTP. As such, it must be constantly running to receive/send mail. Go ahead and exit Davmail. Copy the properties from your home directory to
/etc
with:
sudo cp ~/.davmail.properties /etc/davmail/<your-linux-username>.properties
and change O365Interactive
to O365Manual
in the config file:
sed -i 's/O365Interactive/O365Manual/g'
- Add a davmail user:
sudo useradd --system davmail
- Finally, start and enable the service with:
sudo systemctl enable --now davmail@<your-linux-username>
That's it! Note: Always test and verify via the webapp before relying on any setup!
thank you so much for this, i have been trying to find a way to make mailspring work. I am getting a syncing error towards the end of step 3.
I was wonderring if you know how to fix it?