Folder URIs

From MozillaZine Knowledge Base

This article was written for Thunderbird but also applies to Mozilla Suite / SeaMonkey (though some menu sequences may differ).

A folder URI is an internal identifier for a folder in a Mozilla mail application like Thunderbird.

You sometimes need a folder URI to identify a folder when you are configuring your mail in advanced ways. This article explains how to specify the URI for any folder. The form of the folder URI depends on the type of account that contains the folder.

Local folders
In the Local Folders account, a folder URI looks like:


For example: mailbox://nobody@Local%20Folders/Inbox

In a POP3 account, a folder URI looks like:


For example: mailbox://

Note that is not an e-mail address.

In an IMAP account, a folder URI looks like:


For example: imap://

Note that is not an e-mail address.

In an news (NNTP) account, a folder URI looks like:


For example: news://

Encoded characters

Special characters in URIs are encoded in the normal way for URIs. For example, a space is encoded as %20 and an at-sign (@) is encoded as %40.

This often affects URIs where the username is an e-mail address. The at-sign in the e-mail address must be encoded, but the at-sign that is part of the URI must not be encoded.

For example: mailbox://

Using extensions

You can use some extensions to find folder URIs, avoiding any problems with encoded characters.

The Mail Tweak extension has an Open folder tweak that displays each mail folder's URI in the folder's properties dialog.

You can use the keyconfig extension to set up a shortcut key to display the currently selected folder's URI. Program the key with code like:

with (GetSelectedFolderResource()) prompt("URI: " + URI, URI)

External links