How to permanently disable Dovecot

Hi. I don’t want CP to do any email. Disabling Postfix was easy, but I still see Dovecot listening on email ports. I’m running Ubuntu 20 LTS.

systemctl stop dovecot
systemctl disable dovecot

Disabling the Dovecot service with the above commands worked, and survived a reboot, but 24 hours later it was running and listening on ports again.

What’s the CyberPanel approved and working method of doing this?

Hello @timbr Happy you are here

Seems you installed watchdog

bash /etc/cyberpanel/watchdog.sh kill 
# OR 
watchdog kill
# RUN THIS AFTER
rm -f /usr/local/bin/watchdog

Thank you! I completely forgot about Watchdog.

However, removing Watchdog just because I don’t want it to monitor Dovecot is overkill. Surely we can modify what programs Watchdog watches?

When I run watchdog it refers to /etc/cyberpanel/watchdog.sh, and that file has the following code at the top:

SERVICE_LIST=(
        "LiteSpeed" "lsws" "lsws;web;litespeed;openlitespeed"
        "MariaDB" "mariadb" "mariadb;database;mysql"
        "PowerDNS" "pdns" "powerdns;dns"
        "Dovecot" "dovecot" "dovecot;imap;pop3"
        "PostFix" "postfix" "postfix;smtp"
        "Pure-FTPd" "pure-ftpd" "pureftpd;pure-ftpd;ftp"
)

Can I comment the Dovecot line out with a # (hash) in this file to make the desired change?
Deleting the line is also acceptable, but commenting is less destructive.

By all means please do that:

SERVICE_LIST=(
        "LiteSpeed" "lsws" "lsws;web;litespeed;openlitespeed"
        "MariaDB" "mariadb" "mariadb;database;mysql"
        "PowerDNS" "pdns" "powerdns;dns"
      #"Dovecot" "dovecot" "dovecot;imap;pop3"
        "PostFix" "postfix" "postfix;smtp"
        "Pure-FTPd" "pure-ftpd" "pureftpd;pure-ftpd;ftp"
)

OR

 # "Dovecot" "dovecot" "dovecot;imap;pop3"
SERVICE_LIST=(
        "LiteSpeed" "lsws" "lsws;web;litespeed;openlitespeed"
        "MariaDB" "mariadb" "mariadb;database;mysql"
        "PowerDNS" "pdns" "powerdns;dns"     
        "PostFix" "postfix" "postfix;smtp"
        "Pure-FTPd" "pure-ftpd" "pureftpd;pure-ftpd;ftp"
)

Then run

$ watchdog kill
$ /etc/cyberpanel/watchdog.sh lsws
# will start watchdog back up

Thanks.

The command to get Watchdog back up and running does not seem to want to end:

Kill the process by CTRL + C its up. Confirm by running

$ watchdog status

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.