0

The permissions on my root mailbox /var/spool/mail/root (with user root:mail) are reset from -rw-rw---- to -rw------- whenever "Mail Delivery Subsystem [email protected]" sends a message to it.

This prevents mail sent to [email protected] from arriving in the root mailbox (instead it arrives at the fallthrough mailbox). When permission is reset to -rw-rw---- such mail does arrive at root, but the next delivery from "Mail Delivery Subsystem" changes the permission back to -rw-------

My mail setup uses sendmail and procmail on a Amazon Linux OS. Trying to diagnose the problem with "auditctl -w /var/spool/mail/root -p rwxa" did not produce any audit records. Have examined sendmail and procmail config files but do not see any lines which might bear on this. Googling did not provide any answers. Would appreciate any advice on where to look to solve problem.

1 Answer 1

1

Mailbox owned by root account itself => bad idea

root's "super powers" should not be required to read emails to root.
Creating needless risk should be avoided.

You SHOULD create alias redirecting email addressed to too to non privileged account.

/etc/mail/aliases

root: name-of-non-privileged-account

WARNING: sendmail requires running command newaliases after modifying aliases file.

2
  • Is there a "why" that is a bad idea ??
    – user48297
    Nov 21, 2020 at 17:07
  • @user48297 I have added short explanation,
    – AnFi
    Nov 21, 2020 at 18:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .