# You have mail in /root/

## newbie_gentoo

Hello.

I keep getting this message while logging in as root, and it keeps repeating itself during use.

Sadly, I don't have a /var/spool/mail or ~/.maildir and I don't know where the mail is going!

I tried to emerge mutt, but it just creates a .maildir in root's home, and no mail is getting through there.

Any suggestions?

Thanks

----------

## 30726

Could you post the output of ls -al /root

----------

## gungholady

I'm getting the same thing. I have my system messages set up to go to user. I am getting mail this way from cron jobs. I can't find the mail this is talking about. I have looked all through the /root/ directory. 

Here is my output of ls -al /root:

total 700

drwx------  35 root root   2728 Nov  3 05:19 .

drwxr-xr-x  23 root root    528 Oct 25 05:48 ..

-rw-------   1 root root    304 Nov  3 05:18 .ICEauthority

-rw-r--r--   1 root root  22520 Jan  6  2004 .RealNetworks_RealMediaSDK_60

-rw-r--r--   1 root root    801 Jan  6  2004 .RealNetworks_RealPlayer_60

-rw-r--r--   1 root root     84 Jan  6  2004 .RealNetworks_RealShared_00

drwx------   2 root root     48 Jun 12 07:24 .Trash

-rw-------   1 root root    104 Oct 11 14:37 .Xauthority

drwx------   2 root root    104 Jan  7  2004 .alsaplayer

-rw-r--r--   1 root root    133 Sep 27 08:00 .asoundrc

-rw-------   1 root root   9223 Nov  3 04:12 .bash_history

-rw-r--r--   1 root root    231 Aug  4 10:35 .bash_profile

-rw-r--r--   1 root root    909 Aug  5 16:52 .bashrc

-rw-r--r--   1 root root    912 Aug  5 16:52 .bashrc~

drwxr-xr-x   2 root root     72 Sep 15 21:45 .ccache

drwx------   3 root root     72 Mar  3  2004 .config

-rw-------   1 root root     75 Jan 20  2004 .cvspass

-rw-------   1 root root     26 Oct  2 07:50 .dmrc

-rw-------   1 root root     16 Apr  8  2004 .esd_auth

drwxr-xr-x   3 root root     72 Feb 13  2004 .fltk

-rw-r--r--   1 root root 128459 Sep 10 02:49 .fonts.cache-1

-rw-------   1 root root      5 May 19 03:12 .fonts.cache-1.TMP-9OHZmR

-rw-------   1 root root      6 May 27 05:40 .fonts.cache-1.TMP-PbWUWp

-rw-------   1 root root      5 Jul 24 06:13 .fonts.cache-1.TMP-UQptAC

-rw-------   1 root root      6 Jan  7  2004 .fonts.cache-1.TMP-hpEfuB

-rw-r--r--   1 root root   1614 Sep  4 17:35 .fonts.conf

-rw-r--r--   1 root root      2 Sep  4 17:35 .fonts.conf~

drwx------   2 root root     48 Aug 12 06:02 .gconf

drwxr-xr-x   2 root root     80 Aug 12 06:23 .gconfd

drwx------   3 root root     72 Oct  9 21:42 .gnome

drwx------   4 root root     96 Oct  9 21:42 .gnome2

drwx------   2 root root     48 Jul 19 09:45 .gnome2_private

-rw-------   1 root root    423 Jul  8 04:00 .gnomerc-errors

drwxr-xr-x   2 root root     80 Jan 31  2004 .gstreamer

drwxr-xr-x   2 root root     80 Oct 23 04:28 .gstreamer-0.8

-rw-r--r--   1 root root    261 Jul 19 21:53 .gtkrc-2.0

lrwxrwxrwx   1 root root      7 Oct  9 21:41 .kde -> .kde3.3

drwx------   3 root root    200 Oct  9 21:41 .kde.backup

drwx------   3 root root     72 Jul 18 22:45 .kde3.2

drwx------   5 root root    232 Oct  2 07:51 .kde3.3

drwxr-xr-x   4 root root    208 Jul 23 19:22 .kdecvs

-rw-------   1 root root    160 Oct  2 07:51 .kderc

-rw-r--r--   1 root root      0 Nov  1 22:34 .keep

drwx------   3 root root     72 Oct 18 15:26 .local

-rw-r--r--   1 root root   3518 Oct  9 21:42 .mailcap

drwxr-xr-x   3 root root    168 Jan  5  2004 .mc

drwxr-xr-x   3 root root    112 Jan 10  2004 .mcop

-rw-------   1 root root     31 Nov  1 22:29 .mcoprc

-rw-r--r--   1 root root   1270 Oct  9 21:42 .mime.types

drwxr-xr-x   3 root root    128 Mar 25  2004 .mozilla

drwxr-xr-x   3 root root     72 Jan 30  2004 .netscape

drwxr-xr-x   3 root root     72 Jan 30  2004 .netscape6

drwxr-xr-x   3 root root     72 Oct  9 21:42 .openoffice

drwxr-xr-x   3 root root    128 Jan  5  2004 .phoenix

-rw-------   1 root root      2 Apr 21  2004 .prxsHpveN

drwx------   6 root root    256 Apr  1  2004 .pysol

drwxr-xr-x   2 root root    248 Jul  7 22:46 .qt

-rw-------   1 root root  54192 Jul 11 20:31 .recently-used

drwxr-xr-x   2 root root    104 Oct 21 05:03 .revcheck

drwxr-xr-x   3 root root    152 Jun 16 12:13 .subversion

-rw-r--r--   1 root root     64 Oct  9 21:42 .sversionrc

drwx------   5 root root    120 Apr  3  2004 .thumbnails

drwx------   2 root root     48 Jan  5  2004 .thunderbird

-rw-------   1 root root    118 Apr 21  2004 .twmtTkOkO

-r--r--r--   1 root root     20 Jan  6  2004 .verm

-rw-r--r--   1 root root   4085 Oct 11 14:37 .win4lin-installer.out

-rw-------   1 root root     55 Sep 28 05:21 .xauth9xDkiY

-rw-------   1 root root     55 Oct  2 05:18 .xauthBtltW0

-rw-------   1 root root     55 Sep 23 03:50 .xauthOTjdDb

-rw-------   1 root root     55 Oct  2 08:22 .xauthOv3jUs

-rw-------   1 root root     55 Nov  3 05:19 .xauthQKG0a6

-rw-------   1 root root     55 Oct 26 05:20 .xauthQuY1Tt

-rw-------   1 root root     55 Nov  3 04:37 .xauthVJfWkD

-rw-------   1 root root     55 Sep 28 05:18 .xauthaN8I3I

-rw-------   1 root root     55 Oct 27 04:29 .xauthfkjwO5

-rw-------   1 root root     55 Oct  2 07:07 .xauthkOCoo5

-rw-------   1 root root     55 Oct  3 19:56 .xauthxWF1K4

-rw-------   1 root root     55 Sep 28 05:06 .xauthzhTJtz

drwx------   2 root root     48 Jan 21  2004 .xcdroast

-rw-r--r--   1 root root  10225 Jun 14 16:56 .xscreensaver

-rw-------   1 root root  24955 Oct  9 21:45 .xsession-errors

-rw-r--r--   1 root root   1910 Jan 16  2004 .xsession-errors~

-rw-r--r--   1 root root     92 Apr 10  2004 .xshisenrc

-rw-------   1 root root    392 Apr 21  2004 .xsmuF93WR

drwx------   3 root root    272 Apr  1  2004 Desktop

drwx------   7 root root    520 Feb 14  2004 Mail

-rw-r--r--   1 root root    414 Sep 27 07:53 asoundrc

lrwxrwxrwx   1 root root     12 Aug  7 01:27 nvidia* -> /dev/nvidia*

-rw-r--r--   1 root root 258554 Oct 11 14:41 w4l-install.log

----------

## To

 *Quote:*   

> drwx------ 7 root root 520 Feb 14 2004 Mail

 

Try there.

Tó

----------

## 30726

Why are you using root do what you can do as a normal user? That kinda brings the security of your system down to the same level as Windows...

----------

## gungholady

I already tried there. The new, current, and tmp inboxes are empty. The same goes for trash. That was the first place I looked.

----------

## gungholady

 *tln wrote:*   

> Why are you using root do what you can do as a normal user? That kinda brings the security of your system down to the same level as Windows...

 

I get this message when I have su - root to do emerges or to install a new kernel. That is the only time and only way I log in as root. The rest of the time it is just as my normal user which has an alias under postfix to receive system messages. I get the messages re cron jobs as my normal user every morning.

----------

## transienteagle

gungholady/newbie_gentoo

What happens once you log in as root, and type mail at the command line.

(I'am going back in time here ........ so please forgive me if nothing happens.)

Let me know

rgds

TE

----------

## gungholady

I get a no mail message. If I su - root and type mail I get /root/: Is a directory

----------

## griun

 *gungholady wrote:*   

> I get a no mail message. If I su - root and type mail I get /root/: Is a directory

 

```
unset MAIL
```

----------

## gungholady

Thanks, I'll try that.

----------

## C.M

Hmm.. Also got this problem, but the "unset MAIL" command got it to stop. Why did it happen? Something in the new baselayout or so? Never had it before, first time this evening.  :Confused: 

----------

## ryceck

 *C.M wrote:*   

> Hmm.. Also got this problem, but the "unset MAIL" command got it to stop. Why did it happen? Something in the new baselayout or so? Never had it before, first time this evening. 

 

Same here... havent got anything in /var/spool/mail or anything regarding mail in my /root.

What is this   :Confused: 

----------

## Paranoid

Here too, it's freaking me out   :Shocked: 

----------

## psyqil

Me too...  :Confused: 

----------

## karmapolice

werd...   :Sad: 

----------

## arskq

I had and partially still have the same problem. After 'unset MAIL' root stopped getting the notice. But this happens to regular user(s) as well.

Especially after a longish ssh session it's really annoying, nothing but "You have new mail." messages for 2-3 seconds.

----------

## darkphader

Same problem here.

----------

## elmicha

I have the same problem - the MAIL environment variable is magically and wrongly set to the home directory of the user.

I don't set MAIL anywhere in /etc or in ~/.*

I suspect it started after emerging shadow-4.0.5. 

```

root> strings /bin/su|grep MAIL

MAIL=

QMAIL_DIR

MAILDIR

MAIL

MAIL_FILE

MAIL_CHECK_ENAB

```

----------

## wlm2048

The same thing just started happening to me too after I upgraded to the new shadow.

I'll dig around and see what I can see.

----------

## nonotme

same problem here. seems to have started after upgrading to shadow-4.0.5-r2.

----------

## wlm2048

OK, i found this page and based on the info in it, added:

```
MAIL_DIR /var/spool/mail

```

to /etc/login.defs

Logged out/logged in, and so far no more new messages, but they were pretty random to begin with so it may just be coincidence.

----------

## nonotme

it appears that /etc/login.defs should have a line 

```
MAIL_CHECK_ENAB    no
```

but does not. shadow-4.0.5-r2.ebuild should apply a patch (files/shadow-4.0.5-login.defs.patch) to that affect, but it's obviously not working.

----------

## Paranoid

Have you tried this nonotme? Perhaps a bug report is in order here.... I'm going to try it out and see if it solves this.

----------

## elmicha

I'm not sure whether the files/shadow-4.0.5-login.defs.patch works, but anyways, the login.defs.linux is not installed if we have USE="pam" (which I have, and I guess it's also the default).

```

        if use pam ; then

...

        else

                insinto /etc

                insopts -m0644

                newins etc/login.defs.linux login.defs

```

----------

## toralf

I am not sure but might be that this problem is related to update of shadow ? Here is a bug report: https://bugs.gentoo.org/show_bug.cgi?id=70101#c4

----------

## DivineHawk

Upgraded from shadow 4.0.5-r2 to 4.0.6. Fixed it.

----------

