TL;DR: Temporarily disable Avast Mail Shield on Big Sur if this is happening to you.
Problem: Mail stops working with Avast Antivirus Mail Shield active
Affected mail applications: Apple Mail, Spark (both seem to use the same communication framework), possibly more. Does not happen with all email clients, eg. Thunderbird works fine
Conflicting apps: It seems any app that uses System Extension which filters network connections. We have reproduced it with:
Cisco AnyConnect (even installing only VPN module without actually using it causes System Extension to be started)
Little Snitch firewall
Microsoft Defender
What is happening: Apple Mail or similar mail app connects to mail server but fails to initialise secure connection and fails communicating. This is probably not caused by Avast Antivirus or any of the conflicting apps; it seems like a bug in the Apple’s networking library used by the mail client. Web Shield (web browsers) and alternative Mail clients (like Mozilla Thunderbird) are working fine in a similar situation.
How to find out potential conflicting apps: run Terminal and in it run the following command:
systemextensionsctl list
output may be like:
4 extension(s)
--- com.apple.system_extension.network_extension
enabled active teamID bundleID (version) name [state]
* * 6H4HRTU5E3 com.avast.Antivirus.SystemExtension (1.2.72/1.2.72) Avast Antivirus System Extension [activated enabled]
* * UBF8T346G9 com.microsoft.wdav.netext (101.13.75/101.13.75) Microsoft Defender ATP Network Extension [activated enabled]
* * DE8Y96K9QP com.cisco.anyconnect.macos.acsockext (4.9.04043/4.9.04043) Cisco AnyConnect Socket Filter Extension [activated enabled]
--- com.apple.system_extension.endpoint_security
enabled active teamID bundleID (version) name [state]
* * UBF8T346G9 com.microsoft.wdav.epsext (101.13.75/101.13.75) Microsoft Defender ATP Endpoint Security Extension [activated enabled]
The relevant are the extensions with * under “active” in com.apple.system_extension.network_extension section; in this case, aside from Avast there is Microsoft Defender and CiscoAnyConnect. Please note that not all system extensions listed there must be conflicting!
What to do (workaround): Either disable Avast Mail Shield in Avast GUI or disable the conflicting apps. This is easier said than done, eg. Cisco AnyConnect starts system extension even when it is inactive; uninstall of such applications may be the only other solution.
For those who may have problem with their company requiring them to run antivirus when connecting to VPN, you can try to disable Scan Secure Connections in Avast Preferences, tab Core shields, section Email Shield, and set up your mail to only use secure connection (IMAPS - port 993, POP3s - port 995)
What have we done: We have reported this issue to Apple.
EDIT:
After throughout analysis, the only workaround currently possible is to turn off scanning of email traffic for those that are affected. In the next version (Avast 14.7) we will automatically do this if we detect a clashing product. ETA for this new version is end of next week. Please turn off Mail shield manually in the meantime. We are very sorry that we have not caught this issue in our testing and that we are adding problems to all of you affected. The fix of the underlying issue needs to be done on Apple side.