Was curious if anyone has seen/used any kind of auto-setup scripts for large amounts of users. I have a couple of hundred pine/mutt users that I intend to move over to evolution sooner rather than later.
I would like to create their email accounts automatically, and not have to setup each one seperately as they login.
Sean
On Mon, 11 Apr 2005, Sean Bruno wrote:
Was curious if anyone has seen/used any kind of auto-setup scripts for large amounts of users. I have a couple of hundred pine/mutt users that I intend to move over to evolution sooner rather than later.
I would like to create their email accounts automatically, and not have to setup each one seperately as they login.
Me too. Evolution is pure evil from that perspective, it stores it's configuration in GConf - and if that wasn't bad enough: it stores XML in there :(( (have a look at 'gconftool-2 -R /apps/evolution' output)
http://lists.ximian.com/archives/public/evolution/2005-February/041859.html has some info on the topic (and indeed this is probably best discussed on evolution lists)
- Panu -
On Mon, 2005-04-11 at 14:27 -0700, Sean Bruno wrote:
Was curious if anyone has seen/used any kind of auto-setup scripts for large amounts of users. I have a couple of hundred pine/mutt users that I intend to move over to evolution sooner rather than later.
I would like to create their email accounts automatically, and not have to setup each one seperately as they login.
Sean
I've written some Python scripts to make it easier to work with Evolution's configuration information, in the hope of automating mass deployments of Evolution.
A source RPM is available here: http://people.redhat.com/dmalcolm/evolution-gconf-tools/
There's perhaps some overlap here with Sabayon [1]; however these take a simpler approach and don't involve a nested X session.
Here's a HOWTO-style guide:
How to get this working: ======================== You should set up a prototype/test user on one machine, and get Evolution working well for that user with whatever server(s) are needed.
You then grab the configuration information for Evolution from GConf as an XML file thus: gconftool-2 --dump /apps/evolution > some-file.xml
evolution-gconf-log =================== If you look at one of these XML files in a regular file viewer it will be almost unreadable (it contains further XML data in an "escaped form" internally).
I wrote evolution-gconf-log to present this data in a more readable way: cat some-file.xml | evolution-gconf-log | less
This should show you the various accounts and data sources in a somewhat more human-readable form (it shows you some of this inner XML). You can't do anything more with the output except read it; this is a debugging tool.
evolution-gconf-filter-exchange =============================== This takes one of these XML GConf dump files and filters out everything apart from the accounts on an Exchange server. cat some-file.xml | evolution-gconf-filter-exchange > some-other-file.xml
You can use the evolution-gconf-log tool on the result as desired.
evolution-gconf-personalize =========================== This takes one of the XML GConf dump files and remaps all user information based on the values of environment variables set when the script is run. For example:
export PERSONALIZE_USERNAME=jdoe export PERSONALIZE_FULLNAME="John Doe" cat some-file.xml | evolution-gconf-personalize > result.xml
As before, you can use the evolution-gconf-log tool on the result to check that things have been mapped correctly for the new user.
Putting the data back in GConf =============================== Once you've manipulated the data as needed (and verified results using the log tool as needed), you can put it back in GConf for another thus:
gconftool-2 --load my-finished-file.xml
The above command assumes you're logged in as the user; it will start the GConf daemon for that user if needed.
If this is to run from a script where the user's session isn't running, you can bypass the daemon thus:
gconftool-2 --shutdown gconftool-2 --direct --config-source=xml:readwrite:$HOME/.gconf --load result.xml
Notes ===== I've tested this, and had it working for an Evolution 2.0 deployment. I suspect the approach will break under some circumstances, and with different versions of Evolution. Comments and patches welcome.
On Tue, 12 Apr 2005, David Malcolm wrote:
On Mon, 2005-04-11 at 14:27 -0700, Sean Bruno wrote:
Was curious if anyone has seen/used any kind of auto-setup scripts for large amounts of users. I have a couple of hundred pine/mutt users that I intend to move over to evolution sooner rather than later.
I would like to create their email accounts automatically, and not have to setup each one seperately as they login.
Sean
I've written some Python scripts to make it easier to work with Evolution's configuration information, in the hope of automating mass deployments of Evolution.
[...]
I've tested this, and had it working for an Evolution 2.0 deployment. I suspect the approach will break under some circumstances, and with different versions of Evolution. Comments and patches welcome.
Hey, this and Mark's LDAP gconf backend are a really nice start. What's currently missing for my environment is PERSONALIZE_SERVERNAME as there are god-knows-how-many different servers around the company.
It's possible to get the server name from AD by ldap query but it's in format like this: "msExchHomeServerName: /O=foo/OU=bar/cn=Configuration/cn=Servers/cn=<server>" ..where <server> is the real name of the server.
Maybe it'd be possible/worth adding support for that in the LDAP backend? Somehow I doubt I'm the only one surrounded by Exchange servers, whether we like it or not :)
- Panu -
On Fri, 15 Apr 2005, Panu Matilainen wrote:
On Tue, 12 Apr 2005, David Malcolm wrote:
On Mon, 2005-04-11 at 14:27 -0700, Sean Bruno wrote:
Was curious if anyone has seen/used any kind of auto-setup scripts for large amounts of users. I have a couple of hundred pine/mutt users that I intend to move over to evolution sooner rather than later.
I would like to create their email accounts automatically, and not have to setup each one seperately as they login.
Sean
I've written some Python scripts to make it easier to work with Evolution's configuration information, in the hope of automating mass deployments of Evolution.
[...]
I've tested this, and had it working for an Evolution 2.0 deployment. I suspect the approach will break under some circumstances, and with different versions of Evolution. Comments and patches welcome.
Hey, this and Mark's LDAP gconf backend are a really nice start. What's currently missing for my environment is PERSONALIZE_SERVERNAME as there are god-knows-how-many different servers around the company.
Oh well.. this adds optional PERSONALIZE_SERVERNAME and PERSONALIZE_MAILBOXNAME settings to it - the mailbox name isn't necessarily same as username. Oh and the mailbox name can contain dots in it so the mailboxRegex also tweaked. Didn't test this in action but based on visual inspection of the results it seems to do what it's supposed to.
Further todo: currently only the Mail Account entry is fixed, other places potentially needing fixing of username and server name are Tasks-, Addressbook- and Calendar Source.
- Panu -
--- evolution-gconf-tools-0.1.0/lib/personalizevisitor.py.server 2005-04-15 08:11:16.719442154 +0300 +++ evolution-gconf-tools-0.1.0/lib/personalizevisitor.py 2005-04-15 08:41:29.216205051 +0300 @@ -22,9 +22,11 @@
"""Personalize from a prototype account""" class PersonalizeVisitor(EvolutionAccountGConfVisitor): - def __init__(self, username, friendly_name): + def __init__(self, username, friendly_name, mailbox_name, server_name): self.username = username; self.friendly_name = friendly_name; + self.mailbox_name = mailbox_name + self.server_name = server_name
def personalizeHumanReadableName(self, nameText): # The general case isn't doable, but look for things of the form SOMEONE@SOMETHING and remap to our username; hopefully this should work for many cases: @@ -85,8 +87,18 @@ pat = re.compile(patternText); mo = pat.search(urlText);
+ if self.server_name: + server = self.server_name + else: + server = mo.group(2) + + if self.mailbox_name: + mailbox = self.mailbox_name + else: + mailbox = self.username + # Personalise the URI and the mailbox: - newUrlText = "exchange://"+self.username+"@"+mo.group(2)+"/;pf_server="+mo.group(3)+";owa_path="+mo.group(4)+";mailbox="+self.username+";"+mo.group(6) + newUrlText = "exchange://"+self.username+"@"+server+"/;pf_server="+server+";owa_path="+mo.group(4)+";mailbox="+mailbox+";"+mo.group(6)
#print urlText #print newUrlText @@ -195,6 +207,8 @@ # grab configuration information from environment username = os.getenv("PERSONALIZE_USERNAME") friendlyName = os.getenv("PERSONALIZE_FULLNAME") + mailboxName = os.getenv("PERSONALIZE_MAILBOXNAME") + serverName = os.getenv("PERSONALIZE_SERVERNAME")
if username==None: print >> sys.stderr, "You must set the PERSONALIZE_USERNAME environment variable" @@ -205,7 +219,7 @@ sys.exit(-1)
# process: - gconfEntries.accept(PersonalizeVisitor(username, friendlyName)) + gconfEntries.accept(PersonalizeVisitor(username, friendlyName, mailboxName, serverName))
# output the result: print gconfEntries.dom.toxml() --- evolution-gconf-tools-0.1.0/lib/common.py.server 2005-04-15 08:37:19.951153360 +0300 +++ evolution-gconf-tools-0.1.0/lib/common.py 2005-04-15 08:27:03.437583797 +0300 @@ -42,5 +42,5 @@
schemeRegex = "([a-z]*)"; usernameRegex = "([A-Za-z0-9\\%]*)"; -mailboxRegex = "([A-Za-z0-9]*)"; +mailboxRegex = "([A-Za-z0-9.]*)"; hostnameRegex = "([A-Za-z0-9\.]*)";
On Fri, 2005-04-15 at 08:48 +0300, Panu Matilainen wrote:
On Fri, 15 Apr 2005, Panu Matilainen wrote:
On Tue, 12 Apr 2005, David Malcolm wrote:
On Mon, 2005-04-11 at 14:27 -0700, Sean Bruno wrote:
Was curious if anyone has seen/used any kind of auto-setup scripts for large amounts of users. I have a couple of hundred pine/mutt users that I intend to move over to evolution sooner rather than later.
I would like to create their email accounts automatically, and not have to setup each one seperately as they login.
Sean
I've written some Python scripts to make it easier to work with Evolution's configuration information, in the hope of automating mass deployments of Evolution.
[...]
I've tested this, and had it working for an Evolution 2.0 deployment. I suspect the approach will break under some circumstances, and with different versions of Evolution. Comments and patches welcome.
Hey, this and Mark's LDAP gconf backend are a really nice start. What's currently missing for my environment is PERSONALIZE_SERVERNAME as there are god-knows-how-many different servers around the company.
Thanks; sorry about the delay in replying.
From a brief reading of the patch it looks good, but I haven't got it to
apply yet. Please can you resend this as an attachment rather than inline? I tried fixing up the wordwraps and whitespace but Python hates me :-(
Oh well.. this adds optional PERSONALIZE_SERVERNAME and PERSONALIZE_MAILBOXNAME settings to it - the mailbox name isn't necessarily same as username. Oh and the mailbox name can contain dots in it so the mailboxRegex also tweaked. Didn't test this in action but based on visual inspection of the results it seems to do what it's supposed to.
Ideally we'd have a test suite to go with this; it would be nice to have it verify on "make test" that the output of personalization is as expected.
Further todo: currently only the Mail Account entry is fixed, other places potentially needing fixing of username and server name are Tasks-, Addressbook- and Calendar Source.
It should already fixup the username; it would be the server name that would need fixing in that case. Further patches welcome!
Dave
On Wed, 2005-04-20 at 14:24 -0400, David Malcolm wrote:
On Fri, 2005-04-15 at 08:48 +0300, Panu Matilainen wrote:
On Fri, 15 Apr 2005, Panu Matilainen wrote:
On Tue, 12 Apr 2005, David Malcolm wrote:
On Mon, 2005-04-11 at 14:27 -0700, Sean Bruno wrote:
Was curious if anyone has seen/used any kind of auto-setup scripts for large amounts of users. I have a couple of hundred pine/mutt users that I intend to move over to evolution sooner rather than later.
I would like to create their email accounts automatically, and not have to setup each one seperately as they login.
Sean
I've written some Python scripts to make it easier to work with Evolution's configuration information, in the hope of automating mass deployments of Evolution.
[...]
I've tested this, and had it working for an Evolution 2.0 deployment. I suspect the approach will break under some circumstances, and with different versions of Evolution. Comments and patches welcome.
Hey, this and Mark's LDAP gconf backend are a really nice start. What's currently missing for my environment is PERSONALIZE_SERVERNAME as there are god-knows-how-many different servers around the company.
Thanks; sorry about the delay in replying.
From a brief reading of the patch it looks good, but I haven't got it to
apply yet. Please can you resend this as an attachment rather than inline? I tried fixing up the wordwraps and whitespace but Python hates me :-(
Oh well.. this adds optional PERSONALIZE_SERVERNAME and PERSONALIZE_MAILBOXNAME settings to it - the mailbox name isn't necessarily same as username. Oh and the mailbox name can contain dots in it so the mailboxRegex also tweaked. Didn't test this in action but based on visual inspection of the results it seems to do what it's supposed to.
Ideally we'd have a test suite to go with this; it would be nice to have it verify on "make test" that the output of personalization is as expected.
Further todo: currently only the Mail Account entry is fixed, other places potentially needing fixing of username and server name are Tasks-, Addressbook- and Calendar Source.
It should already fixup the username; it would be the server name that would need fixing in that case. Further patches welcome!
This is now in GNOME CVS as the module "evolution-gconf-tools"
On Fri, 2005-04-29 at 17:39 -0400, David Malcolm wrote:
On Wed, 2005-04-20 at 14:24 -0400, David Malcolm wrote:
On Fri, 2005-04-15 at 08:48 +0300, Panu Matilainen wrote:
On Fri, 15 Apr 2005, Panu Matilainen wrote:
On Tue, 12 Apr 2005, David Malcolm wrote:
On Mon, 2005-04-11 at 14:27 -0700, Sean Bruno wrote:
Was curious if anyone has seen/used any kind of auto-setup scripts for large amounts of users. I have a couple of hundred pine/mutt users that I intend to move over to evolution sooner rather than later.
I would like to create their email accounts automatically, and not have to setup each one seperately as they login.
Sean
I've written some Python scripts to make it easier to work with Evolution's configuration information, in the hope of automating mass deployments of Evolution.
[...]
I've tested this, and had it working for an Evolution 2.0 deployment. I suspect the approach will break under some circumstances, and with different versions of Evolution. Comments and patches welcome.
Hey, this and Mark's LDAP gconf backend are a really nice start. What's currently missing for my environment is PERSONALIZE_SERVERNAME as there are god-knows-how-many different servers around the company.
Thanks; sorry about the delay in replying.
From a brief reading of the patch it looks good, but I haven't got it to
apply yet. Please can you resend this as an attachment rather than inline? I tried fixing up the wordwraps and whitespace but Python hates me :-(
Oh well.. this adds optional PERSONALIZE_SERVERNAME and PERSONALIZE_MAILBOXNAME settings to it - the mailbox name isn't necessarily same as username. Oh and the mailbox name can contain dots in it so the mailboxRegex also tweaked. Didn't test this in action but based on visual inspection of the results it seems to do what it's supposed to.
Ideally we'd have a test suite to go with this; it would be nice to have it verify on "make test" that the output of personalization is as expected.
Further todo: currently only the Mail Account entry is fixed, other places potentially needing fixing of username and server name are Tasks-, Addressbook- and Calendar Source.
It should already fixup the username; it would be the server name that would need fixing in that case. Further patches welcome!
This is now in GNOME CVS as the module "evolution-gconf-tools"
and they now have a page on the GNOME wiki here: http://live.gnome.org/Evolution_2fGConfTools
Dave
desktop@lists.stg.fedoraproject.org