Configure System to Forward All Mail From Postmaster to The Root Account
An XCCDF Rule
Description
Verify the administrators are notified in the event of an audit processing failure. Check that the "/etc/aliases" file has a defined value for "root".
$ sudo grep "postmaster:\s*root$" /etc/aliases postmaster: root
Rationale
It is critical for the appropriate personnel to be aware if a system is at risk of failing to process audit logs as required. Without this notification, the security personnel may be unaware of an impending failure of the audit capability, and system operation may be adversely affected. Audit processing failures include software/hardware errors, failures in the audit capturing mechanisms, and audit storage capacity being reached or exceeded.
- ID
- xccdf_org.ssgproject.content_rule_postfix_client_configure_mail_alias_postmaster
- Severity
- Medium
- References
- Updated
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
if [ -e "/etc/aliases" ] ; then
LC_ALL=C sed -i "/^\s*postmaster\s*:\s*/Id" "/etc/aliases"
Remediation - Ansible
- name: Configure System to Forward All Mail From Postmaster to The Root Account
block:
- name: Check for duplicate values
lineinfile:
path: /etc/aliases