Subject: new mail status

From: Jeremy Weinrib <[email-masked]>
Date: Sat, 11 Nov 1995 18:04:40 -0500

Is there any way, or any file that will tell me if I have new mail 
waiting in Pine, that I can put in my .login file?  The problem is that 
they are using an IMAP server, so I can't use the unix command newmail, 
or mailfrom, because the mail isn't actually stored in my directory.  Is 
there any way that this can be done, or does IMAP make it impossible?
					
				Jeremy.

---

From: Ian Russell Ollmann <[email-masked]>
Date: Mon, 13 Nov 1995 21:52:15 -0800

> there any way that this can be done, or does IMAP make it impossible?

Do you know where your INBOX is stored? It is often in /usr/mail or 
/usr/spool/mail somewhere. Once you know that, you could do something 
simple like add to your .login something like

echo "You have "`grep -c 'Message-Id: ' $MAIL`" mail messages."

where $MAIL is the path to your INBOX (e.g. "/usr/mail/$user" or 
"/nfs/some-machine-name/usr/mail/jweinrib"). This should give you a message 
like 

You have 0 mail messages.

or

You have 65 mail messages.

or 

whatever.

When used along with pine's read-message-folder option, it can be very 
easy to tell when you have new mail at login. Another option at an 
X-windows terminal is to use some program like mailbox, which has a 
little flag which goes up when you have new mail. Some such programs will 
even start pine for you when you click on the mailbox icon.

				Ian