Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate settings from webaccess to webapp #16

Open
sixpak opened this issue Jan 14, 2015 · 10 comments
Open

migrate settings from webaccess to webapp #16

sixpak opened this issue Jan 14, 2015 · 10 comments

Comments

@sixpak
Copy link

sixpak commented Jan 14, 2015

hiho
due to a planned switch from webaccess to webapp we need to migrate some settings like signatures, send-as-settings, delegates and email-rules.
all of these are shown by using read_webaccess_settings
but unfortunately i don't know how to merge this into write_webapp_settings ;(

greetz

Rico

@jelly
Copy link
Contributor

jelly commented Jan 14, 2015

Hi,

I have an unfinished script which should convert most of the settings from webaccess 2 webapp.
Note that it overwrites the current WebApp settings!
https://gist.github.com/jelly/359d34915f8064b9b8d0

Feel free to send fixes 👍

@sixpak
Copy link
Author

sixpak commented Jan 14, 2015

ty 4 that fast answer ...
but unfortunately it looks like this won't work 4 me ;(
got errors ...
Traceback (most recent call last):
File "webaccess2webapp.py", line 208, in
webaccess_dict = read_settings()
File "webaccess2webapp.py", line 180, in read_settings
return loads(data)
File "webaccess2webapp.py", line 151, in loads
object_hook, array_hook)
File "webaccess2webapp.py", line 141, in load
return _unserialize()
File "webaccess2webapp.py", line 126, in _unserialize
return array_hook(_load_array())
File "webaccess2webapp.py", line 92, in _load_array
item = _unserialize()
File "webaccess2webapp.py", line 126, in _unserialize
return array_hook(_load_array())
File "webaccess2webapp.py", line 92, in _load_array
item = _unserialize()
File "webaccess2webapp.py", line 126, in _unserialize
return array_hook(_load_array())
File "webaccess2webapp.py", line 92, in _load_array
item = _unserialize()
File "webaccess2webapp.py", line 126, in _unserialize
return array_hook(_load_array())
File "webaccess2webapp.py", line 92, in _load_array
item = _unserialize()
File "webaccess2webapp.py", line 126, in _unserialize
return array_hook(_load_array())
File "webaccess2webapp.py", line 92, in _load_array
item = _unserialize()
File "webaccess2webapp.py", line 119, in _unserialize
_expect(b'"')
File "webaccess2webapp.py", line 73, in _expect
raise ValueError('failed expectation, expected %r got %r' % (e, v))
ValueError: failed expectation, expected '"' got 'p'

@sixpak sixpak closed this as completed Jan 14, 2015
@sixpak
Copy link
Author

sixpak commented Jan 15, 2015

sry ... issue accidentally closed ;)
problem still alive ;)

@sixpak sixpak reopened this Jan 15, 2015
@jelly
Copy link
Contributor

jelly commented Feb 4, 2015

If you are somehow able to share the configuration file by making a dump with read_webapp_settings https://github.com/zarafagroupware/zarafa-tools/blob/master/webapp/read_webapp-settings.py then I can look into it.

My email address is listed on my github account page

@jelly
Copy link
Contributor

jelly commented Feb 4, 2015

I hope this new script parses the webaccess settings correctly since it's in PHP and uses php's native serialize function. Good luck and again no warranties!
https://gist.githubusercontent.com/jelly/0ed67279aae61a9dc261/raw/ad1de6a7c78dbbe1693959377d82d0e5d68e4cde/webaccess2webapp.php

@sixpak
Copy link
Author

sixpak commented Feb 5, 2015

thx for info ;)

I'll give it a try next week ...
No time for testing this week ;(

Feedback will follow!

greetz

Rico

2015-02-04 22:15 GMT+01:00 jelle van der Waa [email protected]:

I hope this new script parses the webaccess settings correctly since it's
in PHP and uses php's native serialize function. Good luck and again no
warranties!

https://gist.githubusercontent.com/jelly/0ed67279aae61a9dc261/raw/ad1de6a7c78dbbe1693959377d82d0e5d68e4cde/webaccess2webapp.php


Reply to this email directly or view it on GitHub
#16 (comment)
.

@sixpak
Copy link
Author

sixpak commented Jul 28, 2015

long ago ;) but now I've tested ur script ...
This works for rules, signatures and - as I can see - most of the required settings ...
missing only "send as" and "delegates" ...

@jelly
Copy link
Contributor

jelly commented Aug 1, 2015

Thanks for the feedback! I think I didn't implement migrating the missing settings, so I'll to do some research for those settings.

@sixpak
Copy link
Author

sixpak commented Sep 5, 2016

Hiho ;)

again a long time ago ;)

The script is working fine for one user ...
But in the script is a hint for a config file ...
Is this for mass-changing user-settings from webaccess2webapp?

should this be a csv with usernames ?

regards

Rico

2015-08-01 14:46 GMT+02:00 jelle van der Waa [email protected]:

Thanks for the feedback! I think I didn't implement migrating the missing
settings, so I'll to do some research for those settings.


Reply to this email directly or view it on GitHub
#16 (comment)
.

@jelly
Copy link
Contributor

jelly commented Sep 6, 2016

This script doesn't work with a CSV, so you'd have to loop over your users using for example zarafa-admin -l

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants