---------------------- mailblink ver 0.7 (http://limestone.truman.edu/~dbindner/linuxware/) ---------------------- 1. Overview. Mailblink is a small program that was inspired by a similar beast called mailleds. I wrote it because mailleds didn't quite work for me. Its purpose is to monitor your incoming mail and blink one of the keyboard leds or the leds attached to your parallel port when you have new mail. 2. How it works. Mailblink monitors the last access and modification times of your mailbox to determine when you have new mail. Since it never reads the mail file itself, it should not interfere with other notification programs. It also means that you can monitor a file that you cannot actually read. You may wish for example to monitor the root mailbox for unread mail and just "su" when you want to read it. If run with a directory instead of a file, Mailblink counts the number of files in that directory. This makes it possible to monitor your "new" directory if you use maildir format. If you have a pop3 or an imap mailbox, Mailblink will periodically poll the server, login and ask for new mail. Note that most pop3 servers cannot distinguish between read and unread mails because you normally delete a mail from the server after fetching it. So use imap if possible. Up to eleven files, directories or mail accounts may be monitored (since there are 3 leds on a keyboard and 8 databits on the parallel port). 3. Things you might not quite expect. If mailblink detects subsequent updates to your mailbox, it will increment the number of blinks the led makes. This is not a perfect count of your messages, since you may receive two messages between intervals which will only be counted one time. It is also possible for a single message to be counted twice if it happens to be only half saved when mailblink checks the file. With these disclaimers aside, roughly more blinks means more mail for you to read. With directories, this is not a problem, because the number of files is always the number of messages. 4. Compiling and Installing Well, one can hope this is simple enough to compile without fuss (there are some warning messages on some systems that appear not to cause any harm) by typing: > make You need to be root to install: > make install 5. Running The simplest way to run mailblink is with: > mailblink By default the program will monitor the file specified in your MAIL environment variable every 30 seconds and blink the scroll lock led when it has been modified. To remove (kill) the program you just started, you should be able to type: > mailblink -k To watch the file /home/don/Mail/mylist at 60s intervals and blink the numlock key you can type: > mailblink -f /home/don/Mail/mylist -d 60 -l num And to kill this you can type: > mailblink -k -l num To poll an imap mailbox and blink the led attached to your first parport data bit (between pin25=GND and pin2=DATA0): > echo ">>imap.server.org username passwd" > ./imap1.cfg > chmod 0600 ./imap1.cfg > mailblink -p ./imap1.cfg -d 600 -l parport0 To debug it in case it doesn't work: > mailblink -p ./imap1.cfg -d 30 -l num -Dvvvvv