Using the Mail led with remote mail

I recently switched all my mail reading over to using IMAP over SSL, and needed to get GNOME’s Inbox Monitor applet to handle it. It doesn’t do it natively, so I had to use a script to do the check. It is done easily with fetchmail.

I have found a way to use the extra leds on the Asus M2400N, which I have added to the script.

The script is this:


test -x /usr/bin/fetchmail || exit 0

if fetchmail --ssl -c > $MBOX+; then
    mv -f $MBOX+ $MBOX
    test -w $MLED && echo 1 > $MLED
    rm -f $MBOX+ $MBOX
    test -w $MLED && echo 0 > $MLED

In the preferences of GNOME’s Inbox Monitor, the script runs before each update, and the Mail Spool File is set to $HOME/.newmail.

That’s it.

Leave a Reply

You must be logged in to post a comment.