8 - How to Install/Remove MailScanner on CyberPanel

MailScanner is an open-source email security system. It is designed for Linux-based email gateways. CyberPanel provides you with one-click MailScanner installer.

Follow this guide to install or remove MailScanner

How to install MailScanner using CyberPanel:

The installation process of MailScanner is very easy and short using CyberPanel.

First, in the menu go to the Mail Settings → MailScanner

You can see an install button on this screen, press the Install button to start the installation**.**

Once the installation process is done you can see the Access button on this screen.

Press the Access button and it will take you to the MailScanner login screen.

the URL for MailScanner login is

https://<SERVERIP>:8090/mailwatch/mailscanner/login.php

How to get UserName and Password for MailScanner:

The default login access for MailScanner is

Username: admin

Password: Password for your admin user on CyberPanel.

You can also create new user by running the following query on PHPMyAdmin or via MySQL CLI:

INSERT INTO mailscanner.users SET username = '<username>', password = MD5('<password>'), fullname = '<Full Name>', type = 'A';

Replace , and in the query above according to your requirements.


How to remove MailScanner

You can remove MailScanner by running following commands on CLI:

chmod +x /usr/local/CyberCP/CPScripts/mailscanneruninstaller.sh
/usr/local/CyberCP/CPScripts/mailscanneruninstaller.sh

Emails stop working after installing MailScanner

If you can’t send or receive emails after installing MailScanner use our troubleshooting guide. You can also temporarily stop MailScanner processing by opening

/etc/postfix/main.cf

and removing following line from this file

header_checks = regexp:/etc/postfix/header_checks

after removing this line run

systemctl restart postfix

and you should be able to send emails again.

i am using mailscanner. i have enabled storing spam & non spam emails by adding “store” in spam action config. its storing the emails in quarantine folder, but in mailwatch panel, quarantine action not showing, also in release its showing: Message not found in quarantine.

if its just a 1 click install any reason why no emails are showing
fresh install of Cyberpanel all up to date
Email working no issues, and Spammassion working fine and RSPAMD working no issues

i have the same issues.
i also found out that mailscanner needs to have mariadb devel and a module otherwise the tab recent messages won’t work. these are the commands:
dnf install mariadb-connector-c-devel
cpan DBD::MariaDB
systemctl restart mailscanner

i’m trying to look an easy way to filter spam (instead of sieve) but this gives me another headache…
In software version i have:
Postfix Version: postconf not found
and spamassasin version is completely missing (even though mailscanner can’t be installed without spamassassin)

and still don’t know how to filter spam and put it in quarantine…