<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LiveAverage &#187; perl zimbra zmprov provisioning</title>
	<atom:link href="http://liveaverage.com/tag/perl-zimbra-zmprov-provisioning/feed/" rel="self" type="application/rss+xml" />
	<link>http://liveaverage.com</link>
	<description>I can&#039;t afford to live any other way.</description>
	<lastBuildDate>Tue, 08 May 2012 21:26:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Perl my way to happiness</title>
		<link>http://liveaverage.com/features/coding/perl-my-way-to-happiness/</link>
		<comments>http://liveaverage.com/features/coding/perl-my-way-to-happiness/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 19:00:49 +0000</pubDate>
		<dc:creator>JR</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[perl zimbra zmprov provisioning]]></category>

		<guid isPermaLink="false">http://liveaverage.com/?p=4</guid>
		<description><![CDATA[If only everything was as easy &#38; straight-forward as account provisioning in Zimbra: !/usr/bin/perl # ZCS IMPORT SCRIPT # Provided by : ZCS Wiki # Modified by : J.R. # Last Change : 2008.04.09 # # Lookup the valid COS (Class of Service) ID in the interface or like this my $cosid = `su - [...]]]></description>
			<content:encoded><![CDATA[<p>If only everything was as easy &amp; straight-forward as account provisioning in Zimbra:</p>
<pre class="brush: bash;">!/usr/bin/perl

# ZCS IMPORT SCRIPT
#       Provided by : ZCS Wiki
#       Modified by : J.R.
#       Last Change : 2008.04.09
#
# Lookup the valid COS (Class of Service) ID in the interface or like this
my $cosid = `su - zimbra -c 'zmprov gc apd |grep zimbraId:'`;
$cosid =~ s/zimbraId:\s*|\s*$//g;

while (&lt;&gt;) {
chomp;

# CHANGE ME: To the actual fields you use in your CSV file
my ($email, $password, $first, $last) = split(/\,/, $_, 4);

my ($uid, $domain) = split(/@/, $email, 2);

print qq{ca $uid\@$domain $password\n};
print qq{ma $uid\@$domain zimbraCOSid &quot;$cosid&quot;\n};
print qq{ma $uid\@$domain givenName &quot;$first&quot;\n};
print qq{ma $uid\@$domain sn &quot;$last&quot;\n};
print qq{ma $uid\@$domain cn &quot;$uid&quot;\n};
print qq{ma $uid\@$domain displayName &quot;$first $last&quot;\n};

#Set the user's reply or canonical address
print qq{ma $uid\@$domain zimbraMailCanonicalAddress $uid\@cityof*****.org\n};

#Add e-mail account alias for multiple domains
#Verify domain is correctly working for provisioning aliases

print qq{aaa $uid\@$domain $uid\@cityof*****.com\n};

#Add all users to a general distribution list and terminate
#Add multiple distro-lists if desired
print qq{adlm dept.all\@cityof*****.org $uid\@cityof*****.org\n};
print qq{\n};

}</pre>
]]></content:encoded>
			<wfw:commentRss>http://liveaverage.com/features/coding/perl-my-way-to-happiness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
