← All rules
SOCLE-CLD-PKG-028// Packagesmediuminventory state

Uninstall dovecot Package

Ensures the Dovecot IMAP/POP3 mail-delivery server is not installed on hosts that do not serve mailboxes.

Checked against what is installed or registered, packages present/absent, account databases.

A pass proves✓ running now✓ on disk✓ survives rebootthe qualified verdict →
Debian 12CIS 1.1.0Debian 13CIS 1.0.0FedoraRHEL 10 / Rocky 10 / AlmaLinux 10RHEL 8 / Rocky 8 / AlmaLinux 8CIS 4.0.0RHEL 9 / Rocky 9 / AlmaLinux 9CIS 2.0.0Ubuntu 22.04CIS 3.0.0Ubuntu 24.04CIS 1.0.0Ubuntu 26.04
One check, maps to 1 standard

A mapping is a cross-reference to where each standard places this requirement, anchored and cross-validated, not a claim of equivalence. A passing check is evidence toward these references, how to read it.

Why this rule matters

If there is no need to make the Dovecot software available, removing it provides a safeguard against its activation.

What Pavois checks

Pavois verifies that the dovecot package is absent via the package manager. Removing the package guarantees the IMAP/POP3 daemon cannot be started or auto-enabled, which is stronger than disabling a service that could later be re-activated and still carries CVEs while installed.

describe package('dovecot-core') do
  it { should_not be_installed }
end

How to verify it is applied

On Debian/Ubuntu run dpkg -s dovecot-core; on RHEL family run rpm -q dovecot. Both should report the package is not installed. Confirm nothing listens on IMAP/POP ports with ss -tlnp | grep -E ':(143|993|110|995)'.

Inspect & investigate

Confirm removal with dpkg -l dovecot-core or rpm -q dovecot; while present, Dovecot logs to /var/log/mail.log and via journalctl -u dovecot.

Remediation

Pavois's harden plan removes the dovecot package (resource package, action remove) and is applied with pavois harden apply.

Pavois applies this with its own harden engine, the plan below, not a shell script:

actionremove
namedovecot-core
resourcepackage
pavois harden plan local

where the target is local, a user@host SSH alias, or a container , Docs

Impact & precautions

Removing Dovecot disables IMAP/POP3 mailbox access it provided. Before applying, confirm the host is not a mail server and that no clients retrieve mail from it; on a dedicated mail server this rule should be exempted. On general-purpose hosts there is no impact.

Standards mapping

StandardReferenceTypeVersionConfidence
CIS2.1.8directper OS, see the benchmark tablehigh

Each reference is a cross-reference anchored in the upstream benchmark and cross-validated against the SCAP Security Guide and ansible-lockdown, not a claim of equivalence. Direct = a prescriptive, line-level requirement; supporting = an abstract control family (NIST) the check provides evidence toward. How to read a mapping.

Sources & references