Web lists-archives.com

Re: How to restart root sending emails?

On Mon 13 Mar 2017 at 03:05:31 (+0000), Andy Smith wrote:
> Hi Sharon,
> On Sun, Mar 12, 2017 at 10:55:05AM +0000, Sharon Kimble wrote:
> > In an effort to get gnus to read root emails I've chowned
> > /var/mail/mail, added myself to the 'mail' group, changed the
> > permissions of /var/mail/mail, and generally frigged around with it.
> That is not a good way to go about achieving this.
> A better way to achieve the goal of being able to read emails to
> root would be to edit /etc/aliases so that it contains something
> like:
> root: sharon
> where "sharon" is your local user name.
> That would cause email for root to be redirected to your username
> where you could read it with your usual mail reading software. If
> you don't read email locally then you could probably instead send it
> to the email address you have used here:
> root: boudiccas@xxxxxxxxxxxxxxxx
> > So how do I restart root sending logwatch etc again please?
> I would start by putting the correct ownership and permissions back
> on /var/mail/mail. It is normally owned by mail:mail with mode 0600.

It might make it clearer to write:
/var/mail/foo is owned by foo:mail with mode 0600,
/var/mail/bar is owned by bar:mail with mode 0600,

I would just add that I don't think I've ever had mail sent to user
"mail" by anything, and so I've never observed a file called /var/mail/mail.
That may be totally unimportant; obviously if mail _does_ arrive for
user "mail", such a file will get created.

> If that doesn't help, try looking at the logs of your mail server
> when you expect the emails to be sent. If using exim, that would be
> /var/log/exim4/mainlog and /var/log/exim4/paniclog.

I would also take yourself out of the "mail" group.