The program mled is a small daemon for linux servers to check a user's mailbox for mails and notifying the number by a blinking LED. This LED is connected to a serial port. I've programmed it because my girlfriend gets only a few mails per week and she doesn't want to boot her PC every day only for checking mails. By running this daemon on our server at home she can see now by a quick glimpse on the LED (I've taped it on the side of our answering machine) whether she got mail.
How does it work?
Quite simple! Our server pops all mail accounts on a regulary basis and stores them in the user's mailbox in the directory /var/spool/mail (e.g. /var/spool/mail/peter). The program is started as a service and checks this mailbox every three minutes. If there are mails it starts to flash the LED once for every mail. After a one second pause the blinking starts again.
Is the hardware expensive?
Absolutely not! You can buy these parts for less than 5 Euros in an electronic shop or even cheaper: wreck some old worn mouse and a defect ISA network card. I've cut off the mouse and kept only the connector with cable and took the green LED from the network card.
Have you written all the code by yourself?
That's the great thing about Open Source Software. I've searched on google for similiar programs and found sled from Guido Socher (guido@linuxfocus.org) which is a program to shutdown a server via a serial interface. The code for counting the mails was taken from the script messages which is included in the elm package. Some modifications on the source codes and it was fitting my purpose. And because the programs were licensed under GPL my program is also a GPL program. Read the GPL license for more details.
Where do I get this software?
Download the packed source mled-030524.tar.gz
and unpack it to a directory.
Then type make.
Become root by typing
su - and type make install.
That's it.
See the Readme for information on configuration and tweaking (e.g. check intervall etc.).
© 2000-2011 Günther Erhard