Changing the Imap server of an account causes issues



I am hitting an issue here, I hope someone can offer me some advice

I had to change my email provider (the domain name stays the same) So now I have the same email address with different imap/smtp servers. I satrted having couple issues with the server name update, but the main one is that my previous inbox had many folders now with the new provider I naturally started from scratch, so I have no subfolders on the new Imap server. It seems like Mailpile is contantly trying to access and move emails from non existing folders.

All I did was to edit the email account details and replace the old server names with the new servers in Mailpile’s account page.

Another issue I have is that it seems like it is not possible rename an account and create a new account with the same account name/email.



Hmm. I actually never had this problem myself. And in the past, I have moved providers a few times. But, I have to confess that I used imapsync to move everything over. Not that it was much else than the folder names :wink:

A technical reason might be that the new provider uses a different path. You see, there is often a configuration option that allows folders and subfolders to be seperated internally by a character. Where you, the user, can see Inbox and within that mailbox the subfolder Administration, on the server filesystem it could be something like INBOX.Administration or INBOX/Administration.

I will write this down, something worth looking at.

Internally, Mailpile gives accounts a unique identifier. But from the user-facing perspective, it doesn’t make much sense to have added twice. What you could do is change the address of the old account to eg In the Mailpile settings you can then disable the account for sending and receiving mail, so that you are still able to access your old messages, but that Mailpile doesn’t try to fetch new messages.

Ofcouse, this is more of a workaround than a fix. Would you be okay with this for now?


Yeah that is probably one of the issues however I have no way of changing that because I am only renting email services from them.

What you could do is change the address of the old account to eg In the Mailpile settings you can then disable the account for sending and receiving mail,

I believe that I tried that and It failed. I will try it again but what I am wondering is that do I need to change all the account name settings in the subfolders too? I literally have 10s of folders that are imported as tags.


Exactly. Unfortunately “we, serverops” are still rare. I will dive in the code and see if I can trace this back to anything, fix it and submit a PR.

It should work. I have done this myself before. Glad to help out should you run into any issues. Are you running Mailpile from a package or the Git repo? If it’s the latter one, you might want to run a git pull as there have been some awesome changes lately.


I did not attempt it yet, since I need to back things up but I am trying to explore the solution again.

One thing I see is that changing the email address to wont change the name of the actual folder and the subfodlers/tags.

For instance the actual created folder on the left is USER@HOME.ORG That is also part of the folder title/name up there when you open the settings for it. And there does not seem to be a way to change or edit that name. That is one thing.

The other thing is that al the subfolders/tags of that account also has similar to USER@HOME.ORG/inbox, USER@HOME.ORG/trash, USER@HOME.ORG/spam etc This can be seen by clicking on one of the tags on the left and then press edit in the main pane.

So it seems to me that changing the email address in the account wont cut it as a solution.

I feel like what we need is some kind of “archive account” thing which can take care of all that other wise it seems to me that this can turn into some kind of shit cluster.


Sorry about the delay responding. One very simple thing you can do, which I have verified works is:

  1. Edit the source settings for the account
  2. Uncheck “Enable this mail source”
  3. Check “Add New”
  4. Fill out the details for your new IMAP server
  5. Click “Save”

That will tell Mailpile to stop polling your old account, while leaving the existing mail and tag structure intact. If you then want to hide or rename the tags linked with the old mail source, you can just open up the tag and click “Edit”.

You could also delete the account and create a new one, but I was testing that flow just now and I think I encountered some bugs - it might not work as well as it should.


A screenshot:



Thanks for the reply. I already tried that and that method is affective only if you have couple tags and subfolders. My issue is that I have many tagged folders (over 30 I think) also the names associated with the account cant be changed (the area you red out in your picture)


I fail to see the problem… Am I missing something?

The new source will create a new tree of tags; even if they have the same names as the old ones they’re completely separate. And you can rename the tags or remove them from the sidebar if they are bugging you.


I think I had the issue of having the email account folders with the same names (the root folder) It was confusing. I was worried that there were conflicts. That is when I realized that those names cant be changed. I wanted to rename it to something like _Archive.

I will try your suggestion again though.


Ok I tried that but hit an issue.

When I press “save” the page freezes for a long time and the page gives me time out. Meanwhile the Mailpile terminal in the linux terminal seems to work but page not responding. I ended up quiting and starting it again. When I did that, I see that the account is disabled but the new account was not added :frowning:

So I tried “New” option again and this time worked.

Btw I had eventlog/watch was enabled in the linux terminal, and page freezing I mentioned did not seem to produce any kind of log lines.


Yes, that is what I meant by that option having some bugs, I saw similar behaviour when I tried it. That’s why I wasn’t recommending it…

I’m still confused as to why simply disabling the old mail source and adding a new one wasn’t a viable solution for you, I just don’t understand why you felt that wouldn’t work. Was this just confusion, or is there a bug or a misfeature that I’m unaware of?

I also don’t know what you mean when you say “folders”, there are no folders in Mailpile. So whatever you are thinking about as folders, including the rules and limitations of folders, just don’t apply. The name of the account is just the name of your e-mail address, and as I understand it that’s not changing. And true, Mailpile does not know how to make sense of having multiple accounts with the same e-mail address, so you can’t change that - but the tags in the sidebar (which I’m guessing you think of as folders) can all be renamed; you just click the tag and then click the Edit option that appears above the message list. The names are just eye candy, which is why you can have many with the same name. The association with the remote IMAP folder won’t change even if you rename it. Maybe that’s what is confusing?

It would be useful for me to at least understand what is confusing here, so I can better help others or even change the app to make it less confusing. I’m so embedded in how Mailpile works that I at times have a hard time understanding which things are confusing to others… :grin:


I think it was mix of bunch of things like hitting the those bugs, me thinking that it would create conflicts and not understanding add “New” inside the same account well .

Basically what happened was that I tried “New” option back then, hit those bugs, then I thought that did not work, then I deleted the account and tried to create a new account which I hit similar bugs and so on. I then had to revert to my backup.

I guess if the bugs were not there, I could have had a much smooth progress which would have made my confusion to be less of an issue. Not too blame, but just hitting one issue after another multiplied my confusion probably.

Trying this from fresh and targeting that solution seemed to work.

Thanks for your help.


What bugs? The bugs I’m aware of manifested when deleting an account. Not adding a new mail source to an existing one.


THis is what I get , quoting myself (when adding “New”)

When I press “save” the page freezes for a long time and the page gives me time out. Meanwhile the Mailpile terminal in the linux terminal seems to work but page not responding. I ended up quiting and starting it again. When I did that, I see that the account is disabled but the new account was not added

I am not sure if it is just me but I could repeat this with my accounts. In fact It happened before multiple times and when I tried it yesterday too.


Aha! I think I am starting to understand the confusion. We have too many concepts and too few words.

So when you say “new account”, you mean you were adding a new mail source (new IMAP settings) to an existing Mailpile account? That is not how I read it, I though you were deleting the Mailpile account and creating a new one.


Yes, adding a new source inside an existing account.

In both cases of adding a new source to an account and deleting account then adding a new one, I got the page freezing issue as if the web server backend crashes while the actual engine stay intact. But I am not a programmer. If you can tell me how to get detailed logs, I can try to provide more details.