Page 1 of 1

How to read system (root) mail?

Posted: 18 Aug 2009, 10:18
by jonj1
Hi,

I've had the bubba2 for almost a year and it's working fine, but the root partition is very nearly full...

Code: Select all

bubba:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              9698348   9177004     32568 100% /
It seems this is down to rather a lot of system mail (6GB) under /root/Mail

Code: Select all

bubba:~# du -sk /root/Mail/
6736632	/root/Mail/
Before I delete the folder, I'd like to view the messages in a mail client. Can anyone suggest a way of doing this? I installed 'nail' but is simply says 'no mail for root user' and exits

cheers,

Re: How to read system (root) mail?

Posted: 20 Aug 2009, 03:28
by pcrene
Hellol

I had the same problem so i changed /etc/aliasses so that all root@bubba is sent to my own account.

add a line:

root: <yourname>

and than run: newaliasses

Rene

Re: How to read system (root) mail?

Posted: 20 Aug 2009, 09:07
by jonj1
pcrene wrote: add a line:

root: <yourname>

and than run: newaliasses
Rene,

That's what I needed, thanks! Now that I can read them I stand some chance of fixing whatever it was that sent so many...

cheers,
Jon

Re: How to read system (root) mail?

Posted: 20 Aug 2009, 12:59
by carl
6GB mail to root seems to be really a lot, as a normal root mail is under 1KB, this would account of millions of mail...

Re: How to read system (root) mail?

Posted: 20 Aug 2009, 14:12
by jonj1
jonj1 wrote:6GB mail to root seems to be really a lot, as a normal root mail is under 1KB, this would account of millions of mail...
There were about 75,000! Basically the problem arose because I'd added a database to MySQL and in the process broken horde. Since I don't use horde I just left it, not realising the '/etc/cron.d/bubba-horde' cron job was then sending error emails of 232K each, every 5 minutes! Here's an example:
Subject: Cron <root@bubba> test -x /usr/bin/php && /usr/bin/php /usr/share/horde3/scripts/alarms.php

A fatal error has occurred

DB Error: connect failed

[line 723 of /usr/share/horde3/lib/Horde/Group/sql.php]

Details:
The full error message is logged in Horde's log file, and is shown below only to administrators. Non-administrative users will not see error details.
DB_Error Object
(
[error_message_prefix] =>
[mode] => 1
[level] => 1024
code] => -24
[message] => DB Error: connect failed
[userinfo] => [nativecode=Access denied for user 'root'@'localhost' (using password: NO)] ** Array
[backtrace] => Array
(
[0] => Array

.......

232K of code...
There were also error emails like
[userinfo] => [nativecode=Access denied for user 'horde'@'localhost' (using password: YES)] ** Array
[4] => [nativecode=Access denied for user 'horde'@'localhost' (using password: YES)]
[3] => [nativecode=Access denied for user 'horde'@'localhost' (using password: YES)]
I've commented out the cron job now and, with the help of Rene, redirected system mail to my user so / won't fill up again so it's fixed as far as I'm concerned.

I don't know anything about MySQL so I'm not sure what broke horde. Admittedly I set up a database for the 'Bibus' reference manager and had to change something to give me remote access - it's probably that. Not worth our time at the moment to get into ...