2

I'd like to check whether I have unread mails, independent of the mail account, in Thunderbird/Icedove.

I went trough the parameters of Icedove, but couldn't find anything useful. The idea is to check ever x minutes, whether an unread mail is available or not, if so, I'll change an icon in my system bar, to notify me. I often don't notice the Icedove popups, or simply forget about them.

2

1 Answer 1

0

You can make a little shell script which make a md5sum of your several inbox files and compare it to a stored one. When the hash are different it's that you received a new mail, then make the new calculated hash replace the old one. Run it in a cron job and use notify-send from libnotify to warn you.

#!/bin/bash
MAILBOXES=/your_mailbox_directory
while true
do 
    inotifywait -r -e modify $MAILBOXES && notify-send 'New mail' 'You just recieved a new mail' --icon=dialog-information
done
2
  • That would work, but I think that's not very efficient, considering the inboxes may be very large. Also, how would the script know, which md5sum represents the "all read" inbox or an inbox with unread mails? Feb 7, 2016 at 11:56
  • 1
    Try this little script, i think it will do the trick better (As you said, the hash won't be very efficient) #!/bin/bash MAILBOXES=/your_mailbox_directory while true do inotifywait -r -e modify $MAILBOXES && notify-send 'New mail' 'You just recieved a new mail' --icon=dialog-information done
    – dervishe
    Feb 7, 2016 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .