Custom headers: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
m (Tools -> Options and some typos (bonus of the spell checker))
Line 11: Line 11:
:user_pref("mail.compose.other.header", "X-No-Archive,X-gazette-tag");
:user_pref("mail.compose.other.header", "X-No-Archive,X-gazette-tag");


You could also add these preferences by editing prefs.js or using the [http://aboutconfig.mozdev.org/ about:config extension]. In Thunderbird 1.5 you can use Tools -> Options -> Advanced -> General -> Config editor to do the same thing as about:config.  
You could also add these preferences by editing prefs.js or using the [http://aboutconfig.mozdev.org/ about:config extension]. In Thunderbird 1.5 you can use [[Menu differences in Windows, Linux, and Mac|Tools -> Options]] -> Advanced -> General -> Config editor to do the same thing as about:config.  


The "customize..." option at the bottom of the leftmost list box in searches and message filters uses mail.compose.other.header so any custom header you add in order to use them in the rules lets you send messages using those headers as a sidefeffect.
The "customize..." option at the bottom of the leftmost list box in searches and message filters uses mail.compose.other.header so any custom header you add in order to use them in the rules lets you send messages using those headers as a side effect.


Thunderbird 1.5 adds the ability to add a custom header to every message you send using a identity (From: address), without having to do anything when composing the message. It requires at least two preferences be added to user.js. One preference lists the name of the preferences that define each custom header for that identity. The others specify the custom header and the value. For example:
Thunderbird 1.5 adds the ability to add a custom header to every message you send using a identity (From: address), without having to do anything when composing the message. It requires at least two preferences be added to user.js. One preference lists the name of the preferences that define each custom header for that identity. The others specify the custom header and the value. For example:
Line 20: Line 20:
:user_pref("mail.identity.idN.header.archive", "X-No-Archive: yes");  
:user_pref("mail.identity.idN.header.archive", "X-No-Archive: yes");  


where 'N' is the appropiate id number. Notice that while the custom header is X-No-Archive its defined using a different name. You could add two custom headers for id3 using:
where 'N' is the appropriate id number. Notice that while the custom header is X-No-Archive its defined using a different name. You could add two custom headers for id3 using:


:user_pref("mail.identity.id3.headers", "archive, gazette-tag");
:user_pref("mail.identity.id3.headers", "archive, gazette-tag");
Line 26: Line 26:
:user_pref("mail.identity.id3.header.gazette-tag", "X-gazette-tag: Bubba");
:user_pref("mail.identity.id3.header.gazette-tag", "X-gazette-tag: Bubba");


You can look in prefs.js or use Tools -> Options -> Advanced -> General -> Config editor to find the number of the identity. The simplest way to find the id value might be to search for the email address. mail.identity.'''id1'''.useremail for example contains my default email address.
You can look in prefs.js or use [[Menu differences in Windows, Linux, and Mac|Tools -> Options]] -> Advanced -> General -> Config editor to find the number of the identity. The simplest way to find the id value might be to search for the email address. mail.identity.'''id1'''.useremail for example contains my default email address.


==Customize viewed headers==
==Customize viewed headers==
Line 50: Line 50:
==External links==
==External links==
*[https://addons.mozilla.org/extensions/moreinfo.php?application=thunderbird&category=News%20Reading&numpg=10&id=1003 Header scroll extension]  
*[https://addons.mozilla.org/extensions/moreinfo.php?application=thunderbird&category=News%20Reading&numpg=10&id=1003 Header scroll extension]  
* [https://addons.mozilla.org/extensions/moreinfo.php?application=thunderbird&numpg=10&id=210 View headers toogle button]
* [https://addons.mozilla.org/extensions/moreinfo.php?application=thunderbird&numpg=10&id=210 View headers toggle button]
* [http://developer.mozilla.org/en/docs/Extensions:Thunderbird:customDBHeaders_Preference Mozilla Developer Center article] about exposing custom header data for use in a custom column.
* [http://developer.mozilla.org/en/docs/Extensions:Thunderbird:customDBHeaders_Preference Mozilla Developer Center article] about exposing custom header data for use in a custom column.
[[Category:Thunderbird]]
[[Category:Thunderbird]]

Revision as of 04:04, 1 June 2008

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

Add custom headers

Every version supports adding a custom header using the mail.compose.other.header preference. This will add the custom header to the list of header fields such as To, CC etc. available when you compose a message. For example, add the following to user.js:

user_pref("mail.compose.other.header", "X-No-Archive");

You could then select X-No-Archive and type "yes" (without the quotes) when composing the message to add a X-No-Archive: yes header. If you want to add more than one custom header you must add them in the same preference. For example,

user_pref("mail.compose.other.header", "X-No-Archive,X-gazette-tag");

You could also add these preferences by editing prefs.js or using the about:config extension. In Thunderbird 1.5 you can use Tools -> Options -> Advanced -> General -> Config editor to do the same thing as about:config.

The "customize..." option at the bottom of the leftmost list box in searches and message filters uses mail.compose.other.header so any custom header you add in order to use them in the rules lets you send messages using those headers as a side effect.

Thunderbird 1.5 adds the ability to add a custom header to every message you send using a identity (From: address), without having to do anything when composing the message. It requires at least two preferences be added to user.js. One preference lists the name of the preferences that define each custom header for that identity. The others specify the custom header and the value. For example:

user_pref("mail.identity.idN.headers", "archive");
user_pref("mail.identity.idN.header.archive", "X-No-Archive: yes");

where 'N' is the appropriate id number. Notice that while the custom header is X-No-Archive its defined using a different name. You could add two custom headers for id3 using:

user_pref("mail.identity.id3.headers", "archive, gazette-tag");
user_pref("mail.identity.id3.header.archive", "X-No-Archive: yes");
user_pref("mail.identity.id3.header.gazette-tag", "X-gazette-tag: Bubba");

You can look in prefs.js or use Tools -> Options -> Advanced -> General -> Config editor to find the number of the identity. The simplest way to find the id value might be to search for the email address. mail.identity.id1.useremail for example contains my default email address.

Customize viewed headers

You can show the user agent and/or the organization header in the headers listed by View -> Headers -> normal by adding a line to user.js:

user_pref("mailnews.headers.showOrganization", true);
user_pref("mailnews.headers.showUserAgent", true);

Mnenhy and Enigmail

The Mnenhy extension adds additional menu commands to add or display custom headers.

The Enigmail extension needs to see all of the headers so it sets mail.show_headers to 2 and uses extensions.enigmail.show_headers to control what headers are displayed for the user. Enigmail also adds some custom headers to all outgoing mail if you add user_pref("extensions.enigmail.addHeaders",true); to user.js . It currently adds:

X-Enigmail-Version: 0.90.0.0
X-Enigmail-Supports: pgp-inline, pgp-mime

See also

External links