Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #178710 > unrolled thread

How to restart root sending emails?

Started bySharon Kimble <boudiccas@skimble.plus.com>
First post2017-03-12 12:00 +0100
Last post2017-03-13 19:50 +0100
Articles 6 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  How to restart root sending emails? Sharon Kimble <boudiccas@skimble.plus.com> - 2017-03-12 12:00 +0100
    Re: How to restart root sending emails? Andy Smith <andy@strugglers.net> - 2017-03-13 04:10 +0100
      Re: How to restart root sending emails? David Wright <deblis@lionunicorn.co.uk> - 2017-03-13 05:00 +0100
        Re: How to restart root sending emails? Andy Smith <andy@strugglers.net> - 2017-03-13 20:30 +0100
      Re: How to restart root sending emails? rhkramer@gmail.com - 2017-03-13 19:30 +0100
      Re: How to restart root sending emails? Sharon Kimble <boudiccas@skimble.plus.com> - 2017-03-13 19:50 +0100

#178710 — How to restart root sending emails?

FromSharon Kimble <boudiccas@skimble.plus.com>
Date2017-03-12 12:00 +0100
SubjectHow to restart root sending emails?
Message-ID<tk9od-ms-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

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.
Consequently root emails have seemingly not run my expected logwatch
this morning, and neither did it yesterday. I've googled but haven't
found anything useful.

So how do I restart root sending logwatch etc again please?

I'm getting emails from the cron daemon with no problems, but it seems
that root isn't sending them any more. I've rebooted, I've shut down and
then rebooted, but it still seems to be dead. So how do I restart root
sending logwatch etc again please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = http://www.drugfacts.org.uk  
Debian 8.6, fluxbox 1.3.5-2, emacs 25.1.1.1

[toc] | [next] | [standalone]


#178738

FromAndy Smith <andy@strugglers.net>
Date2017-03-13 04:10 +0100
Message-ID<tkowV-2th-1@gated-at.bofh.it>
In reply to#178710
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@skimble.plus.com

> 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.

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.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

[toc] | [prev] | [next] | [standalone]


#178740

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2017-03-13 05:00 +0100
Message-ID<tkpjk-2RV-5@gated-at.bofh.it>
In reply to#178738
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@skimble.plus.com
> 
> > 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,
etc.

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.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#178776

FromAndy Smith <andy@strugglers.net>
Date2017-03-13 20:30 +0100
Message-ID<tkDPl-58M-55@gated-at.bofh.it>
In reply to#178740
Hello,

On Sun, Mar 12, 2017 at 10:49:50PM -0500, David Wright wrote:
> On Mon 13 Mar 2017 at 03:05:31 (+0000), Andy Smith wrote:
> > 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.

[…]

> > 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,
> etc.

The file in question was actually /var/mail/mail and if it exists it
will be owned by mail:mail on Debian, though.

> 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.

It's where mail for root goes to if delivered locally to an mbox
format spool file. At no point does a /var/mail/root get created as
the system won't want to run an MDA as root and this also avoids
having to run an MUA as root to read it.

But best practice is to send root's email to a regular user or list
of users.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

[toc] | [prev] | [next] | [standalone]


#178771

Fromrhkramer@gmail.com
Date2017-03-13 19:30 +0100
Message-ID<tkCTh-4s7-41@gated-at.bofh.it>
In reply to#178738
On Sunday, March 12, 2017 11:05:31 PM Andy Smith wrote:
> 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@skimble.plus.com

Just for the sake of something (maybe collecting nits?), I believe this (that 
is, sending to  boudiccas@skimble.plus.com) will work only if (1) you have an 
email server installed (I'm pretty sure Debian does that by default, and (2) 
that email server is configured to send / relay mail via your ISP, which, ime, 
is not done by default on a Debian install.

Instead many (or at least some) of us have what I call a Windows style e-mail 
client, that is, one that sends emails to others on the Internet directly from 
that email client using, for example, SMTP.  I use kmail, getting my mail via 
pop3, and sending via SMTP.

[toc] | [prev] | [next] | [standalone]


#178773

FromSharon Kimble <boudiccas@skimble.plus.com>
Date2017-03-13 19:50 +0100
Message-ID<tkDcB-4C4-17@gated-at.bofh.it>
In reply to#178738

[Multipart message — attachments visible in raw view] — view raw

Andy Smith <andy@strugglers.net> writes:

> 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@skimble.plus.com
>
>> 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.
>
> 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.
>

Already done thanks Andy, and now that '/etc/alias' is changed I'm
getting all roots emails.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = http://www.drugfacts.org.uk  
Debian 8.6, fluxbox 1.3.5-2, emacs 25.1.1.1

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web