You're right. There should be an easier way to do this. Looking at past 
posts, I found a posting by Seth that outlined some other problems 
associated with this. Reposting that mail below. Also as his mail 
states, I was wrong in that you can't just change the server user pref. 
There are a lot of other things to change too. I "think" though that if 
you changed all occurrences of the server name and changed the name of 
the directory, it'll work.

-Pratik.

Seth Spitzer wrote:

> Henrik,
> 
> 
>> You can do it by manually changing the info in the prefs.js file. It's
>> located in your mozilla profile directory.
>> Do a search on "prefs.js"
> 
> Do you notice any problems after doing that?  While I believe it too be possible to 
>hand edit your prefs to rename an account, I don't recommend it.
> 
> For example:
> 
> Say I have an imap account on the server nsmail-1, username sspitzer.
> 
> And I have my "sent folder" pref set to the "Sent" folder on that server.
> 
> so in my prefs.js, I have something like:
> 
> user_pref("mail.identity.id2.fcc_folder","imap://sspitzer@nsmail-1/Sent");
> 
> If I go and hand edit my prefs to change from nsmail-1 to nsmail-2, bad thing will 
>happen when I send email.
> 
> I currently own the bug to all users to change the username or hostname from the 
>account settings dialog.  Coming up with a fix is going to be interesting and will 
>require some thought and a whole lot of testing.
> 
> editing the prefs file after you've quit the application avoids some of these 
>problems, since there are no "live" objects with uri's that need to be changed.
> 
> I've been thinking about having the uri's be
> 
> scheme://<server key>/<folder path>
> 
> instead of
> 
> scheme://<username>@<hostname>/<folder path>
> 
> since server key doesn't change and won't change if the hostname or username changes.
> 
> We'll have to fix a bunch of code that used the uri to get the username or hostname 
>(which is a good thing, since we might be parsing the uri to get that info, which is 
>bad.)  if we don't have the incoming server, we'll have to go through the account 
>manager.
> 
> we'll also have to migrate a lot of prefs, like the fcc_folder pref example above.
> 
> As you can tell, I haven't really thought this all through.
> 
> I've been focusing on performance problems and making sure patches from external 
>contributors get checked into the tree in a timely fashion.
> 
> If someone is interested in tackling this beast, add yourself to 
>http://bugzilla.mozilla.org/show_bug.cgi?id=14295
> 
> -Seth



Steve wrote:

> A more advanced user can hack the thing, but for most users, this isn't
> what comes to mind.  Although you can do it this way or even just
> transferring your e-mail to the new account which isn't a big deal
> either, it's still a bit lame that users have to do this in the first
> place.
> 
> Oh well.
> 
> Steve
> 
> 
> In article <[EMAIL PROTECTED]>, Pratik Solanki
> <[EMAIL PROTECTED]> wrote:
> 
>> I've done this before. I had to change the POP server and I managed to 
>> do it by changing the prefs.js file and the directory structure. The was 
>> I did it then (about 3-4 months ago) was to change all places where 
>> 'pop.oldserver' was written to 'pop.newserver' in the prefs.js file. I 
>> then changed the name of the folder in Mail directory from pop.oldserver 
>> to pop.newserver. That worked for me.
>> 
>> Looking at the prefs.js file, I think you should be able to get away 
>> with just changing the following line.
>> 
>> user_pref("mail.server.serverx.hostname", "pop.oldserver");
>> 
>> to
>> 
>> user_pref("mail.server.serverx.hostname", "pop.newserver");
>> 
>> - Pratik.
>> 
>> DISCLAIMER - Not responsible if doing the above makes your account 
>> unusable or deletes all your mails or crashes Mozilla, etc. etc.
>> 
<snip>


Reply via email to