Hi Dude, today i will write about zimbra add and remove service from command line. Sometime we need disable or reactivated some service.
Check Zimbra Running Status
How do we find out all the Zimbra services that are running? The easy way is via zmcontrol as below.
[zimbra@mail ~]$ zmcontrol status
Host mail.habibza.in
dnscache Running
ldap Running
logger Running
mailbox Running
mta Running
opendkim Running
service webapp Running
snmp Running
spell Running
stats Running
zimbra webapp Running
zimbraAdmin webapp Running
zimlet webapp Running
zmconfigd Running
Then how to disable one of the services above.
Zimbra Get All Service Enable and Install
For example, I want to disable the "dnscache"
service. At first, get all the services that are installed and available.
zimbra@mail:~$ zmprov gs `zmhostname` zimbraServiceEnabled zimbraServiceInstalled
# name mail.habibza.in
zimbraServiceEnabled: amavis
zimbraServiceEnabled: antivirus
zimbraServiceEnabled: antispam
zimbraServiceEnabled: opendkim
zimbraServiceEnabled: logger
zimbraServiceEnabled: ldap
zimbraServiceEnabled: snmp
zimbraServiceEnabled: mta
zimbraServiceEnabled: service
zimbraServiceEnabled: zimbra
zimbraServiceEnabled: zimbraAdmin
zimbraServiceEnabled: zimlet
zimbraServiceEnabled: mailbox
zimbraServiceEnabled: spell
zimbraServiceEnabled: stats
<strong><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-luminous-vivid-orange-color">zimbraServiceEnabled: dnscache</mark></strong>
zimbraServiceInstalled: amavis
zimbraServiceInstalled: antivirus
zimbraServiceInstalled: antispam
zimbraServiceInstalled: opendkim
zimbraServiceInstalled: mailbox
zimbraServiceInstalled: mta
zimbraServiceInstalled: ldap
zimbraServiceInstalled: stats
zimbraServiceInstalled: logger
zimbraServiceInstalled: spell
zimbraServiceInstalled: snmp
<mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-luminous-vivid-orange-color"><strong>zimbraServiceInstalled: dnscache</strong></mark>
The result, should show “dnscache”.
Zimbra Disable or Remove Service
And now, We can remove dan disable it by doing command below.
zimbra@mail:~$ zmprov ms `zmhostname` -zimbraServiceEnabled dnscache
zimbra@mail:~$ zmprov ms `zmhostname` -zimbraServiceInstalled dnscache
Or, we want to just disable it. Just execute this command.
zimbra@mail:~$ zmprov ms `zmhostname` -zimbraServiceEnabled dnscache
After remove or disable service, we can check again.
zimbra@mail:~$ zmprov gs `zmhostname` zimbraServiceEnabled zimbraServiceInstalled
# name mail.habibza.in
zimbraServiceEnabled: amavis
zimbraServiceEnabled: antivirus
zimbraServiceEnabled: antispam
zimbraServiceEnabled: opendkim
zimbraServiceEnabled: logger
zimbraServiceEnabled: ldap
zimbraServiceEnabled: snmp
zimbraServiceEnabled: mta
zimbraServiceEnabled: service
zimbraServiceEnabled: zimbra
zimbraServiceEnabled: zimbraAdmin
zimbraServiceEnabled: zimlet
zimbraServiceEnabled: mailbox
zimbraServiceEnabled: spell
zimbraServiceEnabled: stats
zimbraServiceInstalled: amavis
zimbraServiceInstalled: antivirus
zimbraServiceInstalled: antispam
zimbraServiceInstalled: opendkim
zimbraServiceInstalled: mailbox
zimbraServiceInstalled: mta
zimbraServiceInstalled: ldap
zimbraServiceInstalled: stats
zimbraServiceInstalled: logger
zimbraServiceInstalled: spell
zimbraServiceInstalled: snmp
Viola, Dnscache
has disappeared.
Zimbra Add Or Enable Service.
If one day we want to add or re-enable it, we just give the ‘+’ parameter.
zimbra@mail:~$ zmprov ms `zmhostname` +zimbraServiceInstalled dnscache
zimbra@mail:~$ zmprov ms `zmhostname` +zimbraServiceEnabled dnscache
That is simple tips for Zimbra Mail Server add and remove/disable service from command line