Forward root mail by updating /etc/aliases and
rebuilding the aliases database, then verify Postfix state and
inspect the queue by ID. Capture time and journald signals you
would include in incident evidence.
Ops wants all root mail forwarded to two
addresses. There is also a queued message that needs
inspection to confirm what is being sent and why it is stuck.
Root mail often contains cron output, service alerts, and local security notices. If it is not forwarded correctly, incidents get missed. Queue inspection is a core workflow for diagnosing outbound mail failures.
/etc/aliases to forward root
to two recipients.
newaliases.
mailq (or
postqueue -p).
postcat -q.
timedatectl.
journalctl -k.
/etc/aliases and the
compiled database used by Postfix.
systemctl is-active before queue work.
mailq
/
postqueue -p
.
postcat -q
(read-only view of queued content).
timedatectl
and configuration path confirmation.
journalctl -k
output.
sudo vim /etc/aliases
Add or update the
root
alias so messages are forwarded to both recipients.
root: admin@example.com, webmaster@example.com
Editing the file alone does not apply the change. Postfix uses the compiled aliases database.
sudo newaliases
This compiles
/etc/aliases
into the database file Postfix actually reads.
/etc/aliases: 86 aliases, longest 52 bytes, 948 bytes total
systemctl is-active postfix
You want a clean
active
signal before spending time on queue analysis.
active
mailq
Identify stuck messages, note the queue ID, and capture sender and recipient fields for evidence.
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
A1B2C3D4E5* 1468 Sun Jan 25 07:10:41 root@lab141
admin@example.com
-- 2 Kbytes in 1 Request.
If you prefer the native Postfix view, use
postqueue -p
. The queue ID is what matters for the next step.
sudo postcat -q A1B2C3D4E5
postcat -q
lets you inspect what is in the queue without attempting
delivery. This is useful for confirming headers, recipients,
and subject line during triage.
*** ENVELOPE RECORDS active ***
message_size: 1468
message_arrival_time: Sun Jan 25 07:10:41 2026
sender: root@lab141
recipient: admin@example.com
*** MESSAGE CONTENTS active ***
Subject: RHCSA-LAB141 queued test
This is a queued test message.
timedatectl
Capture the time zone and sync state as incident context, especially when mail timestamps and logs must correlate with external systems.
Time zone: America/New_York (EST, -0500)
System clock synchronized: yes
NTP service: active
ls -l /etc/chrony.conf
Confirming the active config path is a standard evidence step before making changes or escalating to time sync issues.
-rw-r--r--. 1 root root 1247 Jan 25 06:58 /etc/chrony.conf
journalctl -k -n 5
Kernel messages can provide context such as link state, driver resets, and audit signals that explain service behavior.
Jan 25 06:58:31 lab141 kernel: e1000e 0000:00:03.0 eth0: Link is Up 1000 Mbps Full Duplex
Jan 25 07:12:03 lab141 kernel: audit: type=1100 audit(...): pid=1 uid=0 ... unit=postfix ...
grep '^root:' /etc/aliases
This is a quick confirmation that the correct alias line is present.
root: admin@example.com, webmaster@example.com
You edited
/etc/aliases
but did not run
newaliases
. Rebuild the database and verify again.
That is not an error. It means there is nothing queued on this host at the moment.
The queue ID may be wrong, or the message was delivered or
removed. Re-run
mailq
and copy the exact ID.
Check the NTP sync state and confirm sources using chrony tooling if you need deeper evidence.
Leave the system in a safe state. If you modified aliases for lab testing, revert the line and rebuild the aliases database.
sudo vim /etc/aliases
sudo newaliases
systemctl is-active postfix || systemctl status postfix --no-pager
/etc/aliases
: Local alias map used for address rewriting.
newaliases
: Rebuilds the aliases database used by Postfix.
systemctl is-active postfix
: Returns a one-word service state for Postfix.
mailq
: Displays the Postfix mail queue.
postqueue -p
: Displays the Postfix mail queue (alternative view).
postcat -q <queueid>
: Displays a queued message by ID without attempting
delivery.
-q
: Read a queue file by ID.
timedatectl
: Shows time, timezone, and NTP synchronization state.
ls -l /etc/chrony.conf
: Confirms the chrony configuration file path exists.
/etc/chrony.conf
: Default chrony configuration file path.
journalctl -k -n <n>
: Shows the last
n
kernel messages from the system journal.
-k
: Limits output to kernel messages.
-n <n>
: Limits output to the last
n
entries.
grep '^root:' /etc/aliases
: Confirms the
root
alias line exists.
^
: Anchors the match to the start of the line.