I have just installed Zimbranotify on Ubuntu - very good, nice job!
The only thing I thought that would be nice was that you were automatically logged onto your account when you selected "Open Zimbra" (-:
I found this URL:
Preauth - Zimbra :: Wiki
It gives a JSP and a Java example, albeit it says the Java version is for windows I found with a couple of edits it compiled and ran ok on Ubuntu!
After a bit of trail and error I got everything working so when I clicked on "Open Zimbra" Firefox started and automatically logged me onto my Zimbra account.
So, incase others are interested this is what I had to do:
1/ I followed the instructions on the URL above for activating pre-auth using ZMPROV, stored the key it supplied and rebooted my server.
2/ I copied the JAVA example program and stored this on my local machine and called it zimbrapreauthloader.java in a new directory.
3/ I didn't have a java compile installed so just installed the latest SUN JDK using "Synaptic Package Manager".
4/ I then edited the zimbrapreauthloader.java module and made the following changes. (NOTE: I am no Java expert so I made these on a trial-and-error basis and they seemed to work for me!):
changed line 37 to:
public class zimbrapreauthloader {
changed line 42 to:
public zimbrapreauthloader() {
on line 46 - I changed this to use the full user name for my Zimbra account e.g username@domain.com
so the line of code would be:
String account = "username@domain.com";
on line 50 - I entered the key I stored from step 1 above
on line 52 I changed https to http.
I am not sure if this is due to my Zimbra server setup but I could not auto-logon using a secure HTTPS connection - it just failed every time. So I tried using a non-secure HTTP connection and it was ok. I am doing all this on a local network so I am not too concerned about not using HTTPS for this process.
I changed line 53 to:
String openBrowser = "firefox ";
5/ Started a "terminal" and changed to the new directory I created in step 2 above.
6/ Enter the following command to compile the JAVA program:
javac zimbrapreauthloader.java
7/ Then to test the program I entered the following command:
java zimbrapreauthloader
If everything is working this should start FireFox and you should find you Zimbra account inbox displayed.
8/ I then copied the "class" files from the Java compile to the /usr/local/bin:
sudo cp *.class /usr/loca/bin
NOTE:This is the same instruction as supplied for install ZimbaNotify to automcatically run.
9/ I started ZimbraNotify, right clicked on the tray icon, then selected "Prefrences". In the "External Commands->"Command to execute on clicking the tray icon" field I then entered:
java --cp /usr/local/bin/ zimbrapreauthloader
NOTE: This same command can used as a desktop launcher to get you straight into you Zimbra account without having to enter your logon details.
Anyway, I hope this of of use to others.
One last thing - in you Perl script there is a comment about mousing into the "no new mail" tooltip. I would like to always be able to start Zimbra from the "Open Zimbra" option on ZimbraNotify but my Perl is even worse than my Java and I have not yet been able to work out the code changes to get this tooltip, and the other tooltips that are not persistant, to be persistant when the mouse moves off the tray icon? If you have time could you post these code change to the Perl script?
Snib