So I think it’s pretty clear that I don’t like doing things in my browser that a script can do for me. Woot.com, Stock Quotes and NHL Scores have all been taken care of. Now if only conky could tell me if I have new mail. This would save me from logging in and checking manually…
Thanks to python’s easy to use IMAP library this is a piece of cake. The script should work with any IMAP mail server. I have tested it with my Gmail and Drexel University accounts. Your mail server info should be publicly available. Google has theirs under the gmail settings >> imap/pop3 tab (You may have to enable imap under this tab). Best bet is to search google.
The script shows you the total number of messages in your inbox and the number that are unread.
To get it working edit your .conkyrc file. Add the following line under the TEXT section. Change the path to where your script is
${execi 60 python /path/to/script/imap.py}This’ll make obsessive email checking much easier…no need to login manually
Download IMAP.py here (Right click and Save link as…)



#1 by turvyc on March 17, 2009 - 12:39 pm
cool! a great tip. that’s a great background! where’d you get it?
#2 by Bhavik on March 17, 2009 - 6:37 pm
Hey turvyc, heres the link to the wallpaper
http://www.gnome-look.org/cont.....tent=72456
#3 by Ivar Refsdal on May 5, 2009 - 3:21 pm
Hey, and thanks for this!
I modded it slightly for use with xmobar + highlighting for new messages:
http://pastebin.com/f5f38111
and a screenshot here:
http://ivarref.at.ifi.uio.no/xmobar.png
#4 by Bhavik on May 8, 2009 - 12:06 pm
That looks awesome Ivar, didn’t know what xmobar was until you showed me. Thanks a lot for the tip, I’ll mess around with it now
#5 by JD on July 26, 2009 - 10:29 am
Thanks, been looking for something like this.
Only thing I don’t like is storing passwords as plain-text (or even hashed); I have a ~25character password for a reason: because I’m paranoid
, so I don’t like it stored any where except my head, especially not on an easily lost netbook
Going to have a look to see if I store the password in an encrypted file any have it auto-decrypted with a password on login.
Cheers again for the script.
#6 by Bhavik on July 29, 2009 - 9:34 pm
I know how you feel, Im crazy about my passwords too. The password to my SSH server at home is over 50 characters long
Let me know if you figure out how to do what you’re trying to do with the encrypted password. Good luck and thanks for reading!
#7 by hecky on February 6, 2010 - 4:25 pm
Hi…this is GREAT!!! it works for me, but i have a doubt!!!
How can i make to just with one click i’m able to see the unseens mails??