<?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 &#187; upgrade</title>
	<atom:link href="http://www.jonsblog.org/tag/upgrade/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jonsblog.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 11 Jan 2012 19:33:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>10.6.8 Server high CPU usage, hwmond culprit</title>
		<link>http://www.jonsblog.org/2011/07/10/10-6-8-server-high-cpu-usage-hwmond-culprit/</link>
		<comments>http://www.jonsblog.org/2011/07/10/10-6-8-server-high-cpu-usage-hwmond-culprit/#comments</comments>
		<pubDate>Sun, 10 Jul 2011 15:13:35 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[OSX System Administration]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[usage]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=359</guid>
		<description><![CDATA[It seems no matter how careful Apple is each OS update (especially server updates) reveals its own challenges for the user, that leaves them wishing that they had not left their stable platform for the bug fixes that made that update so desirable. the 10.6.8 server update was no different it claimed to fix such [...]]]></description>
			<content:encoded><![CDATA[<p>It seems no matter how careful Apple is each OS update (especially server updates) reveals its own challenges for the user, that leaves them wishing that they had not left their stable platform for the bug fixes that made that update so desirable. the 10.6.8 server update was no different it claimed to fix such long time bugs as Server Side Rules which has been a thorn in the side of OSX Server Administrators everywhere who use OSX Servers as their primary email server. So many of us including myself, downloaded the update and wished for the best. Once done, we all noticed the same bug, extremely high CPU usage on XServes running the new 10.6.8 software and the culprit, hwmond. Hey, hwmond, you are supposed to monitor the hard drives in the XServe and not hog all the resources what gives? Was my initial reaction so I started Googling I found that the hwmond was a service that Apple launches to monitor hardware, it can not be unloaded easily like other launch daemons I ran </p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> launchctl unload <span style="color: #000000; font-weight: bold;">/</span>System<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>LaunchDaemons<span style="color: #000000; font-weight: bold;">/</span>com.apple.hwmond.plist</pre></div></div>

<p> which initially threw an odd error, looked at the list of loaded items by running launchctl list on the server and noticed that it was gone. I restarted my XServe and sure enough it had loaded itself. Figuring that there must be something in the OS automatically loading this on each reboot I started searching ways to modify or disable hwmond on my server. In my case I needed to stop the high CPU usage so badly that I was willing to make the tradeoff, of not having hardware monitoring enabled on my system for a modicum of stability for my users, and since this was an email server it seemed like a fair tradeoff. Especially since it looked like the hwmond process could be the process that would cause the most damage to my system if it was allowed to continue and then would be the thing to notify me that the hardware had failed due to extremely high CPU usage over a long period of time. I ran across a post made by Apple <a title="http://support.apple.com/kb/TS2066" href="http://support.apple.com/kb/TS2066">http://support.apple.com/kb/TS2066</a> and decided to take a read, basically the issue that this resolves is hwmond not working and having a tag in the plist file that disables hwmond. Since this was my goal I did the opposite of what the knowledge base suggested, instead of removing the said code from the plist, I put the code into the plist and then rebooted my XServe.<span id="more-359"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>?xml <span style="color: #007800;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #007800;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span>?<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;!</span>DOCTYPE plist PUBLIC <span style="color: #ff0000;">&quot;-//Apple//DTD PLIST 1.0//EN&quot;</span> <span style="color: #ff0000;">&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>plist <span style="color: #007800;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>dict<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>Label<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>com.apple.hwmond<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>OnDemand<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>false<span style="color: #000000; font-weight: bold;">/&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>Program<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>hwmond<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>ProgramArguments<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>array<span style="color: #000000; font-weight: bold;">&gt;</span>
                    <span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>hwmond<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
                    <span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>-s255<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;/</span>array<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>ServiceIPC<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>false<span style="color: #000000; font-weight: bold;">/&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>Disabled<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
          <span style="color: #000000; font-weight: bold;">&lt;</span>true<span style="color: #000000; font-weight: bold;">/&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>dict<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>plist<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Once the server rebooted I was back in business. My server&#8217;s CPU usage was back to normal and life was grand. Three days later, I restarted my server for an update to Virusbarrier the software I use to help block unwanted attacks on my server, and the high CPU issue returned. I looked at the hwmond.plist file and sure enough it had been re-enabled. I applied the fix above and restarted and it seemed to take. Well this is by no means a permanent fix but then I found this forum post <a href="https://discussions.apple.com/thread/3138473?start=0&#038;tstart=0">https://discussions.apple.com/thread/3138473?start=0&#038;tstart=0</a> It seems as though Apple has been informed of the issue and they are working on a fix. But as an update sceptic I find myself chuckling inside, the 10.6.9 update will claim to fix the hwomond cpu issue but what new issues will lie lurking in the wings to terrorize my system? Only Apple knows or maybe they just don&#8217;t have a clue. Hopefully they will come up with a fix, until then I have learned my lesson, I will not update my system so cavalierly in the future. I welcome your feedback and let me know what you have done to combat this issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2011/07/10/10-6-8-server-high-cpu-usage-hwmond-culprit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Karl: Letter to the Editor</title>
		<link>http://www.jonsblog.org/2011/06/28/letter-to-the-editor-karl/</link>
		<comments>http://www.jonsblog.org/2011/06/28/letter-to-the-editor-karl/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 19:38:53 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Letter to the Editor]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=291</guid>
		<description><![CDATA[Occasionally I get emails from folks who need feedback on a particular issue or have a question regarding something that I have discussed in my blog. I usually offer my help or advice when I can but sometimes I feel like the community of readers may have a more unique take on the issue and [...]]]></description>
			<content:encoded><![CDATA[<p>Occasionally I get emails from folks who need feedback on a particular issue or have a question regarding something that I have discussed in my blog. I usually offer my help or advice when I can but sometimes I feel like the community of readers may have a more unique take on the issue and offer a broader scope of advice. This is my first Letter to the editor post and I hope you enjoy it, please take a read and lets see if we cant help out.</p>
<p>Hello Jon,</p>
<p>I read a few posts of yours regarding 10.6 Groups functionality w/calendar, and I&#8217;m hoping really just for your opinion. And if you&#8217;re just too busy, I understand that, as well, but maybe you can take a couple of minutes and humor me!</p>
<p>For what it&#8217;s worth, in a former life I was a much more in-the-trenches Mac tech and developer (pre X), and now am just a semi-power user. As a complete aside, I&#8217;m<br />
also a former Now Up To Date &amp; Contact evangelist, and I sorely miss a lot of what that product had right out of the box.</p>
<p>So, that said, I run 10.5.8 Server, and really need to share Calendars andContacts, using Groups for permissions. The CalDav server works pretty well, great with iCal, kind of cumbersome to set up paths with Sunbird on Windows boxes, but works. The Wiki cal&#8230;was pretty disappointing in that it only displayed the primary calendar. And for all the meandering I&#8217;ve attempted with Groups, it hasn&#8217;t really gotten me to a good end, and client setup is again, cumbersome.</p>
<p>I do like the idea of Win users (or anyone, especially remotely) being able to just open a browser and view multiple calendars, for obvious reasons, as opposed to using an application (Sunbird) and setting up a half dozen calendars and paths, for instance. For this reason I&#8217;ve dabbled with Google Apps, using their shared Cals, and iCal as client for my Mac users, etc. This works quite well&#8230;no Groups permissions per se, but at least easy to assign per calendar privileges to individuals, and thereby pretty easy for individuals to log in and see all. I&#8217;ve messed with Google Groups, and again, got a little cumbersome. Worked, but cumbersome.<br />
<span id="more-291"></span><br />
I ALSO very much need a good Shared Contacts solution, and Google (and everyone) still fails badly on this score, as far as I can tell. It appears that 10.6 Server will do what I need it to via CardDav, hopefully&#8230;?</p>
<p>SO THE QUESTION IS&#8230;should I bite the $500 bullet and buy 10.6 Server? Specifically, to your knowledge:</p>
<p>1) Does Address Book sharing really work now? As in, the ability to specify Groups you do or do not want shared? I&#8217;d thought 10.5 was supposed to, but was disappointed to find out it was strictly LDAP-related. So once bitten, twice shy. If it does work well, that might be reason enough for me to make the switch, even if I kept using Google calendars&#8230;</p>
<p>2) That said, does iCal Server now actually work with Groups, for real, for assigning Group privileges and access?!</p>
<p>3) &#8230;and if so, can you now use a browser to view multiple calendars, assuming you have proper Group privileges?! Or a CalDav client?</p>
<p>If you&#8217;ve gotten through this, thank you sincerely. Honestly, any thoughts are appreciated. When I was more &#8216;in the game&#8217; I had a big network of coders and developers to chat out things like this, but now I&#8217;m pretty much out of the fold.</p>
<p>Sincerely,</p>
<p>Karl Zarling</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2011/06/28/letter-to-the-editor-karl/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>OSX Server Mailman Tricks</title>
		<link>http://www.jonsblog.org/2010/10/02/osx-mailman-tricks/</link>
		<comments>http://www.jonsblog.org/2010/10/02/osx-mailman-tricks/#comments</comments>
		<pubDate>Sat, 02 Oct 2010 03:44:42 +0000</pubDate>
		<dc:creator>Jon Brown</dc:creator>
				<category><![CDATA[Mail Server]]></category>
		<category><![CDATA[OSX Server Configuration]]></category>
		<category><![CDATA[Mailman]]></category>
		<category><![CDATA[osx server]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.jonsblog.org/?p=191</guid>
		<description><![CDATA[We have been using XServes as our primary mail servers at my organization for about two years now, we upgraded from an older Linux system and we could not be happier, since moving over to the 10.6 platform, we have enjoyed almost no email downtime, very easy to manage mail system and of course all [...]]]></description>
			<content:encoded><![CDATA[<p>We have been using XServes as our primary mail servers at my organization for about two years now, we upgraded from an older Linux system and we could not be happier, since moving over to the 10.6 platform, we have enjoyed almost no email downtime, very easy to manage mail system and of course all the goodies that you would expect to run, some of which I have already mentioned (<a href="http://www.jonsblog.org/2010/01/23/squirrelmail-ldap-sieve/">Squirrelmail</a>) and also Mailman. Through my time configuring the server, migrating data and through other requests I have compiled a list of a few tips and tricks for working with Mailman on the OSX platform.</p>
<p><strong>1. Migrating Mailman data from one server to another.</strong><br />
I had many problems making sure that mailing lists, users, and archives were preserved when moving from our old server to our new server. Here are the following things you must do in order to ensure that the lists are preserved.</p>
<p>You must backup the old mailman lists these are more than likely stored in the /var/mailman directory</p>

<div class="wp_syntax"><div 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;">cp</span> <span style="color: #660033;">-Rp</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>mailman <span style="color: #000000; font-weight: bold;">/</span>Volumes<span style="color: #000000; font-weight: bold;">/</span>setting-backups<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Once your ready to restore the files to the new server run</p>

<div class="wp_syntax"><div 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;">cp</span> <span style="color: #660033;">-Rp</span> <span style="color: #000000; font-weight: bold;">/</span>Volumes<span style="color: #000000; font-weight: bold;">/</span>setting-backups<span style="color: #000000; font-weight: bold;">/</span>mailman <span style="color: #000000; font-weight: bold;">/</span>var</pre></div></div>

<p>the -Rp flags relate to the fact that it is a folder and that you are going to restore the permissions, once your done you will need to login through SSH or on the server itself and run</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>mailman<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>genaliases</pre></div></div>

<p>the ./genaliases command will take the lists, and it will generate aliases for them. This plagued me for a while before I realized that when you migrate to the server, this database needs to be built.<br />
<span id="more-191"></span><br />
<strong>2. Change the hostname of of your Mailman Server</strong><br />
I have had to do this as well, normally the mailman web interface can be found at http://example.com/mailman/admin for the administrative side or http://example.com/mailman/listinfo for the list information side. If you are going to change the hostname of your server to example2.com then you will need to use the command line tools to move the lists over.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>mailman<span style="color: #000000; font-weight: bold;">/</span>bin
.<span style="color: #000000; font-weight: bold;">/</span>withlist <span style="color: #660033;">-l</span> <span style="color: #660033;">-r</span> fix_url <span style="color: #007800;">$listname</span> <span style="color: #660033;">-v</span></pre></div></div>

<p>This will update the host names for $listname from the main configuration file, and -v shows you what the changes are. Remember to change $listname with the actual name of your list, you will have to do this for every list you can however run all of the lists at once by running the command multiple times like so.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>mailman<span style="color: #000000; font-weight: bold;">/</span>bin
.<span style="color: #000000; font-weight: bold;">/</span>withlist <span style="color: #660033;">-l</span> <span style="color: #660033;">-r</span> fix_url <span style="color: #007800;">$listname</span> <span style="color: #660033;">-v</span>
.<span style="color: #000000; font-weight: bold;">/</span>withlist <span style="color: #660033;">-l</span> <span style="color: #660033;">-r</span> fix_url <span style="color: #007800;">$listname1</span> <span style="color: #660033;">-v</span>
.<span style="color: #000000; font-weight: bold;">/</span>withlist <span style="color: #660033;">-l</span> <span style="color: #660033;">-r</span> fix_url <span style="color: #007800;">$listname2</span> <span style="color: #660033;">-v</span>
.<span style="color: #000000; font-weight: bold;">/</span>withlist <span style="color: #660033;">-l</span> <span style="color: #660033;">-r</span> fix_url <span style="color: #007800;">$listname3</span> <span style="color: #660033;">-v</span></pre></div></div>

<p><strong>3. Retrieving a text list of users subscribed to a list</strong><br />
I have seen this question asked in almost every forum that I have visited, there are multiple ways to do this however I recently found out that Mailman has a built in tool that will automatically grant you what your looking for in the form of an email daemon. First, you must be an administrator or moderator of the list in question. Second you must know the password to the administration area for the list in question.</p>
<p>You can get a list of users by sending an email to the list at $listname-request@yourdomain.com where $listname is the name of your mailing list. With the the following command in the subject line and the message body.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">who</span> <span style="color: #007800;">$listpassword</span></pre></div></div>

<p>where $listpassword is the password of the list in question, the list of users will be sent back to you in the form of an email.</p>
<p><strong>4. Create a Mailman auditing script</strong><br />
These commands can be used to export a list of users and then have that list automatically emailed to you so that you can regularly be reminded to make sure that your mailman lists are free from errors, and or people that should no longer be on the lists. I have created two scripts that do this.</p>
<p>Script #1: The list querying script</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>mailman<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
.<span style="color: #000000; font-weight: bold;">/</span>list_members <span style="color: #660033;">-f</span> Internal <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #ff0000;">&quot;/scripts/lists/audit/Internal.txt&quot;</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #ff0000;">&quot;/scripts/lists/Internal.txt&quot;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;XXX Mailing List -- For Auditing Purposes <span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span> This is an automated email, please check your list of subscribers for accuracy, if there is a change that needs to be made please contact XXX, at XXX@XXX.XXX, thank you. <span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #ff0000;">&quot;/scripts/lists/Internal.txt&quot;</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #ff0000;">&quot;/scripts/lists/audit/Internal.txt&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #ff0000;">&quot;/scripts/lists/Internal.txt&quot;</span>
&nbsp;
<span style="color: #007800;">SUBJECT</span>=<span style="color: #ff0000;">&quot;XXX Mailing List&quot;</span>
&nbsp;
<span style="color: #007800;">EMAIL</span>=<span style="color: #ff0000;">&quot;XXX@XXX.XXX&quot;</span>
&nbsp;
<span style="color: #007800;">EMAILMESSAGE</span>=<span style="color: #ff0000;">&quot;/scripts/lists/Internal.txt&quot;</span>
&nbsp;
mail <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$SUBJECT</span>&quot;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$EMAIL</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$EMAILMESSAGE</span>&quot;</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #ff0000;">&quot;/scripts/lists/Internal.txt&quot;</span></pre></div></div>

<p>This script runs the commands and generates the list, it then adds on the email text above the list of users and then sends it out as an email. I would name this script the name of the list so for example $listname.sh and then chmod the script 700 so that it is executable. You will want to use the above template for each of your mailing lists and save this into multiple scripts.</p>
<p>Script #2: The the scheduled script</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #ff0000;">&quot;/scripts/&quot;</span>
&nbsp;
.<span style="color: #000000; font-weight: bold;">/</span>list1.sh
.<span style="color: #000000; font-weight: bold;">/</span>list2.sh
.<span style="color: #000000; font-weight: bold;">/</span>list3.sh
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-R</span> <span style="color: #ff0000;">&quot;/scripts/lists/audit&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #ff0000;">&quot;/scripts/lists/audit&quot;</span></pre></div></div>

<p>You will want to schedule this script, I have mine set to once a month, what it does is, it runs all the scripts listed each script above uses the first template to query Mailman, generate the lists, append with email text and then send out to the list moderators.</p>
<p>There is a bit of trial and error here, first of all the user account must have sudo rights, so you may need to add the user running these scripts to the sudoers file or make them an administrator. Scheduling is a matter of setting up a crontab, I am using</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">0</span>	<span style="color: #000000;">0</span>	<span style="color: #000000;">1</span>	<span style="color: #000000; font-weight: bold;">*</span>	<span style="color: #000000; font-weight: bold;">*</span>	<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>run.sh</pre></div></div>

<p>this will make sure that it runs on the first day of each month.</p>
<p><strong>5. Reset the Mailman master password</strong><br />
I do this from time to time to make sure that I and the IT Staff at our organization have access to every list on the Mailman roster, but also as a security point, the password changes once every quarter. You can do this via the command line by running.</p>

<div class="wp_syntax"><div 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>share<span style="color: #000000; font-weight: bold;">/</span>mailman<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mmsitepass</pre></div></div>

<p>It will prompt you to enter a password, and confirm. I suggest that you choose a strong password. You can also change a single list password through the command line as well.</p>

<div class="wp_syntax"><div 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>share<span style="color: #000000; font-weight: bold;">/</span>mailman<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>withlist <span style="color: #660033;">-l</span> mylistnamehere
import sha
m.password = sha.new<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'supersecretpasswordhere'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>.hexdigest<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
m.Save<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#123;</span>ctrl-D<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>The above will change the admin lists password and encrypt it at the same time.</p>
<p>Well I hope you enjoyed my Mailman tips and tricks, please feel free to tell me of any other Mailman tricks that might help out the Mac community, as always comments are very welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonsblog.org/2010/10/02/osx-mailman-tricks/feed/</wfw:commentRss>
		<slash:comments>1</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>Jon Brown</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.</p>
<p>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"><div 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></div></div>

<p><span id="more-5"></span><br />
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>

