mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
This is when uninstalling Mailscanner. Still need to initially configure for Postfix and when Mailscanner is installed, through Mailscanner.
32 lines
716 B
Bash
32 lines
716 B
Bash
#!/bin/bash
|
|
## Uninstall Mailscanner CyberPanel
|
|
|
|
if [ -f /etc/os-release ]; then
|
|
OS=$(head -1 /etc/os-release)
|
|
UBUNTUVERSION=$(sed '6q;d' /etc/os-release)
|
|
CENTOSVERSION=$(sed '5q;d' /etc/os-release)
|
|
CLNVERSION=$(sed '3q;d' /etc/os-release)
|
|
fi
|
|
|
|
systemctl stop mailscanner
|
|
|
|
if [ "$OS" = "NAME=\"Ubuntu\"" ]; then
|
|
apt purge -y mailscanner
|
|
|
|
elif
|
|
[ "$OS" = "NAME=\"CentOS Linux\"" ]
|
|
then
|
|
yum remove -y MailScanner
|
|
|
|
elif [ "$OS" = "NAME=\"CloudLinux\"" ]; then
|
|
yum remove -y MailScanner
|
|
|
|
fi
|
|
|
|
sed -i 's/\/^Received:\/ HOLD/\/^Received:\/ IGNORE/g' /etc/postfix/header_checks
|
|
rm -rf /etc/MailScanner
|
|
rm -rf /usr/share/MailScanner
|
|
rm -rf /usr/local/CyberCP/public/mailwatch
|
|
|
|
systemctl restart postfix dovecot
|