Copy/duplicate account profile settings

Hello everyone,

Is there an option to duplicate account profiles?
I cannot seem to find it…
As I have multiple accounts on both O365 and Gmail, it would be great to have a possibility to create a new profile using an existing one.
Typing every time all the settings is quite tedious…

I agree, this, or templates, could be a useful and not too hard to implement feature, because if you understand what you are doing, the possibility is already there, alas, at the moment, it’s a hack:grin: :

go to settings → export, uncheck all but the account to duplicate, then export. Voila, you now have an export file with a .k9s extension, and that is a human readable text file in xml notation that you can read and edit in a simple notepad-like text editor. If all settings except the user name are identical in the copy you want, you can use find and replace; other settings are not hard to find and identify. At the end, save, then from k9, try to import that file - this should work if you are not making syntax errors, and like with all settings imports, you will need to authenticate afresh, because that’s the sane solution, and credentials and secrets should never be part of a settings export.

Do not try this hack unless you are feeling confident that you understand what is happening there, if you want to go even further, you could test how k9 reacts if certain fields in the imported settings file were left empty: in an ideal world, you would be prompted for missing information like in a new account set up, and you’d have a template solution.

But although this should not happen and even malformed files ought to be rejected for import as the worst case, there is always a risk that such hacks and tests trigger unknown bugs and crashes in the app, so try at your own peril and take note that I have not tested my suggestion beyond exporting settings and verifying that they are a human readable file, the safe way would be testing on a different device with a fresh k9 install, then setting up 1 mail account there, and playing with export, edit, re-import while the device is offline at first

1 Like

That did the trick, thanks.
I previously tried export the account settings, re-import them again and change the values from k9 itself. However I was getting login issues. Modifying as text file solved it. :+1:

1 Like

You should mark that answer as the solution to help anyone who finds your topic while searching.

cough I’m positively honored, but it’s still a hack :wink:

1 Like