Zimbra has the ability to restrict user access to webmail. This feature was introduced in version 10.x.
To use this feature, simply disable the “Web Client access” feature via COS or per-user.
For example, to disable “Web Client access” per-user, go to Zimbra Admin | Manage | Accounts | Edit the account in question | Features. Uncheck the “Web Client access” feature.
Disable via CLI
Per-user
with - zimbra zmprov ma user@domain zimbraFeatureWebClientEnabled FALSE
By-COS
with - zimbra zmprov mc cos-name zimbraFeatureWebClientEnabled FALSE
After the “Web Client access” feature is disabled, the user will get an error like the following when logging in.
Please try it and hopefully it will be useful