From owner-freebsd-questions@FreeBSD.ORG Sat Oct 4 09:16:24 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D82316A4B3 for ; Sat, 4 Oct 2003 09:16:24 -0700 (PDT) Received: from mtaw4.prodigy.net (mtaw4.prodigy.net [64.164.98.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id EDCA843FBF for ; Sat, 4 Oct 2003 09:16:23 -0700 (PDT) (envelope-from mbsd@pacbell.net) Received: from atlas (adsl-64-165-199-197.dsl.snfc21.pacbell.net [64.165.199.197]) by mtaw4.prodigy.net (8.12.9/8.12.3) with ESMTP id h94GGDIF016637; Sat, 4 Oct 2003 09:16:15 -0700 (PDT) Date: Sat, 4 Oct 2003 09:16:13 -0700 (PDT) From: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= X-X-Sender: mikko@atlas.home To: Fernan Aguero In-Reply-To: <20031004132917.GA59363@iib.unsam.edu.ar> Message-ID: <20031004085834.M3248@atlas.home> References: <20031003210850.GE28891@iib.unsam.edu.ar> <1065221495.1847.11.camel@butters> <20031004132917.GA59363@iib.unsam.edu.ar> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Mailing Lists Catcher cc: freebsd-questions@freebsd.org Subject: Re: explain annoying "You have XXX mail messages" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2003 16:16:24 -0000 On Sat, 4 Oct 2003, Fernan Aguero wrote: > +----[ Mailing Lists Catcher (03.Oct.2003 19:53): > | > | I don't know if this applies now but before I ran my own mail server I > | used to see that sort of thing after I su'd so another account. For > | instance if I logged in as but su'd to a root it would tell me I > | had mail but when I used the mail command it said no mail for . I > | forget how I was able to read root mail but I think it had something to > | do with using su -m... > > Hi! > > Thanks for the reply. > > Yes I know this happens ... I can su to other users and see > the 'You have mail.' message. However if I read mail for > that user, and say, delete all messages, after I exit > (/var/mail/user is now an empty file) and reenter I don't > see this message anymore. > > | Anyhow root normally gets mail all the time from crontab and periodic > | daily/weekly/monthly/security runs. > | > | Or Have a look in var/mail/root and others to see who has the mail. > | Also use the mail command on the account you get the messages from next. > > I'm using the default sendmail that comes with freebsd. All > mail to root gets redirected to me (alias root: > fernan@localhost). And yes, I receive all the mails from > root's cron jobs and periodic scripts. Still, > /var/mail/fernan is empty all the time (I use procmail to deliver to > ~/mail/inbox), and there's no /var/mail/root (since it is > redirected to myseldf). All other users in the system have > empty /var/mail/$USER files, since I'm the only user in the > system :) > > So ... I'm still intrigued: > > i) I don't get 'You have mail.' but 'You have 50 mail > messages.' That is to say ... the message is different, > perhaps someone out there can identify the program that > produces this kind of messages upon entering the shell? > > ii) ~/mail/inbox does not have 50 mail messages, it has > thousands. Also, there are no new or unread messages ... > > iii) if I type 'mail', right after receiving the message, I > get 'No mail for fernan.' as a reply. > > Thanks for any tip or suggestion, I'd guess that your .cshrc sets the "mail" variable to ~/mail or some other directory. This makes csh look for new mail in the specified path(s). See csh(1), under the description of the "mail" variable. All other programs use the environment variable MAIL, or default to /var/mail/$USER, where there is no mail for you. $.02, /Mikko > > Fernan > > | > | > | On Fri, 2003-10-03 at 17:08, Fernan Aguero wrote: > | > Hi! > | > > | > I'd like to understand why every time I open a new terminal > | > (or just type 'csh' in a terminal) I get a message similar > | > to: > | > > | > You have XXX mail messages. > | > > | > The default mailbox (/var/mail/fernan) is empty, since I > | > use procmail to deliver messages to several different > | > mailboxes under ~/mail. > | > > | > Still, I keep receving this message all the time. Right now > | > it says I have 50 messages. What are they? Where are they? > | > > | > I've already read the man pages for csh(1), looked in > | > sourced rc files (~/.cshrc, /etc/csh.cshrc, ~/.login, > | > /etc/csh.login) and, as far as I can see, there is nothing > | > that looks like checking on available messages. > | > > | > It's been also difficult to google a common phrase like 'you > | > have mail messages' to look for already answered questions. > | > > | > I apologize is this is a FAQ. > | > > | > Thanks in advance, > | > > | > Fernan > | -- > | Mailing Lists Catcher > | MGM Communications LLC & kibserv > | > | > +----] > > -- > F e r n a n A g u e r o > http://genoma.unsam.edu.ar/~fernan > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" >