Menu Home

Using Zimbra Desktop and a Proxy Server

Paul McLaney – Don’t Wanna Know

I’m using Zimbra Desktop on KDE4.1 as Thunderbird seems to be a little crash-happy, and it also seems appropriate that I jump right into all things Zimbra if I’m going to be working on a Zimbra project. Zimbra Desktop is currently at Beta-3 and there seems no obvious way to configure it to load images via a proxy server, and Googling gives no relevant results.

Let me be the first to say “haha, bow at my feet!” for I have the fix. The above image is an html email with remote images loaded via a proxy server, and I will let you know the fix for one million dollars!

Any takers? No?

OK, the secret is that Zimbra is based on Mozilla’s Prism technology, so all you have to do is configure prism for a proxy configuration. Firstly, find all.js

rblundel@rawiri-desktop:~/zimbra/zdesktop/linux/prism/xulrunner/greprefs$ locate prism | grep all.js
/home/rblundel/zimbra/zdesktop/linux/prism/extensions/refractor@developer.mozilla.org/modules/WebAppInstall.jsm
/home/rblundel/zimbra/zdesktop/linux/prism/extensions/refractor@developer.mozilla.org/prism/modules/WebAppInstall.jsm
/home/rblundel/zimbra/zdesktop/linux/prism/modules/WebAppInstall.jsm
/home/rblundel/zimbra/zdesktop/linux/prism/xulrunner/components/nsXULAppInstall.js
/home/rblundel/zimbra/zdesktop/linux/prism/xulrunner/greprefs/all.js
/home/rblundel/zimbra/zdesktop/linux/prism/xulrunner/greprefs/xpinstall.js
rblundel@rawiri-desktop:~/zimbra/zdesktop/linux/prism/xulrunner/greprefs$

/home/rblundel/zimbra/zdesktop/linux/prism/xulrunner/greprefs/all.js is the one we’re after. This will be in a different location on Windows and Mac, but look in your Profile directory for a Zimbra directory, and simply go from there.

Edit all.js in your editor of choice, looking for

pref("network.proxy.type", 5);
//@line 798 "/builds/tinderbox/Xr-Mozilla1.9-Release/Linux_2.6.18-53.1.13.el5_Depend/mozilla/modules/libpref/src/init/all.js"
pref("network.proxy.ftp", "");
pref("network.proxy.ftp_port", 0);
pref("network.proxy.gopher", "");
pref("network.proxy.gopher_port", 0);
pref("network.proxy.http", "");
pref("network.proxy.http_port", 0);
pref("network.proxy.ssl", "");
pref("network.proxy.ssl_port", 0);
pref("network.proxy.socks", "");
pref("network.proxy.socks_port", 0);
pref("network.proxy.socks_version", 5);
pref("network.proxy.socks_remote_dns", false);

And edit to suit, as an example, for me:


pref("network.proxy.type", 1);
//@line 798 "/builds/tinderbox/Xr-Mozilla1.9-Release/Linux_2.6.18-53.1.13.el5_Depend/mozilla/modules/libpref/src/init/all.js"
pref("network.proxy.ftp", "");
pref("network.proxy.ftp_port", 0);
pref("network.proxy.gopher", "");
pref("network.proxy.gopher_port", 0);
pref("network.proxy.http", "192.168.0.1");
pref("network.proxy.http_port", 8080);
pref("network.proxy.ssl", "192.168.0.1");
pref("network.proxy.ssl_port", 8080);
pref("network.proxy.socks", "");
pref("network.proxy.socks_port", 0);
pref("network.proxy.socks_version", 5);
pref("network.proxy.socks_remote_dns", false);

That’s it. Restart Zimbra Desktop for prosperity and enjoy proxified goodness.

Alternatively, if your proxy has a .pac file, you can change this line:
// The PAC file to load. Ignored unless network.proxy.type is 2.
pref("network.proxy.autoconfig_url", "");

to something like
pref("network.proxy.autoconfig_url", "192.168.0.1:/some/directory/proxy.pac");

And obviously set pref(“network.proxy.type”, 1); to 2.

Note 1: My proxy server does not require authentication, so I don’t know how to configure Prism for authentication. There don’t seem to be any readily apparent options, but now that you know that the configuration is in the underlying prism platform, you’ve got something to google on.

Note 2: This is an unsupported hack. I won’t help you, the Zimbra support guys may or may not

Categories: Geeking Out Open Source

Tagged as:

rawiri

1 reply