[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to read mail addressed to "root" from "root" user?



(this isn't about Debian development anymore. I've added a Cc to
debian-user; if you have any follow-up questions, please drop the -devel
Cc).

On Mon, Aug 31, 2015 at 08:44:04PM +0300, Jayson Willson wrote:
> Thank you very much for your answer!
> Could you please tell me, why is it recommended to forward root's mail to
> regular user? I sometimes log in as root on tty or via sudo to administer
> system, and thus I would be able to have root's and user's mailboxes
> separated, while still reading root's mail.

Just have your system deliver it in a separate mailbox, then.

If you have the "allow_filter" option in your userforward router
enabled, you can do that by creating a file ~/.forward with the
following content:

# Exim filter <== do not remove this, exim checks it
if $h_to: contains "root"
then
  save /path/to/Maildir/rootmails/
  finish
endif

with the default exim config, this will cause it to be delivered in a
maildir with the given path name.

You can then read it with

mutt -f /path/to/Maildir/rootmails

as the normal user, rather than as root.

(or you could set up an IMAP server, yada yada)

> Is there anything that I have missed?

The security implications of using a MUA as root.

If there is an exploitable bug in your MUA, you may end up with a
compromised system.

-- 
It is easy to love a country that is famous for chocolate and beer

  -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26


Reply to: