habibzain Just husband, father and enthusiastic men about System Administration. Love to write short article about it. Perhaps can help and be useful for others.

Zimbra Add and Remove/Disable Service Command Line

1 min read

Add-and-Remove-Disable-Service-Command-Line

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”.

See also  Testing and Check Verified Expiration SSL from terminal

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

habibzain Just husband, father and enthusiastic men about System Administration. Love to write short article about it. Perhaps can help and be useful for others.

Zimbra Relay Amazon SES

Zimbra is a widely used collaboration platform that provides robust email services. When it comes to improving email deliverability and ensuring the security of...
habibzain
1 min read

Install Zimbra 10 Ubuntu 20.04 from Scratch

Zimbra 10 may have had specific installation requirements, and there might be updates or changes beyond that point. Here is simple guide how to...
habibzain
4 min read

Zimbra Cannot start TLS: handshake failure

The Zimbra log show error message “Cannot start TLS handshake” typically indicates an issue with establishing a secure TLS (Transport Layer Security) connection. This...
habibzain
1 min read

Leave a Reply

Your email address will not be published. Required fields are marked *

Never miss good article from us, get weekly updates in your inbox