How to change webmail type for all domains on the server?
Answer
Perform steps described below depending on used OS
For Plesk for Windows:
-
Login to the server via RDP.
-
Dump the list of domains:
C:> plesk db -Ne "select name from domains" > C:domains.txt
-
Go to CLI directory:
C:> cd "%plesk_cli%"
-
Update all domains to use Horde:
C:> for /f "tokens=*" %d in ('type C:domains.txt') do plesk bin subscription_settings -u %d -webmail horde
Note: The available options are:
horde
- Horde Webmailmewebmail
- MailEnable Webmailsmwebmail
- SmarterMail Webmail.none
- Without webmail.
For Plesk for Linux:
-
Login to the server via SSH as root.
-
Create a file webmail.sh with below script to switch webmail for all domains to Horde:
# cat webmail.sh
#!/bin/bash
for d in `plesk db -Ne "select name from domains"`
do
plesk bin subscription_settings -u "$d" -webmail horde
doneNote: The available options are:
roundcube
- RoundCube webmailhorde
- Horde webmailsogo_sogo
- SOGo webmailnone
- Without webmail. -
Change permissions:
# chmod +x webmail.sh
-
Execute script:
# ./webmail.sh