Under what laws would it be illegal? I think it is completely reasonable for a company to have access to all data on company-provided accounts, so long as the employees aren't mislead into thinking it is private.
The company cannot access those messages without your consent or without a suspicion of a crime (like a leak of data).
[1] https://en.wikipedia.org/wiki/Secrecy_of_correspondence
Source in French with some court's judgement : https://www.arobase.org/entreprise/email-personnel.htm
Here's a guide for UK employers:
https://uk.practicallaw.thomsonreuters.com/2-107-4386?transi...