I don't see how this would be a usefull future for anyone else but you ;) If you have physical access to the IMAP server you can do this with a simple systemcall:
find /home/username/Maildir/cur -maxdepth 1 -type f -regex '.*[^S]$'|wc -l
If you don't have that access, or want a proper solution you will probably need to hack the IMAP libraries yourself; I can't imagine that that will be too hard though :)
Timothy Martin wrote:
So the subject kinda sums it up.
I have a link in the header of my site called "Mail" which leads to the roundcube system, but what I'd like is if you have new emails it says "Mail (##)" with the number of unread messages. The biggest (or maybe just first) hurdle I see is in authentication. The whole point of this is so you don't have to click mail and login if you don't have any new messages to begin with, so if they don't login how do you know what the account is? Well, all users must be logged in to my site to begin with and their usernames/passwords are the same for both the site and the roundcube system, so if there is some way to pass a username/password into some roundcube function and check for unread messages, that's the most logical solution I see, but even if that's possible I don't know the code for roundcube well enough to do that?
Ideas/suggestions/comments? Has anyone done this or tried to? Or
perhaps a better question is 'is something like this planned for a
future release?'Thanks,
Tim