LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Count of unread messages from command line (https://www.linuxquestions.org/questions/linux-software-2/count-of-unread-messages-from-command-line-129122/)

rebuke 12-26-2003 06:41 PM

Count of unread messages from command line
 
I'm writing some code to control a 20x4 char lcd display. One of the things I want to include on it is a count of unread email.

I'm trying to find a simple way of getting this count, without getting overly complicated and having to try and call the mail program with various options. There is probably a simple way that I don't know about but I'm self taught so I miss certain things!

I'm currently using Redhat 8.0 so the mail spools are at /var/spool/mail/username. I only want this program to check the mail for me so I can run it as me so permissions aren't a problem or anything. It is however important that I only get the UNREAD count as I keep a lot of email sitting on the server because I use Squirrelmail talking to an IMAP server.

Thanks in advance,
Alex Brett
rebuke@rebuke.eu.org


All times are GMT -5. The time now is 09:51 AM.