<?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>Musings of an Apple Systems Administrator</title>
	<atom:link href="http://www.jonsblog.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jonsblog.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 31 Jan 2010 04:46:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Missing a file? Scrub that hard drive</title>
		<link>http://www.jonsblog.org/2010/01/29/missing-a-file-scrub-that-hard-drive/</link>
		<comments>http://www.jonsblog.org/2010/01/29/missing-a-file-scrub-that-hard-drive/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 20:48:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Data Recovery]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[missing]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=94</guid>
		<description><![CDATA[Today one of the most dreaded things happened to me, the phrase that makes every IT professional shudder. I can not find my file. Ok, after running through all of the basic questions and making sure that they saved it and that it was not accidentally deleted I decided to search their hard drive. 
After [...]]]></description>
			<content:encoded><![CDATA[<p>Today one of the most dreaded things happened to me, the phrase that makes every IT professional shudder. I can not find my file. Ok, after running through all of the basic questions and making sure that they saved it and that it was not accidentally deleted I decided to search their hard drive. </p>
<p>After many un-sucessfull attempts at using the search functionality (Spotlight), I decided to do some research on other methods for searching for files on the OSX platform. I came across the &#8220;locate&#8221; command for the Terminal.</p>
<p>I had never used this command before so I did some reading and I ran</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>locate.updatedb</pre></td></tr></table></div>

<p> this ran the initial database rebuild which added many new entries into its database. I then ran <span id="more-94"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">locate</span> <span style="color: #ff0000;">'File Name here.txt'</span></pre></td></tr></table></div>

<p> and came up with a nice list  of files on the users computer, however the problem was that all of the files we found were older revisions of the file that he had lost. I decided that the only way we were going to find his file was to use a much more aggressive approach. </p>
<p>I decided to use the &#8220;find&#8221; command, this works similar to the &#8220;locate&#8221; command but it searches the folder, directory or entire volume that you want. It allows you to be as specific or as vague as you want as well. For example</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'filename.txt'</span></pre></td></tr></table></div>

<p> will search the entire volume for a file with the name filename.txt. You can also search for wildcards as well</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'*.txt'</span></pre></td></tr></table></div>

<p> which will generate a list of all of the text files on the computer. Notice I used a period here instead of a slash, these are where you can customize the location of the search.</p>
<p>So I let this run, the &#8220;find&#8221; command is considerably slower than the &#8220;locate&#8221; command because it does not use a database rather it searches live through the hard drive on the system that you are using. After about 20 minutes letting it scan the entire hard drive, every user account and every directory we came up with a few more results but again nothing that had his new content. I was really hoping that at this point he had accidentally deleted it or something.</p>
<p>I decided to ask him for a phrase located in the text file that could be used as a search term. To search for a phrase in a text document in the terminal run</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-name</span> <span style="color: #ff0000;">'*.xlsx'</span> <span style="color: #660033;">-exec</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-li</span> <span style="color: #ff0000;">'ethiopia'</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> \;</pre></td></tr></table></div>

<p> this will find any reference to the word ethiopia located in a Excel file. I let this run and again slow but effective it revealed more results but nothing. I explained to the gentleman that I could try looking at the tape backups but it would take me some time.  He asked me if I could do that.</p>
<p>It was a long walk back upstairs, I loaded the first tape into the drive and got ready. I began the search. Not 10 minutes later did I get a phone call back saying, that he had found the file on a thumb drive that he had. Go figure, turns out that no matter how many cool ways there are to search a hard drive none of them will index a thumb drive in someones pocket.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2010/01/29/missing-a-file-scrub-that-hard-drive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPad The Good, The Bad, The Ugly&#8230;</title>
		<link>http://www.jonsblog.org/2010/01/29/ipad-the-good-the-bad-the-ugly/</link>
		<comments>http://www.jonsblog.org/2010/01/29/ipad-the-good-the-bad-the-ugly/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 01:40:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[musings]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=82</guid>
		<description><![CDATA[The iPad was recently announced and it has gotten a lot of people talking. A lot of people looking back at the old Mac Tablet rumor sites and wishing it was what is isn&#8217;t an interactive Tablet Computer. However ever since I can remember no matter what the Apple product was as soon as it [...]]]></description>
			<content:encoded><![CDATA[<p>The iPad was recently announced and it has gotten a lot of people talking. A lot of people looking back at the old Mac Tablet rumor sites and wishing it was what is isn&#8217;t an interactive Tablet Computer. However ever since I can remember no matter what the Apple product was as soon as it was announced people immediately became vocal about what they felt was missing from their new device.</p>
<p>Comments like, the Apple TV should have included a Tuner and a DVR, or the Apple Hi-Fi should have been made as a more portable unit with more functionality.  I guess no matter what the product is there are two truths, it&#8217;s not meant to be a perfect product for everyone simply the masses and with every product no matter how intuitive or ingenious there is always room for improvement.  <span id="more-82"></span></p>
<p>The good thing about the iPad is that Apple has figured out another way to sell great content. The iPod  brought us the iTunes music store. The Apple TV brought us movies that we could rent. The iPhone brought us the App Store. Now the iPad brings yet another venue the iBook Store. Trying hard to compete with devices like the Kindle, Apple has staked claim on yet another content niche.</p>
<p>Soon enough there will be keynote presentations where Apple will claim that they are the largest Music, Video and Book content provider in the world and at that time the iPad will be more of a modern institution rather than a foreign entity. So what you can do with the iPad, you can do many good things. Listen to music, watch videos, browse the internet, use apps, read books, play games and more. Could it do more? Sure, it could. Will it eventually? Sure it will.</p>
<p>The bad thing about the iPad is that it is not what everyone really wanted when they were first thinking about what this product would eventually be. Who knows, maybe there is a tablet computer rolling around in Job&#8217;s head. But for those of us, myself included who were hoping for a computer, <a href="http://usa.autodesk.com/adsk/servlet/pc/index?id=6848332&amp;siteID=123112" target="_blank">a graphics tablet</a>, a stylus interface, and a breakthrough in how we look at performing our day to day tasks, well we will have to keep dreaming, and hoping for the future. For some of us with the cash, we can live the dream now by getting the<a href="http://www.axiotron.com/index.php?id=modbook" target="_blank"> ModBook by Axiotron.</a> This device is what many Mac fans were expecting.</p>
<p>From the perspective of a systems administrator, this <em>could b</em><em>e</em> a technical and logistical nightmare when you consider people doing work on these on secured networks where encryption is important. From a hardware perspective if you ever had to perform your own battery replacement or even from the philosophical angle, is this a computer, or is it just a cool content viewer. If it is the later, then will or should IT Departments support such a device.</p>
<p>The Ugly thing that I believe is more of a philosophical debate is the slow agonizing death of the printed word in its truest format. While we all know Print Media is dying and we have known that for a long time, many will argue that bookstores and books are not going anywhere while that may be true I lived in a state recently and witnessed the death of its last newspaper.</p>
<p>Thats right, in the state of Maine every newspaper has gone out of business. I am not saying that the iPad is or will kill off traditional media or that it has but its just one device closer to its extinction. Perhaps I am just nostalgic for the days when I used to like to read the comics as a kid, getting them out of the middle of the sunday paper, was and always will be a special memory for me.</p>
<p>No matter what, side of the fence you land on, Apple has made a smart move by entering into this market. Apple is a company and I am sure they have a plan for everything that they do. They have methodically created each new device over the past 4 years and released each one with a new content store. Perhaps Apple is planning a takeover of all digital content, and its syndication rights. Only one man knows and it certainly is not me. For now I will just sit back and watch my Apple stock soar, thanks Steve.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2010/01/29/ipad-the-good-the-bad-the-ugly/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>10.6.2 Mail Server draws a blank, subject?</title>
		<link>http://www.jonsblog.org/2010/01/26/10-6-2-mail-server-draws-a-blank-subject/</link>
		<comments>http://www.jonsblog.org/2010/01/26/10-6-2-mail-server-draws-a-blank-subject/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 00:14:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[OSX Server Configuration]]></category>
		<category><![CDATA[blank]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[subject]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=71</guid>
		<description><![CDATA[So we upgraded from 10.5.8 Mail server to 10.6.2 and everything went very smoothly. Mailstores were migrated and the transition from Cyrus to Dovecot was great. However once all the email was moved over and all the settings were double, and triple checked. People started complaining that every once in a while their email was [...]]]></description>
			<content:encoded><![CDATA[<p>So we upgraded from 10.5.8 Mail server to 10.6.2 and everything went very smoothly. Mailstores were migrated and the transition from Cyrus to Dovecot was great. However once all the email was moved over and all the settings were double, and triple checked. People started complaining that every once in a while their email was not getting through the server, it was getting bounced back to the sender. At first I thought that it was an internal issue with the users on our network, then I got a complaint from someone from outside the organization trying to send an email to one of our users.</p>
<p>Great, another strange Apple bug I thought until someone was able to forward me the bounced email to my personal email account. Further insight in the error showed that the message was getting bounced back due to a blank subject line. <span id="more-71"></span> As you can see from the example below its due to a blank or empty subject heading.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">=====================================
This is the mail system at host mail.xxxxxxx.org.
&nbsp;
I<span style="color: #ff0000;">'m sorry to have to inform you that your message could not
be delivered to one or more recipients. It'</span>s attached below.
&nbsp;
For further assistance, please send mail to postmaster.
&nbsp;
If you <span style="color: #000000; font-weight: bold;">do</span> so, please include this problem report. You can
delete your own text from the attached returned message.
&nbsp;
The mail system
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;</span>user<span style="color: #000000; font-weight: bold;">@</span>domain.org<span style="color: #000000; font-weight: bold;">&gt;</span>: host
mail.domain.org http:<span style="color: #000000; font-weight: bold;">//</span>xx.xxx.xxx.xxx said: <span style="color: #000000;">550</span> 5.7.1 empty subject
=====================================</pre></td></tr></table></div>

<p>Yes, apparently Apple has added this as an actual &#8220;Feature&#8221;. You can turn this off however by commenting out the only line of code in the file /etc/postfix/custom_header_checks. Turn off the mail service before you do this. Once the mail service is off edit the file using sudo pico.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>^subject: <span style="color: #000000; font-weight: bold;">*</span>$<span style="color: #000000; font-weight: bold;">/</span> REJECT empty subject header <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
into:
&nbsp;
<span style="color: #666666; font-style: italic;">#/^subject: *$/ REJECT empty subject header in /etc/</span></pre></td></tr></table></div>

<p>Start mail back up again and you will notice that the blank subject line blues are gone away.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2010/01/26/10-6-2-mail-server-draws-a-blank-subject/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10.6.2 Migrate Wiki Server &amp; DNS</title>
		<link>http://www.jonsblog.org/2010/01/25/10-6-2-migrate-dns-wiki-server/</link>
		<comments>http://www.jonsblog.org/2010/01/25/10-6-2-migrate-dns-wiki-server/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 12:08:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DNS Settings]]></category>
		<category><![CDATA[OSX Server Configuration]]></category>
		<category><![CDATA[Wiki Server]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[migrate]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=63</guid>
		<description><![CDATA[While migrating our servers services from 10.5 to our 10.6.2 production server one of the easiest migrations that I had found was to migrate the 10.5 Wiki. Simply copying files and making sure that the permissions remain in tact are really all you need. 
However in 10.6.2 there is a detachment from the way you [...]]]></description>
			<content:encoded><![CDATA[<p>While migrating our servers services from 10.5 to our 10.6.2 production server one of the easiest migrations that I had found was to migrate the 10.5 Wiki. Simply copying files and making sure that the permissions remain in tact are really all you need. </p>
<p>However in 10.6.2 there is a detachment from the way you authenticate. You create access for each blog based on the settings in the web interface rather than in Workgroup Manager. This threw me off a bit the first time due to the fact that I had already had our previous wiki server split up into groups using workgroup manager. </p>
<p>Here is how I migrated our wiki, the default directory for wiki and blogs on 10.5 and 10.6 is <span id="more-63"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Collaboration</pre></td></tr></table></div>

<p>Inside that folder, you’ll find a Groups folder of interest.  You’ll want to repeat the following procedure for each group:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> serveradmin stop teams
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">&lt;</span>Group Folder from Backup<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Collaboration<span style="color: #000000; font-weight: bold;">/</span>Groups<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> _teamsserver:_teamsserver <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Collaboration<span style="color: #000000; font-weight: bold;">/</span>Groups<span style="color: #000000; font-weight: bold;">/&lt;</span>group_directory<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Collaboration<span style="color: #000000; font-weight: bold;">/</span>dataVersion.plist
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Collaboration<span style="color: #000000; font-weight: bold;">/</span>globalIndex.db
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Application Support<span style="color: #000000; font-weight: bold;">/</span>Apple<span style="color: #000000; font-weight: bold;">/</span>WikiServer<span style="color: #000000; font-weight: bold;">/</span>directoryIndex.db
<span style="color: #c20cb9; font-weight: bold;">sudo</span> serveradmin start teams</pre></td></tr></table></div>

<p>Once you complete those steps, you’ll need to login as an administrator and set the permissions for the wiki(s).  10.6 removes the privileges for wikis from Workgroup Manager and instead allows for security management via the wiki web interface.</p>
<p>Once we were done with the wiki, we had to migrate over DNS this was a little bit scary however retyping our DNS records was equally as scary. I decided to try to migrate the settings since it was sanctioned by Apple. </p>
<p>Basically the first step was to stop DNS service on your Snow Leopard server. I then created a backup of my DNS config files that lived on my Snow Leopard server in the event that everything went bad.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>backups<span style="color: #000000; font-weight: bold;">/</span>dns; <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>dns <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>named <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>named.conf <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>backupsdns</pre></td></tr></table></div>

<p>I then preceded to copy the following files and folders from Leopard server into the same locations on Snow Leopard Server</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>dns
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>named.conf
<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>named</pre></td></tr></table></div>

<p>Once done start DNS via the command line on Snow Leopard server</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> serveradmin start dns</pre></td></tr></table></div>

<p>Next I urge you if you are going to try this test, test, test, test and test again. I got it almost 100% however there are a few fields in the DNS settings in Server Admin that do not exist in 10.5 Server. Also I did notice that it messed up my FQDN&#8217;s in some places. Tell me your migration headache story, or lack thereof.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2010/01/25/10-6-2-migrate-dns-wiki-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>10.6.2 Dovecot Mail Backups</title>
		<link>http://www.jonsblog.org/2010/01/24/10-6-2-dovecot-mail-backups/</link>
		<comments>http://www.jonsblog.org/2010/01/24/10-6-2-dovecot-mail-backups/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 00:08:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[OSX Server Configuration]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=33</guid>
		<description><![CDATA[Before migrating to 10.6 Server we were running our entire mailstore on the 10.5.8 platform. Say what you will about Leopard, once we had it set up correctly it ran fine. We migrated because of the greater benefits of Dovecot over Cyrus. Many of the other features intriqued us as well such as the improved [...]]]></description>
			<content:encoded><![CDATA[<p>Before migrating to 10.6 Server we were running our entire mailstore on the 10.5.8 platform. Say what you will about Leopard, once we had it set up correctly it ran fine. We migrated because of the greater benefits of Dovecot over Cyrus. Many of the other features intriqued us as well such as the improved Wiki server and iCal server. However we were really excited about Dovecots ability to repair itself basically doing away with the need to ever have to rebuild a users mailbox.</p>
<p>The one great thing about 10.5.8 was the development of <a href="http://osx.topicdesk.com/content/view/41/41/">Mailbfr</a> this was an amazing script that would help you backup your entire mailstore, recover email accounts, repair quotas, and of course rebuild or repair the entire mail-store. This was an invaluable tool, however since switching we have had to come up with our own solution.<span id="more-33"></span></p>
<p>We tried at first to get RSYNC running however this did not work because we did not have the permission to copy the mailstore with the permissions in tact. The reason is that while the root account does have access to look at the mailstore the secondary user on the mailstore folder is the mail user itself. Without running the script as each user then its near impossible to use RSYNC to move the mailstore or to even perform a simple backup.</p>
<p>Our solution was to create a backup script that use SCP with SCP we were able to move our mail-store to another drive on the server. It copies the store over and it resets the permissions to the administrator account. This solution works very well however after some time with a large mailstore you will run out of space on the target volume. Unlike RSYNC which uses hard links to save space SCP creates a new copy of the mailstore each time it is run.</p>
<p>In order to save space on the backup volume the oldest 2 weeks worth of backed up email gets dumped to DVD and removed from the drive on a monthly basis. This is fine but not optimal. Here is a copy of the script that we use on our server.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> backup started daily backup <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span><span style="color: #000000; font-weight: bold;">`</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>Volumes<span style="color: #000000; font-weight: bold;">/</span>EMAIL\ BACKUP<span style="color: #000000; font-weight: bold;">/</span>Backup<span style="color: #000000; font-weight: bold;">/</span>Logs<span style="color: #000000; font-weight: bold;">/</span>Backup_log.txt
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">scp</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>Volumes<span style="color: #000000; font-weight: bold;">/</span>Mailstore-Location<span style="color: #000000; font-weight: bold;">/</span>spool <span style="color: #000000; font-weight: bold;">/</span>Volumes<span style="color: #000000; font-weight: bold;">/</span>EMAIL\ BACKUP<span style="color: #000000; font-weight: bold;">/</span>Email-Backups<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>d<span style="color: #7a0874; font-weight: bold;">&#41;</span>-$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>m<span style="color: #7a0874; font-weight: bold;">&#41;</span>-$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>Y<span style="color: #7a0874; font-weight: bold;">&#41;</span>backup 
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> backup daily backup completed <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span><span style="color: #000000; font-weight: bold;">`</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>Volumes<span style="color: #000000; font-weight: bold;">/</span>EMAIL\ BACKUP<span style="color: #000000; font-weight: bold;">/</span>Backup<span style="color: #000000; font-weight: bold;">/</span>Logs<span style="color: #000000; font-weight: bold;">/</span>Backup_log.txt</pre></td></tr></table></div>

<p>This will backup the mailstore and then log each time that it does so. To recover an email to the original mailstore is not as hard as it seems. Navigate to the backed up mailstore destination and match up the name of the folder to the users UID of which you want to recover. For example if the users UID is 7458-58713-952554-544226 then you would look for a folder with the same name. Once in the folder you can copy or look at individual email files. Find the ones or one that you need and copy it to the folder of the original mailstore. In order to do this you will have to use sudo. For example this is how you would restore the entire folder</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">scp</span> <span style="color: #660033;">-r</span> <span style="color: #ff0000;">&quot;Volumes/EMAIL\ BACKUP/Email-Backups/7458-58713-952554-544226/.*&quot;</span> <span style="color: #ff0000;">&quot;/Volumes/Mailstore-Location/spool/7458-58713-952554-544226/.*&quot;</span></pre></td></tr></table></div>

<p>Until <a href="http://osx.topicdesk.com/content/view/41/41/">Mailbfr</a> comes back for Dovecot this is how we are protecting ourself against the accidental loss of email. I am not saying that this is the best method it is simply the one we are using. If you have another solution that works bette than please let me know and share your own experience!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2010/01/24/10-6-2-dovecot-mail-backups/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>10.6.2 Split Horizon DNS</title>
		<link>http://www.jonsblog.org/2010/01/23/10-6-2-split-horizon-dns/</link>
		<comments>http://www.jonsblog.org/2010/01/23/10-6-2-split-horizon-dns/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 23:50:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DNS Settings]]></category>
		<category><![CDATA[OSX Server Configuration]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[split horizon]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=28</guid>
		<description><![CDATA[The DNS interface in Server Admin.app is not suitable for doing a split-horizon DNS configuration. It simply doesn&#8217;t expose all of the flexibility of bind that you need to pull off such a configuration.
If you poke around the bind config files on your OS X Server, you&#8217;ll be able to see how apple has set [...]]]></description>
			<content:encoded><![CDATA[<p>The DNS interface in Server Admin.app is not suitable for doing a split-horizon DNS configuration. It simply doesn&#8217;t expose all of the flexibility of bind that you need to pull off such a configuration.</p>
<p>If you poke around the bind config files on your OS X Server, you&#8217;ll be able to see how apple has set them up so that you can edit them directly without confusing the GUI. /var/named contains zone files that you may edit, and they include corresponding files in /var/named/zones which you should not edit. They&#8217;ve done something similar for /etc/named.conf and the files in /etc/dns/.</p>
<p>Having said that, I recommend not doing both internal and external resolving for split-horizon DNS on your server, mainly because:</p>
<ol>
<li>It&#8217;s kind of complicated, and you lose any convenience you had when you were able to use the GUI exclusively</li>
<li>You have NAT, which makes it even more complicated</li>
<li>There are solutions available from third parties that are better-performing, cheap/free, and more robust</li>
</ol>
<p><span id="more-28"></span>In my organization, we use DNS in Mac OS X Server extensively for the internal part of a split-horizon setup. We use the &#8220;Advanced DNS&#8221; part of a network solutions account for the external part. It comes free with the domains we&#8217;ve purchased, and has redundancy and speed far greater than what I could justify for hosting a handful or externally-resolving names myself.</p>
<p>You need to reconfigure BIND to use &#8220;views&#8221; with two different versions of your zone file, such that access from inside your network gives the 192.168.1/24 (internal) addresses, but requests forwarded from outside (via your 2-Wire router) give out your static public IP.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">acl internal <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    127.0.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8</span>;
    192.168.1.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span>;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>;
&nbsp;
view <span style="color: #ff0000;">&quot;internal&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    match-clients <span style="color: #7a0874; font-weight: bold;">&#123;</span> internal; <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
    zone <span style="color: #ff0000;">&quot;mydomain.com&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #7a0874; font-weight: bold;">type</span> master;
        <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #ff0000;">&quot;/etc/bind/internal/db.mydomain.com&quot;</span>;
     <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>;
&nbsp;
view <span style="color: #ff0000;">&quot;external&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    match-clients <span style="color: #7a0874; font-weight: bold;">&#123;</span> any; <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
    zone <span style="color: #ff0000;">&quot;mydomain.com&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #7a0874; font-weight: bold;">type</span> master;
        <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #ff0000;">&quot;/etc/bind/external/db.mydomain.com&quot;</span>;
    <span style="color: #7a0874; font-weight: bold;">&#125;</span>;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>;</pre></td></tr></table></div>

<p>For more information check this out it is a <a href="http://www.howtoforge.com/two%5Fin%5Fone%5Fdns%5Fbind9%5Fviews">How To with more detailed instruction</a>s for Split Horizon DNS configuration.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2010/01/23/10-6-2-split-horizon-dns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10.6.2 Squirrelmail, LDAP &amp; Sieve</title>
		<link>http://www.jonsblog.org/2010/01/23/squirrelmail-ldap-sieve/</link>
		<comments>http://www.jonsblog.org/2010/01/23/squirrelmail-ldap-sieve/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 23:32:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[OSX System Administration]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[roundcube]]></category>
		<category><![CDATA[rules]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[side]]></category>
		<category><![CDATA[sieve]]></category>
		<category><![CDATA[squirrelmail]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=20</guid>
		<description><![CDATA[Snow Leopard 10.6 comes with built in Server Side rules (Sieve) that helps you to organize mail, if your like me and am supremely disappointed at the lack of functionality then you will be happy to know that there are alternatives out there. Snow Leopard still ships with a copy of Squirrel mail for OSX [...]]]></description>
			<content:encoded><![CDATA[<p>Snow Leopard 10.6 comes with built in Server Side rules (Sieve) that helps you to organize mail, if your like me and am supremely disappointed at the lack of functionality then you will be happy to know that there are alternatives out there. Snow Leopard still ships with a copy of Squirrel mail for OSX it also ships with many cool plugins for squirrel mail already installed. Lets look at the alternative to the built in Sieve scripts that ship with 10.6 Snow Leopard server.</p>
<p>To start with you must enable Sieve on your server to do this, start Server Admin, Mail &gt; Settings &gt; Advanced: Tick &#8220;PLAIN&#8221; on IMAP/POP and save it. Mail &gt; Settings &gt; Filters: Tick &#8220;Enable Server Side mail rules&#8221;, <span id="more-20"></span>save it and restart the mail service. once your done here you will be able to use the built in web based interface for handling server side rules. However you can also install your own!</p>
<p>SquirrelMail is the default webmailer in SLS. You can use the plugin avelsieve to manage server side mail rules. Download avelsieve (I recommend version 1.9.9) and unpack in directory /usr/share/squirrelmail/plugins (so that directory avelsieve is within the plugins dir). Note that you also need to download javascript_libs plugin, if you use a recent version (&gt;=1.9.8) of avelsieve. If you need the javascript_libs plugin, also unpack it in squirrelmail&#8217;s plugins dir. Then edit the file plugins/avelsieve/config/config.php (copy config_sample.php to config.php if not exisiting).</p>
<p>Change the authentication mechanism to</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$sieve_preferred_sasl_mech</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'PLAIN'</span><span style="color: #339933;">;</span></pre></div></div>

<p>Edit file /usr/share/squirrelmail/config/config.php and register the plugin(s)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$plugins</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'avelsieve'</span><span style="color: #339933;">;</span> <span style="color: #000088;">$plugins</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'javascript_libs'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//</span></pre></div></div>

<p>only if using a newer version of avelsieve. See avelsieve page Access the Webmailer (http://&lt;SLS_server_name&gt;/webmail/ and check the filter connection.</p>
<p><strong>SquirrelMail</strong> is the default webmailer in SLS. You can use the plugin avelsieve to manage server side mail rules. Download avelsieve (I recommend version 1.9.9) and unpack in directory /usr/share/squirrelmail/plugins (so that directory avelsieve is within the plugins dir).Note that you also need to download javascript_libs plugin, if you use a recent version (&gt;=1.9.8) of avelsieve.If you need the javascript_libs plugin, also unpack it in squirrelmail&#8217;s plugins dir.</p>
<p>Then edit the file plugins/avelsieve/config/config.php (copy config_sample.php to config.php if not exisiting).Change the authentication mechanism to</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$sieve_preferred_sasl_mech</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'PLAIN'</span><span style="color: #339933;">;</span></pre></div></div>

<p>Edit file /usr/share/squirrelmail/config/config.php and register the</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">plugin<span style="color: #009900;">&#40;</span>s<span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span><span style="color: #000088;">$plugins</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'avelsieve'</span><span style="color: #339933;">;</span><span style="color: #000088;">$plugins</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'javascript_libs'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//</span></pre></div></div>

<p>only if using a newer version of avelsieve. See avelsieve page Access the Webmailer (http://&lt;SLS_server_name&gt;/webmail/ and check the filter connection.</p>
<p><strong>Roundcube</strong>: Sorrily Apple decided to use the old-fashioned, ugly SquirrelMail webmailer and not RoundCube. RoundCube is much nicer and also the &#8220;managesieve&#8221; plugin available for it is much better than avelsieve in SquirrelMail. Luckily you can install RoundCube on your SLS without harming the default installation.</p>
<p>Enable managesieve plugin ManageSieve plugin comes with RoundCube. To enable it, edit file roundcube/config/main.inc.php:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$rcmail_config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'plugins'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'managesieve'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Then edit file plugins/managesieve/lib/Net/Sieve.php comment line</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$supportedAuthMethods</span><span style="color: #339933;">=....</span> <span style="color: #009900;">&#40;</span>comment with <span style="color: #666666; font-style: italic;">//)</span></pre></div></div>

<p>uncomment line</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$supportedAuthMethods</span><span style="color: #339933;">=</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'PLAIN'</span> <span style="color: #339933;">,</span> <span style="color: #0000ff;">'Login'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Set timezone:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">date</span><span style="color: #339933;">.</span>timezone <span style="color: #339933;">=</span> Europe<span style="color: #339933;">/</span>Berlin</pre></div></div>

<p>Now test roundcube by accessing http:///roundcube/ Login as a user you like to change server side rules for. Click on &#8220;Settings&#8221; in the upper right corner, then on Filter. If you see the page and no error occurs, you are successfully connected to the sieve backend of IMAP! You now can create your rules.</p>
<p>The good thing is, that every rule managing application (Apple web rule management, SquirrelMail, RoundCube) you use, store its own file. So one app is not overwriting the others config file. This is of importance if you enable the apple built-in crippled rule management and store the rules, there. This creates an own file &#8220;wiki_server_rules.sieve&#8221; in your sieve script dir and enables it by the link dovecot.sieve -&gt; wiki_server_rules.sieve</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2010/01/23/squirrelmail-ldap-sieve/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>10.6.2 Roundcube &amp; LDAP</title>
		<link>http://www.jonsblog.org/2010/01/18/10-6-2-roundcube-ldap/</link>
		<comments>http://www.jonsblog.org/2010/01/18/10-6-2-roundcube-ldap/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 05:30:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[OSX Server Configuration]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[roundcube]]></category>
		<category><![CDATA[squirrelmail]]></category>
		<category><![CDATA[webmail]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=11</guid>
		<description><![CDATA[So like many other organizations mine was finally fed up with Horde as a webmail system. They had used squirrel mail in the past and was unimpressed by the graphical interface but admitted that it while it lacked glamour it always did perform as they would have expected. Before I had started there their mail [...]]]></description>
			<content:encoded><![CDATA[<p>So like many other organizations mine was finally fed up with Horde as a webmail system. They had used squirrel mail in the past and was unimpressed by the graphical interface but admitted that it while it lacked glamour it always did perform as they would have expected. Before I had started there their mail system was running on a Linux box using Plesk and running Horde as their primary webmail interface. Immediately I got them into an XServe running OSX mail since their entire organization consisted of Apple iMacs figured it was the way to go, and got them setup with Squirrelmail and Roundcube.</p>
<p>I found Roundcube to be extremely easy to setup, however sort of hard to configure and tweak for use on an OSX Server. The biggest drawback to the old mail system was that while everyone had email accounts they were local accounts meaning their was no LDAP database at work so there was no way to have an auto complete or global LDAP address book <span id="more-11"></span> that most of the people at our organization really craved. I decided that when moving to 10.6.2 we would have to get this feature established and I am documenting this here clearly as I found there was limited documentation for and I know there are many people using 10.6.2 and Roundcube together. </p>
<p>Once Roundcube is installed head over to main.inc.php in the Roundcube config directory. I wanted the user to have access to the LDAP address book and also have the ability to have their own so on this line make sure that SQL is chosen as the primarty type of address book if this is your intent.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$rcmail_config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'address_book_type'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'sql'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>in the main.inc.php file the LDAP settings are kind of tricky. It gives  you an example of a functional LDAP setup below for an organization named Verisign locate these lines in the main.inc.php file</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// In order to enable public ldap search, configure an array like the Verisign</span>
<span style="color: #666666; font-style: italic;">// example further below. if you would like to test, simply uncomment the example.</span>
<span style="color: #000088;">$rcmail_config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'ldap_public'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>Verisign<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Notice that the third line is un-commented meaning that it is an active setting. Which means that what we are about to do below will not register until we comment out this line otherwise there will be two active configurations and neither will work this really tripped me up and had me stumped for days until I realized that I had two</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"> <span style="color: #000088;">$rcmail_config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'ldap_public'</span><span style="color: #009900;">&#93;</span></pre></td></tr></table></div>

<p> attributes at work at the same time so next comment this out as below.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// In order to enable public ldap search, configure an array like the Verisign</span>
<span style="color: #666666; font-style: italic;">// example further below. if you would like to test, simply uncomment the example.</span>
<span style="color: #666666; font-style: italic;">// $rcmail_config['ldap_public'] = array(Verisign);</span></pre></td></tr></table></div>

<p>Once this is done go down to the example below and start uncommenting the LDAP configuration lines one by one and filling out the information as you go here is an example of my configuration for the Name use whatever name you want the address book to show up as in the roundcube address book area. Your host name should be the fully qualified domain name of your directory server. Your default port on an ODM is 389. Only use TLS if you are using a secure SSL connection and always use User Specific so that the user is what is causing the OD Bind during lookups rather than the Directory Admin.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$rcmail_config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'ldap_public'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Verisign'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
  <span style="color: #0000ff;">'name'</span>          <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'Company Name'</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'hosts'</span>         <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'fullyqualified.domainofdirectoryserver.com'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'port'</span>          <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">389</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'use_tls'</span>	    <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'user_specific'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span></pre></td></tr></table></div>

<p>Next you must define the Base Search DN which is always your fully qualified domain name split up using dc= so if your directory name was directory.verisign.com then your base dn would be dc=directory, dc=verisign, dc=com. Here is what is not documented in many places it took me a long time to figure out that the Bind DN must have an active user or the directory admins UID here as well as cn=users, so that it knows how to find that user. I also configured mine to be non writable because I was unsure how safe this would be with the ODM.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #0000ff;">'base_dn'</span>       <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'dc=fullyqualified,dc=domainofdirectoryserver,dc=com'</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'bind_dn'</span>       <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'uid=DirAdmin,cn=users,dc=fullyqualified,dc=domainofdirectoryserver,dc=com'</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'bind_pass'</span>     <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'DirAdmin_Password'</span><span style="color: #339933;">,</span>
  <span style="color: #0000ff;">'writable'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span></pre></td></tr></table></div>

<p>In order to get an actual accurate listing in the address book you must tweak the settings to include the specific user settings int he ODM LDAP directory.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #0000ff;">'LDAP_Object_Classes'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;top&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;person&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;inetOrgPerson&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;abxldapPerson&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> 
  <span style="color: #0000ff;">'required_fields'</span>     <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;givenName&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;cn&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;sn&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;mail&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>    
  <span style="color: #0000ff;">'LDAP_rdn'</span>      <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'mail'</span><span style="color: #339933;">,</span> 
  <span style="color: #0000ff;">'ldap_version'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span>      
  <span style="color: #0000ff;">'search_fields'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'givenName'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'cn'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'sn'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'mail'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>  <span style="color: #666666; font-style: italic;">// fields to search in</span>
  <span style="color: #0000ff;">'name_field'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'cn'</span><span style="color: #339933;">,</span>    
  <span style="color: #0000ff;">'email_field'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'mail'</span><span style="color: #339933;">,</span>  
  <span style="color: #0000ff;">'surname_field'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'sn'</span><span style="color: #339933;">,</span>   
  <span style="color: #0000ff;">'firstname_field'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'givenName'</span><span style="color: #339933;">,</span> 
  <span style="color: #0000ff;">'sort'</span>          <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'givenName'</span><span style="color: #339933;">,</span>    
  <span style="color: #0000ff;">'scope'</span>         <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'sub'</span><span style="color: #339933;">,</span>  
  <span style="color: #0000ff;">'filter'</span>        <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'givenName=*'</span><span style="color: #339933;">,</span>     
  <span style="color: #0000ff;">'fuzzy_search'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>These settings will help you establish the correct mappings to Last Name, First Name, Email Address and Full Name or Given Name. These settings were very hard to find as there was limited documentation on both Apples part and on the Roundcube forums. Once done here I set it up to auto complete from the sql address book first and then to default over to the LDAP address book.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// An ordered array of the ids of the addressbooks that should be searched</span>
<span style="color: #666666; font-style: italic;">// when populating address autocomplete fields server-side. ex: array('sql','Verisign');</span>
<span style="color: #000088;">$rcmail_config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'autocomplete_addressbooks'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sql'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Verisign'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>In parting my only piece of advice is to use the configuration here and remove the term Verisign and replace that variable with one that makes sense for you and your organization. Lastly if this does not work make sure that you have the correct domain name of the server and also ensure that you have enabled users to access the LDAP directory in Workgroup Manager.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2010/01/18/10-6-2-roundcube-ldap/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>10.5.8 Server Upgrade : Mail</title>
		<link>http://www.jonsblog.org/2010/01/17/leopard-server-upgrade-mail-10-6-2/</link>
		<comments>http://www.jonsblog.org/2010/01/17/leopard-server-upgrade-mail-10-6-2/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 05:11:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[OSX Server Configuration]]></category>
		<category><![CDATA[OSX System Administration]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[webmail]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=5</guid>
		<description><![CDATA[Recently I have undergone a massive change, we have decided at our organization to go with Snow Leopard server in place of our Leopard Servers. Knowing that this could be problematic to use Apples built in GUI for migrating data I decided to start with a 100% clean configured Snow Leopard server and slowly start [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I have undergone a massive change, we have decided at our organization to go with Snow Leopard server in place of our Leopard Servers. Knowing that this could be problematic to use Apples built in GUI for migrating data I decided to start with a 100% clean configured Snow Leopard server and slowly start to migrate items over to the new server. Our current Leopard Server was running an DNS, Open Directory Master, Mail, and Wiki Server services. I have decided to share my experience in migrating our mail from one server to another. <span id="more-5"></span></p>
<p>I setup the 10.6.2 Snow Leopard server clean before I did anything I setup DNS on the server and manually retyped and rechecked all of the DNS records from the 10.5 server to the 10.6.2 server. Once I verified that the DNS records were set. I checked the server&#8217;s DNS by running sudo changeip -checkhostname and it came back clean. Great good to go, or so I thought.</p>
<p>I had setup split horizon DNS on the server, the Open Directory Master, has already been setup on a single use Mac Mini Server. The Mac Mini Server is running the ODM and DNS. The DNS on the Mini is self referencing and my router has the public ip mapped to the private. The new Mail server (10.6.2) also running DNS had a record pointing to the public ip of the ODM. Great, next step bind the mail server to the ODM so that I can start to migrate mail accounts.</p>
<p>I was working on this project around 10:00pm in the evening not knowing how long that it would take to migrate the accounts from Cyrus to Dovecot, but I had studied the Apple upgrade instructions for weeks prior so I felt like I had it totally under control. I followed the instructions and used the code from page 42 of the manual.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>migrate_mail_data.pl <span style="color: #660033;">--moveMail</span> <span style="color: #000000;">0</span> <span style="color: #660033;">--cyrusBin</span> <span style="color: #ff0000;">&quot;/Volumes/10.5 Server Volume Name/usr/bin/cyrus/bin&quot;</span> <span style="color: #660033;">--database</span> <span style="color: #ff0000;">&quot;/Volumes/10.5 Server Volume Name/var/imap&quot;</span> <span style="color: #660033;">--sourceSpool</span> <span style="color: #ff0000;">&quot;/Volumes/10.5 Server Volume Name/var/spool/imap&quot;</span> <span style="color: #660033;">--targetSpool</span> <span style="color: #ff0000;">&quot;/var/spool/imap/dovecot/mail&quot;</span></pre></td></tr></table></div>

<p>The script will tell you if your doing something wrong, which is helpful. My biggest question was how long would it take to migrate 30GB of mail to the new mail server. The answer, exactly two hours. I had decided that instead of using a firewire cable to connect the two servers together that I would simply pop the HD out of the old mail server and put it into the new server. This made a huge difference in the time of migration.</p>
<p>Once it finished I turned on mail, and everything started working fine. Great! I cleaned up my tools and logged out of the server and went home around 2am. The next few days were pure hell. As mentioned above I decided to use split horizon DNS. It was my first attempt at doing this and what I had noticed in the logs were a myriad of disconnect warnings every 5 min the mail server was getting disconnected from the ODM and then reconnecting causing some major issues.</p>
<p>The log files were filling up so fast that they were causing kernel panics, I had to reboot the server many times once every couple of hours, I decided to call Apple. The Apple representative captured my logs, and promptly told me that I would have to reformat the hard drive and completely start over. I told him that this was a clean install and that no way would I be starting over. He offered no other solution or advice other than telling me that it was not normal for a new server to have kernel panics this early in the game.</p>
<p>I decided to check my DNS turns out that the route statement in the router, was not properly entered. It was getting to the server but it was unable to retain a connection. I re-entered the route statement correctly and then rebooted the router. Almost immediately the issues stopped. Apple has come a long way in their migration capabilities if your ever having issues with your 10.6.2 mail service DNS is almost always the culprit!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2010/01/17/leopard-server-upgrade-mail-10-6-2/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
