If I understand your comments correctly, you're getting emails from some automated system into root's local spool warning of errors with some other subsystem (email authentication), and you want NAGIOS to be able to look for those. Presumably, you've got or written some NAGIOS plugin that checks root's email spool for these; let's call it
The issue is ensuring that the plugin has the right permissions to read the mailbox file, which you've been trying to do by adjusting the ownership of root's mail spool file. That's probably not the best way to do this.
Either you need to run the plugin under
sudo, or you need to modify the original jobs that generate these errors so that the replies come to somewhere other than
root@localhost. The latter is beyond the scope of this answer, as you've told us nothing about the jobs that generate these bounces.
If you go for the former, it has two steps; running the plugin under sudo, and having sudo permit it.
To do the first part, if you're running under NRPE, put some line like
nrpe.cfg, adjusting paths accordingly. If you're running NAGIOS on the system itself, put a
check_command such as
command_line /usr/bin/sudo $USER1$/check_root_mbox
in your config, and use it. Then for the second part, put a line like
nagios ALL=(root) NOPASSWD: /usr/lib/nagios/plugins/check_root_mbox
sudoers file, again adjusting paths accordingly.