Enable or exclude mailbox scanning
cPFence v4+ mailbox scans check messages and attachments separately from website files. Messages larger than 10 MB are skipped and counted in the scan log. For security, hard-linked message files are skipped too; these skips are expected and cannot be turned off.
Enable or disable scanning
Section titled “Enable or disable scanning”- Open Threat & Malware Detection and choose one server.
- Open Settings, set Email Scanning, then Save.
- Review mail counts and errors in full/smart scan output.
Root administrators can use:
| Action | Command |
|---|---|
| Enable mailbox scanning | cpfence --enable-mail-scan |
| Disable mailbox scanning | cpfence --disable-mail-scan |
Exclude one mailbox
Section titled “Exclude one mailbox”Identify the mailbox’s actual absolute directory before adding an exception. As root, replace the example with that directory:
| Action | Command |
|---|---|
| Add exact-path exception | cpfence --exclude-exact-path /var/local/enhance/email/mailboxes/CONTAINER/MAILBOX |
| Remove exact-path exception | cpfence --del-exclude-exact-path /var/local/enhance/email/mailboxes/CONTAINER/MAILBOX |
The second command reverses the exception. Excluding a mailbox skips its messages; it does not make them safe. See email quarantine and mail scheduling.
If mail signatures stop updating
Section titled “If mail signatures stop updating”Mailbox scanning uses cPFence’s mail signatures together with the server’s own ClamAV virus database, which ClamAV’s clamav-freshclam service keeps up to date. If that service is stopped, the ClamAV database gets old. When it is more than 7 days old, cPFence warns that the server’s ClamAV virus database is out of date and names the fix. Before cPFence 4.0.16, the mail signature refresh failed instead and kept the previous signatures.
As root on the affected server, turn ClamAV’s updates back on, then refresh the mail signatures:
systemctl enable --now clamav-freshclamcpfence --mail-signatures-updateA successful refresh prints Mail signatures updated. Otherwise, the next hourly mail scan run refreshes them.

