[CentOS] logrotate: how to email logs with mutt?

Kingsly John member+centos at kingsly.net
Sat Dec 30 15:13:48 UTC 2006


+++ M. Fioretti [2006-12-30 13:29:45]:

> On Sat, Dec 30, 2006 17:15:24 PM +0530, Kingsly John
> (member+centos at kingsly.net) wrote:
> 
> > > next week I'll install logrotate on a centos 4.4 server via yum.
> > > The man page says that the default mail command is /bin/mail -s, but
> > > there is no such binary on Centos.
> > 
> > yum install mailx
> 
> Thanks. I _will_ do it if there really is no mutt solution, but I'd
> rather avoid it to keep the number of packages as small as possible,
> that's why I asked: since I already _have_ to have mutt on that box
> anyway...

mutt -x  <-- will enable compatibility with the "mail" command

"mail" is a system command (it's /bin/mail and not /usr/bin/mail) .. and lots
of programs expect it to be present.

I don't know how you don't have the mail command on your system because it's
needed by stuff like cron/at etc too.(or even logrotate for that matter)

Installing mailx is the best solution, your argument of not wanting to
install extra packages doesn't exactly hold true in this case.

In all likelihood you currently have a broken system where you don't get any
notification when cron/at jobs fail etc.

Kingsly

-- 
---------------------------------------------------------------------------
     Kingsly At Users Dot SourceForge Dot Net  -- http://kingsly.org/
---------------------------------------------------------------------------



More information about the CentOS mailing list