I’m getting an error when updating Mail-in-a-Box from v0.21c to v0.22.
It’s saying “Aborting. Update failed. Did you modify something in /home/user/mailinabox?”.
I have modified some of the HTML files to be specific to the users that login but nothing drastic, just some wording. I don’t mind if this stuff gets replaced or overwritten after the update because it wasn’t huge changes at all, just wording.
Anyways, is there a way to make Mail-in-a-Box still update and overwrite any changes that have been made or force the update? I’d rather not do a backup, reinstall, and restore if I can avoid it.
The directory is controlled via git. You probably have changes there. If you want to do that sort of thing it’s best to install via your own fork and merge the changes for upstream.
Yeah, I’m not that familiar with git. Is it possible to update without using git or backing up, reinstalling, and restoring the data? If I have to use git in order to update without issues, any pointers on this? I’m just not familiar with making my own fork or anything like that. I don’t mind losing the simple changes I’ve made to a couple html files.
Well it isn’t really complicated. (No more than changing the HTML)
Modifications aren’t supported at all because you will run into issues like these.
As a quick workaround you could rename the miab directory do the normal curl install stuff and copy your files back. You could overwrite changes made by us though.
Normal disclaimers about backups and strangers giving advice on the internet apply.
I ended up renaming the /home/user/mailinabox directory to /home/user/mailinabox.bak. I then ran the typical “curl -s https://mailinabox.email/setup.sh | sudo bash” command to update mailinabox to v0.22. It ran through the setup again.
After this, I was able to copy my edited html files from my /home/user/mailinabox.bak/management/templates directory and overwrite the new html files the update placed in the /home/user/mailinabox/management/templates directory. This resolved the issue. Everything is fully updated and running perfectly. I then deleted the /home/user/mailinabox.bak directory after copying and replacing the html files.