Folder URIs

From MozillaZine Knowledge Base
Jump to navigationJump to search
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:

mailbox://nobody@Local%20Folders/folder

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

POP3
In a POP3 account, a folder URI looks like:

mailbox://username@server/folder

For example: mailbox://someone@pop.example.net/Sent

Note that someone@pop.example.net is not an e-mail address.

IMAP
In an IMAP account, a folder URI looks like:

imap://username@server/folder

For example: imap://someone@imap.example.net/INBOX

Note that someone@imap.example.net is not an e-mail address.

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

news://server/newsgroup

For example: news://news.mozilla.org/mozilla.test

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://someone%40example.com@pop.example.net/Inbox

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