Alan Burlison's Work Related Ramblings

All | General | Java | NetBeans | Perl | Solaris
« OpenSolaris applianc... | Main | Oooh! Shiny! ...... »

20060127 Friday January 27, 2006

Making file:// links work in thunderbird

I use thunderbird 1.5 as my mail reader, and it is always bugged me that clicks on file:// links in emails are ignored - these are frequently used internally within Sun, for example code reviews are usually done with a tool called webrev which builds a tree of HTML pages containing the diffs, and the file:// links are usually mailed out to reviewers. A spot of light googling revealed this page on the topic for firefox, and although the page implied the same configuration settings were also used by thunderbird, it wasn't quite clear how to apply the technique to mails read from an IMAP server. Hmm.

To try to figure out what was going on I opened up the thunderbird JavaScript console (on the Tools menu) and clicked on a file:// link in an email. The following error message appeared:

Security Error: Content at imap://mailserver.uk.sun.com:143/fetch%3EUID%3.INBOX%3E8620 may not load or link to file:///net/foo.uk.sun.com/export/8475639/webrev/index.html.

So I surmised that what I needed to do was to tell thunderbird to trust links from my IMAP server, so I added the following to my user.js file:

// Allow file:// links
user_pref("capability.policy.policynames", "localfilelinks");
user_pref("capability.policy.localfilelinks.sites", "imap://mailserver.uk.sun.com:143");
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");

restarted thunderbird, and clicking on file:// links now worked. Note that there are a number of good security-related reasons as to why this isn't enabled by default, so use it at your own risk!

Posted by alanbur ( Jan 27 2006, 01:02:25 PM GMT ) Permalink Comments [3]

Trackback URL: http://blogs.sun.com/alanbur/entry/making_file_links_work_in
Comments:

Thank you. This just helped me solve a problem for my boss.

Posted by Patrick on February 01, 2007 at 11:08 PM GMT #

Thank you,
Your solution for this problem worked like a charm
on Thunderbird version 2.0.0.16

Dave

Posted by Dave on October 08, 2008 at 05:13 PM BST #

I've upgraded Thunderbird from 2.0.0.17 to 2.0.0.23 in our Ccompany and the problem is the same i see in mail the attachment like file:\\ but it isn't works because the status window display file:\\\. i tried to modify the user.js file but this cannot be works. Can you help me?

Posted by Zoltan Adler on September 24, 2009 at 09:27 AM BST #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed