I am guessing that I can't assume the name 
> of the resulting identity or server in the pref file.

nope, sorry :)


> 1) What about expanding the .rdf to cover more prefs? Some of the prefs 
> will need to end up in a .cfg for locking and/or centralized management, 
> and I'm guessing that the new account wizard won't put them there. This 
> approach might not work then.
> 


Actually, the RDF does expose all preferences, automatically (i.e. 
there's no code which picks and chooses which prefs are/aren't supported)
the RDF is translated into strings which are used by xpconnect to get to 
all the standard mail interfaces, like nsIMsgIncomingServer, 
nsIMsgIdentity, nsIImapIncomingServer and so forth. All per account mail 
prefs are done through that mechanism, so all per account mail prefs are 
exposed via the RDF file.


> 2) Specifying the identity and server names in the .rdf so the prefs can 
> be written to a pref files separately using those known names?


the thing is, its possible to have multiple accounts on the same server, 
or multiple identities with the same e-mail address, so there's no way 
to uniquely identify them other then their server/identity/account 
keys... however I suspect that my answer to 1) will solve your problem.

One other thing you can do, which affects the default values in ALL 
accounts, is to use "default" as a key name, and put that in a users 
prefs.js file, such as
user_pref("mailnews.identity.default.email", "[EMAIL PROTECTED]");
but remember, this makes that default apply to ALL accounts - so use 
this feature responsibly!


Alec


Reply via email to