Adding custom Headerlines to an Email with Mozilla

Ever wondered how to add a custom header into an Email? A normal Emailhedaer looks something like

 From: Peter Schwarz <pschwarz@white.com>
 To: His Majesty <his@majesty.com>
 Subject: i think qmail is a good mailer
 Date: Fri, 27 Jun 2003 16:18:56 +0200
 Message-ID: <ASDLFKJHASDLFKJASDFASDFLKJASDH.pschwarz@white.com>

And now you would like to add an additional Header like

 X-Info: www.mydomain.com

or just

 Oulook-users-are: dumb

(You actually don't need to add an 'X-' before the string.)

The solution:

Close all your Mozilla instances and cd to your Mozilla Directory.

 # cd ~/.mozilla/myprofile/.2432sdf.slt/

Edit prefs.js and add the follwing line:

 user_pref("mail.compose.other.header", "[add here all additional header in a comma separated list]");

E.g.:

 user_pref("mail.compose.other.header", "X-Info,Outlook-users-are,X-Accept-No-Word-docs");

Start Mozilla and the mailwindow of Mozilla and compose a new Mail. Enter the desired Emailaddress into the 'To:' field and press 'Enter'. Now you can choose all your X- and other funny headers! WOW!

Since Mozilla rewrites prefs.js every time it quits, you have to write to this file, while Mozilla sleeps calm. Otherwise you can edit the file user.js while Mozilla is awake and after that restart Mozilla. Mozilla will read the user.js and append its content to prefs.js.

To Edit all your Mozilla Config while running Mozilla, open the Browser and in the address line enter:

 about:config

You can search now for

 mail.compose.other.header

dobbleclick the line and edit your headers.