2.1.8 Ensure message access server services are not in use

Information

dovecot-imapd and dovecot-pop3d are an open source IMAP and POP3 server for Linux based systems.

Unless POP3 and/or IMAP servers are to be provided by this system, it is recommended that the package be removed to reduce the potential attack surface.

Note: Several IMAP/POP3 servers exist and can use other service names. These should also be audited and the packages removed if not required.

Solution

Run one of the following commands to remove dovecot-imapd and dovecot-pop3d :

Run the following commands to stop dovecot.socket and dovecot.service and remove the dovecot-imapd and dovecot-pop3d packages:

# systemctl stop dovecot.socket dovecot.service
# apt purge dovecot-imapd dovecot-pop3d

- OR -

- IF - a package is installed and is required for dependencies:

Run the following commands to stop and mask dovecot.socket and dovecot.service :

# systemctl stop dovecot.socket dovecot.service
# systemctl mask dovecot.socket dovecot.service

Impact:

There may be packages that are dependent on dovecot-imapd and/or dovecot-pop3d packages. If dovecot-imapd and dovecot-pop3d packages are removed, these dependent packages will be removed as well. Before removing dovecot-imapd and/or dovecot-pop3d packages, review any dependent packages to determine if they are required on the system.

- IF - a dependent package is required: stop and mask dovecot.socket and dovecot.service leaving dovecot-imapd and/or dovecot-pop3d packages installed.

See Also

https://workbench.cisecurity.org/benchmarks/17074

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6, 800-53|CM-7, CSCv7|9.2

Plugin: Unix

Control ID: a5d8b5e2c97be11e16cd97c960d12a57319b867b6280fd993906d312435589a7