<?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>Surgical Diversions &#187; code</title>
	<atom:link href="http://thefragens.com/blog/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://thefragens.com/blog</link>
	<description>My time out of the operating room.</description>
	<lastBuildDate>Wed, 21 Dec 2011 17:05:11 +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>chroot&#8217;d SFTP on Mac OS X server</title>
		<link>http://thefragens.com/blog/2011/12/chrootd-sftp-on-mac-os-x-server/</link>
		<comments>http://thefragens.com/blog/2011/12/chrootd-sftp-on-mac-os-x-server/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 00:27:25 +0000</pubDate>
		<dc:creator>Andy Fragen</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[osx-server]]></category>

		<guid isPermaLink="false">http://thefragens.com/blog/?p=914</guid>
		<description><![CDATA[So here you are finding that you need to grant someone else SFTP access to your server. There are lots of reasons to do this, in my case it&#8217;s because I needed to grant access to someone&#8217;s web designer. We &#8230; <a href="http://thefragens.com/blog/2011/12/chrootd-sftp-on-mac-os-x-server/">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://thefragens.com/blog/2010/05/server-side-email-filtering-with-sieve/' rel='bookmark' title='Server-Side Email Filtering with Sieve'>Server-Side Email Filtering with Sieve</a> <small>Another post for the peripheral brain. When I first set...</small></li>
<li><a href='http://thefragens.com/blog/2010/06/wordpress-automatic-updates/' rel='bookmark' title='WordPress Automatic Updates'>WordPress Automatic Updates</a> <small>I think I finally have the automatic updates feature of...</small></li>
<li><a href='http://thefragens.com/blog/2010/08/dovecot-permissions/' rel='bookmark' title='Dovecot Permissions'>Dovecot Permissions</a> <small>Well, I finally bit the bullet and installed OS X...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>So here you are finding that you need to grant someone else SFTP access to your server. There are lots of reasons to do this, in my case it&#8217;s because I needed to grant access to someone&#8217;s web designer. We initially worked it out by him emailing me files and me SFTP&#8217;ing them up to the server in the correct location. Now he needs direct access to fix some things and I want to give him only what he needs without compromising security. Enter the chroot jail. After lots of googling and some encouragement from the Mac OS X Server email list, I&#8217;ve got it working. Here&#8217;s how it works.</p>

<p>First, you should create the new user in Workgroup Admin and either assign them access privileges for SSH via Server Admin or assign them to a group that has SSH access privileges. Further discussion is below.</p>

<p>From the Terminal, start off right.</p>

<pre><code>sudo cp /etc/sshd_config /etc/sshd_config.bkup

sudo chown root /
sudo chmod 755 /
sudo mkdir -p /chroot/user/scratchpad
sudo chown -R root /chroot
sudo chown user /chroot/user/scratchpad
sudo chmod -R 755 /chroot
</code></pre>

<p>Every additional new user added will then be something along the lines of the following.</p>

<pre><code>sudo mkdir -p /chroot/user2/scratchpad
sudo chown root /chroot/user2
sudo chown user2 /chroot/user2/scratchpad
sudo chmod -R 755 /chroot/user2
</code></pre>

<p>Every folder it the path to the chroot jail must be owned by <code>root</code>. I don&#8217;t think it matters what group the folder is in. What I did above was to </p>

<ol>
<li>backup <code>/etc/sshd_config</code></li>
<li>change ownership of the root directory to <code>root</code></li>
<li>change permissions of the root directory to 755</li>
<li>create a chroot folder</li>
<li>create a user folder inside the chroot folder</li>
<li>create a folder inside the user folder that user can modify</li>
<li>set ownership and permissions</li>
</ol>

<p>Now to edit <code>/etc/sshd_config</code> to the following.</p>

<pre><code>#Subsystem  sftp    /usr/libexec/sftp-server
Subsystem   sftp    internal-sftp

Match User user
    X11Forwarding no
    AllowTcpForwarding no
    ForceCommand internal-sftp
    ChrootDirectory /chroot/user
</code></pre>

<p>This creates a chroot jail that when the user logs in will drop them into the folder <code>/chroot/user</code>, in that folder is a folder they can add things to <code>/chroot/user/scratchpad</code>.</p>

<p>If you want to create a Group in Workgroup Admin for &#8216;Chroot Users&#8217; then add the new users that you created in Workgroup Admin to the Group you won&#8217;t have to keep editing the <code>/etc/sshd_config</code> file. Instead of the above, add the following. Make sure you add the &#8216;Chroot Users&#8217; group to the SSH access ACL in Server Admin.</p>

<pre><code>Match Group chrootusers
    X11Forwarding no
    AllowTcpForwarding no
    ForceCommand internal-sftp
    ChrootDirectory /chroot/%u
</code></pre>

<p>To test whether the above is working, issue the following from the terminal.</p>

<pre><code>$ sftp user@domain.com
Password:
sftp&gt;
</code></pre>

<p>Getting in is one thing. Now you have to mount the folder you want to use. Unfortunately you can&#8217;t use a symlink inside of a chroot jail. This is where <a href="http://www.macports.org">MacPorts</a> is your best friend. I don&#8217;t know why I&#8217;ve never seen fit to install this before. After installation just issue the following commands.</p>

<pre><code>sudo port install fuse4x
sudo port install fuse4x bindfs
</code></pre>

<p>You might have to restart. Now with an empty folder created in <code>/chroot/user</code> you can <code>mount --bind</code> to a folder outside of the chroot jail. For example</p>

<pre><code>sudo /opt/local/bin/bindfs -u user /Library/WebServer/Documents/mysite/yourfolder /chroot/user/scratchpad
</code></pre>

<p>So far this seems to work here.</p>
<p>Related posts:<ol>
<li><a href='http://thefragens.com/blog/2010/05/server-side-email-filtering-with-sieve/' rel='bookmark' title='Server-Side Email Filtering with Sieve'>Server-Side Email Filtering with Sieve</a> <small>Another post for the peripheral brain. When I first set...</small></li>
<li><a href='http://thefragens.com/blog/2010/06/wordpress-automatic-updates/' rel='bookmark' title='WordPress Automatic Updates'>WordPress Automatic Updates</a> <small>I think I finally have the automatic updates feature of...</small></li>
<li><a href='http://thefragens.com/blog/2010/08/dovecot-permissions/' rel='bookmark' title='Dovecot Permissions'>Dovecot Permissions</a> <small>Well, I finally bit the bullet and installed OS X...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://thefragens.com/blog/2011/12/chrootd-sftp-on-mac-os-x-server/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Fail2ban Problems and Solutions</title>
		<link>http://thefragens.com/blog/2010/12/fail2ban-problems-and-solutions/</link>
		<comments>http://thefragens.com/blog/2010/12/fail2ban-problems-and-solutions/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 21:13:34 +0000</pubDate>
		<dc:creator>Andy Fragen</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[osx-server]]></category>
		<category><![CDATA[fail2ban]]></category>

		<guid isPermaLink="false">http://thefragens.com/blog/?p=815</guid>
		<description><![CDATA[If you use Fail2ban then you are probably aware of the fact that you must add a rule number to the ipfw deny rule for actionban in ipfw.conf. If you don&#8217;t add a rule number then there is no way &#8230; <a href="http://thefragens.com/blog/2010/12/fail2ban-problems-and-solutions/">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://thefragens.com/blog/2009/09/fail2ban-on-leopard-server/' rel='bookmark' title='Fail2ban on Leopard Server'>Fail2ban on Leopard Server</a> <small>So here I am running my own server &#8212; for...</small></li>
<li><a href='http://thefragens.com/blog/2010/11/checking-fail2ban-regex/' rel='bookmark' title='Checking Fail2ban regex'>Checking Fail2ban regex</a> <small>I&#8217;ve just stumbled across a great command in Fail2ban to...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>If you use <a href="http://www.fail2ban.org/wiki/index.php/Main_Page">Fail2ban</a> then you are probably aware of the fact that you must add a rule number to the ipfw deny rule for <code>actionban</code> in <code>ipfw.conf</code>. If you don&#8217;t add a rule number then there is no way for fail2ban to delete the rule after it expires. The problem lies in that you can easily set a different rule number for each filter but if the filter adds many rules within it&#8217;s ban time then when that first <code>actionunban</code> gets triggered all rules with the same number are removed, even if there full ban time has not transpired.</p>

<p>I was looking for an elegant solution to this and finally figured out how to do it myself. What I&#8217;ve done is in the <code>ipfw.conf</code> file I&#8217;ve added a variable that will create a random number between 10000 and 12000 to use as the rule number.</p>

<p>The code is pretty simple.</p>

<blockquote>
  <p><code>echo $((RANDOM%2000+10000))</code></p>
</blockquote>

<p>There needs to be an extra <code>%</code> in there for it to work. I think it has something to do with python. So far it seems to be working pretty good here. While it is possible that I could get a duplicate rule number, it&#8217;s unlikely.</p>

<p>I&#8217;ve modified my installation of Fail2ban significantly; but only by adding filters, jails, etc. <a href="http://thefragens.com/pub/install_fail2ban_mods.tar.gz">Here&#8217;s a bundled version of all of my modifications.</a> <a href="http://thefragens.com/blog/2010/11/fail2ban-and-os-x-server-part-deux/">Here are instructions for using my modifications.</a> So far everything seems to be working great. I&#8217;ve had to add a few items to <code>ignoreregex</code> so I don&#8217;t ban people using their iPhones on 3G or at home from certain dynamic IP cable providers.</p>

<p>What I&#8217;ve done is a <code>host</code> lookup on the IP that&#8217;s banned and if I find it&#8217;s a local ISP, like Verizon or Time Warner Cable, I add part of their host lookup to the <code>ignoreregex</code> list. So far it seems to be doing the trick.</p>
<p>Related posts:<ol>
<li><a href='http://thefragens.com/blog/2009/09/fail2ban-on-leopard-server/' rel='bookmark' title='Fail2ban on Leopard Server'>Fail2ban on Leopard Server</a> <small>So here I am running my own server &#8212; for...</small></li>
<li><a href='http://thefragens.com/blog/2010/11/checking-fail2ban-regex/' rel='bookmark' title='Checking Fail2ban regex'>Checking Fail2ban regex</a> <small>I&#8217;ve just stumbled across a great command in Fail2ban to...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://thefragens.com/blog/2010/12/fail2ban-problems-and-solutions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Checking Fail2ban regex</title>
		<link>http://thefragens.com/blog/2010/11/checking-fail2ban-regex/</link>
		<comments>http://thefragens.com/blog/2010/11/checking-fail2ban-regex/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 22:14:54 +0000</pubDate>
		<dc:creator>Andy Fragen</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[osx-server]]></category>
		<category><![CDATA[fail2ban]]></category>

		<guid isPermaLink="false">http://thefragens.com/blog/?p=811</guid>
		<description><![CDATA[I&#8217;ve just stumbled across a great command in Fail2ban to check whether or not your filter will actually score a hit from your log file. From the command line. fail2ban-regex /path/to/logfile /etc/fail2ban/filter.d/myfilter.conf regex_to_ignore As an example. fail2ban-regex /var/log/secure.log /etc/fail2ban/filter.d/sshd.conf (myusername&#124;myIPaddress) &#8230; <a href="http://thefragens.com/blog/2010/11/checking-fail2ban-regex/">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://thefragens.com/blog/2010/12/fail2ban-problems-and-solutions/' rel='bookmark' title='Fail2ban Problems and Solutions'>Fail2ban Problems and Solutions</a> <small>If you use Fail2ban then you are probably aware of...</small></li>
<li><a href='http://thefragens.com/blog/2009/09/fail2ban-on-leopard-server/' rel='bookmark' title='Fail2ban on Leopard Server'>Fail2ban on Leopard Server</a> <small>So here I am running my own server &#8212; for...</small></li>
<li><a href='http://thefragens.com/blog/2010/11/fail2ban-and-os-x-server-part-deux/' rel='bookmark' title='Fail2ban and OS X Server, part deux'>Fail2ban and OS X Server, part deux</a> <small>As some of you might know I run my own...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just stumbled across a great command in Fail2ban to check whether or not your filter will actually score a hit from your log file.</p>

<p>From the command line.</p>

<blockquote>
  <p><code>fail2ban-regex /path/to/logfile /etc/fail2ban/filter.d/myfilter.conf regex_to_ignore</code></p>
</blockquote>

<p>As an example.</p>

<blockquote>
  <p><code>fail2ban-regex /var/log/secure.log /etc/fail2ban/filter.d/sshd.conf (myusername|myIPaddress)</code></p>
</blockquote>

<p>This seems like a great way to test whether changes to your filters are correct, rather than just waiting to see if anything shows up in fail2ban.log.</p>
<p>Related posts:<ol>
<li><a href='http://thefragens.com/blog/2010/12/fail2ban-problems-and-solutions/' rel='bookmark' title='Fail2ban Problems and Solutions'>Fail2ban Problems and Solutions</a> <small>If you use Fail2ban then you are probably aware of...</small></li>
<li><a href='http://thefragens.com/blog/2009/09/fail2ban-on-leopard-server/' rel='bookmark' title='Fail2ban on Leopard Server'>Fail2ban on Leopard Server</a> <small>So here I am running my own server &#8212; for...</small></li>
<li><a href='http://thefragens.com/blog/2010/11/fail2ban-and-os-x-server-part-deux/' rel='bookmark' title='Fail2ban and OS X Server, part deux'>Fail2ban and OS X Server, part deux</a> <small>As some of you might know I run my own...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://thefragens.com/blog/2010/11/checking-fail2ban-regex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Server-Side Email Filtering with Sieve</title>
		<link>http://thefragens.com/blog/2010/05/server-side-email-filtering-with-sieve/</link>
		<comments>http://thefragens.com/blog/2010/05/server-side-email-filtering-with-sieve/#comments</comments>
		<pubDate>Fri, 14 May 2010 23:55:31 +0000</pubDate>
		<dc:creator>Andy Fragen</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[mac-osx]]></category>
		<category><![CDATA[osx-server]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[sieve]]></category>

		<guid isPermaLink="false">http://thefragens.com/blog/?p=684</guid>
		<description><![CDATA[Another post for the peripheral brain. When I first set up my own server lo these years ago, I never really thought about email message filtering. After all, I had rules in Mail.app that would send my incoming message to &#8230; <a href="http://thefragens.com/blog/2010/05/server-side-email-filtering-with-sieve/">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://thefragens.com/blog/2011/03/squirrelmail-plugins/' rel='bookmark' title='Squirrelmail Plugins'>Squirrelmail Plugins</a> <small>Just an FYI post. I save all my added Squirrelmail...</small></li>
<li><a href='http://thefragens.com/blog/2010/08/snow-leopard-sieve-rules/' rel='bookmark' title='Snow Leopard Sieve Rules'>Snow Leopard Sieve Rules</a> <small>How to edit sieve rules in Snow Leopard by hand....</small></li>
<li><a href='http://thefragens.com/blog/2008/02/forwarding-email-in-leopard-server/' rel='bookmark' title='Forwarding Email in Leopard Server'>Forwarding Email in Leopard Server</a> <small>OK, to put it mildly the Workgroup Manager and Email...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Another post for the peripheral brain.</p>

<p>When I first set up my own server lo these years ago, I never really thought about email message filtering. After all, I had rules in Mail.app that would send my incoming message to wherever I wanted them. Besides, I was much more concerned with eliminating spam.</p>

<p>Well, that was then and spam seems under control. I was prompted to look at server-side message filtering mostly to help out my mother, who seems determined to have every single store, travel and other consumer site that will happily take your email address and send you messages daily &#8212; or more often, have a more controllable experience on her iPhone. When we originally set up her iPhone she told me she didn&#8217;t want to use it for email. Silly me, I listened and set her up with a POP account. Well now she wants email. What&#8217;s a good son to do. <img src='http://thefragens.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>

<p>I changed her POP account to IMAP, copied over all her messages to her new IMAP folders and thought I&#8217;d need to solve her impending problem of 100 or so messages every other day choking her inbox.</p>

<p>After a bit of Googling I found <a href="http://sieve.info">Sieve</a>. I&#8217;d actually heard of it before but never really thought about it. The <a href="http://www.netmojo.ca/2007/12/01/setting-up-sieve-and-vacation-messages-on-mac-os-x-server/">Apple Discussion Forum</a> had a nice start and pointed me on to <a href="http://www.netmojo.ca/2007/12/01/setting-up-sieve-and-vacation-messages-on-mac-os-x-server/">sources</a> I used to <a href="http://www.afp548.com/article.php?story=20080106215609968">set it up</a>.</p>

<p>Here are the salient points. From the terminal&#8230;</p>

<ol>
<li><p>Add the following lines to <code>/etc/services</code></p>

<pre><code>sudo pico /etc/services
</code></pre>

<p>Insert the following lines.</p>

<pre><code>callbook 2000/udp # callbook
callbook 2000/tcp # callbook
+ sieve 2000/udp # sieve mail filtering
+ sieve 2000/tcp # sieve mail filtering
</code></pre>

<p>You can check to see if it&#8217;s running by running</p>

<pre><code>netstat -an | grep 2000
</code></pre>

<p>with results</p>

<pre><code>tcp4 0 0 *.2000 *.* LISTEN
tcp6 0 0 *.2000 *.* LISTEN
</code></pre></li>
<li><p>Create <code>/usr/sieve</code></p>

<pre><code>sudo mkdir /usr/sieve
sudo chown _cyrus:mail /usr/sieve
</code></pre></li>
<li><p>Restart mail services</p>

<pre><code>sudo serveradmin stop mail
[ some stuff ]
sudo serveradmin start mail
[ some stuff ]
</code></pre></li>
<li>Since I&#8217;m using  OS X Server and SquirrelMail is already running, next was installing and configuring <a href="http://email.uoa.gr/avelsieve/wiki/Download">avelsieve</a>.</li>
</ol>

<p>I really did try installing the latest development version &#8212; 1.9.9 alpha. That should have been a clue. After spending way too much time with it I installed the stable version - avelsieve 1.0.1. Once copied into <code>/usr/share/squirrelmail/plugins</code> run <code>sudo perl /etc/squirrelmail/config/conf.pl</code> and activate the plugin.</p>

<p>Then it&#8217;s back to the terminal. These instructions are from <a href="http://www.afp548.com/article.php?story=20080106215609968">AFP548</a>.</p>

<pre><code>    cd /usr/share/squirrelmail/plugins/avelsieve
    sudo cp config-sample.php config.php
</code></pre>

<p>Now set the correct authentication matching SquirrelMail.<br />
Edit <code>/etc/squirrelmail/plugins/avelsieve/config.php</code> and change:</p>

<pre><code>$preferred_mech = "PLAIN";
</code></pre>

<p>to  </p>

<pre><code>$preferred_mech = "CRAM-MD5";
</code></pre>

<p>You should be running SquirrelMail with CRAM-MD5 authentication anyway.</p>

<p>Finally, edit the <code>/etc/squirrelmail/plugins/avelsieve/lib/sieve-php.lib.php</code> file. </p>

<p>Find the line:</p>

<pre><code>fputs($this-&gt;fp, "PUTSCRIPT \"$scriptname\" \{$len+}\r\n"); 
</code></pre>

<p>and change it to :</p>

<pre><code>fputs($this-&gt;fp, "PUTSCRIPT \"$scriptname\"".' {'."$len+".'}'."\r\n");
</code></pre>

<p>This fixes an error in the script allowing you to save your changes to the filters. Now go login to webmail and click on the <code>Filter</code> link to start creating your Sieve filters.</p>
<p>Related posts:<ol>
<li><a href='http://thefragens.com/blog/2011/03/squirrelmail-plugins/' rel='bookmark' title='Squirrelmail Plugins'>Squirrelmail Plugins</a> <small>Just an FYI post. I save all my added Squirrelmail...</small></li>
<li><a href='http://thefragens.com/blog/2010/08/snow-leopard-sieve-rules/' rel='bookmark' title='Snow Leopard Sieve Rules'>Snow Leopard Sieve Rules</a> <small>How to edit sieve rules in Snow Leopard by hand....</small></li>
<li><a href='http://thefragens.com/blog/2008/02/forwarding-email-in-leopard-server/' rel='bookmark' title='Forwarding Email in Leopard Server'>Forwarding Email in Leopard Server</a> <small>OK, to put it mildly the Workgroup Manager and Email...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://thefragens.com/blog/2010/05/server-side-email-filtering-with-sieve/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Poof it&#8217;s Gone</title>
		<link>http://thefragens.com/blog/2010/04/poof-its-gone/</link>
		<comments>http://thefragens.com/blog/2010/04/poof-its-gone/#comments</comments>
		<pubDate>Sat, 01 May 2010 02:37:09 +0000</pubDate>
		<dc:creator>Andy Fragen</dc:creator>
				<category><![CDATA[mac-osx]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://thefragens.com/blog/?p=680</guid>
		<description><![CDATA[OK, I&#8217;m only really posting this cause I need it and I just want to put it somewhere to remember it. To make a file or folder invisible issue the following from the CLI. SetFile -a V path/to/fileOrFolder To make &#8230; <a href="http://thefragens.com/blog/2010/04/poof-its-gone/">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://thefragens.com/blog/2009/05/voodoopad-pro-blogging/' rel='bookmark' title='VoodooPad &lt;strike&gt;Pro&lt;/strike&gt; Blogging'>VoodooPad <strike>Pro</strike> Blogging</a> <small>Please note that VoodooPad Pro has been renamed to VoodooPad....</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>OK, I&#8217;m only really posting this cause I need it and I just want to put it somewhere to remember it. <img src='http://thefragens.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>

<p>To make a  file or folder invisible issue the following from the CLI.</p>

<blockquote>
  <p>SetFile -a V path/to/fileOrFolder</p>
</blockquote>

<p>To make it visible again&#8230;</p>

<blockquote>
  <p>SetFile -a v path/to/fileOrFolder</p>
</blockquote>

<p>That&#8217;s it. This can be especially useful on shared drives to keep others out of specific folders, etc. BTW, the file or folder still shows up in <code>ls</code>, it&#8217;s just not visible in Finder.</p>
<p>Related posts:<ol>
<li><a href='http://thefragens.com/blog/2009/05/voodoopad-pro-blogging/' rel='bookmark' title='VoodooPad &lt;strike&gt;Pro&lt;/strike&gt; Blogging'>VoodooPad <strike>Pro</strike> Blogging</a> <small>Please note that VoodooPad Pro has been renamed to VoodooPad....</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://thefragens.com/blog/2010/04/poof-its-gone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t Send iCal Replies</title>
		<link>http://thefragens.com/blog/2010/04/dont-send-ical-replies/</link>
		<comments>http://thefragens.com/blog/2010/04/dont-send-ical-replies/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 00:18:12 +0000</pubDate>
		<dc:creator>Andy Fragen</dc:creator>
				<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[mac-osx]]></category>

		<guid isPermaLink="false">http://thefragens.com/blog/?p=672</guid>
		<description><![CDATA[I came across a great hint in Mac OS X Hints today. It seems that there&#8217;s an easy way to interrupt the process of sending an email reply when accepting iCal invites. As I tend to play around with iCal &#8230; <a href="http://thefragens.com/blog/2010/04/dont-send-ical-replies/">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://thefragens.com/blog/2008/04/ical-exchange-time-zone-fix/' rel='bookmark' title='iCal - Exchange Time Zone Fix'>iCal - Exchange Time Zone Fix</a> <small>As any Mac user who deals with Microsoft Exchange invites...</small></li>
<li><a href='http://thefragens.com/blog/2008/12/ical-exchange-time-zone-fix-chapter-3/' rel='bookmark' title='iCal - Exchange Time Zone Fix - Chapter 3'>iCal - Exchange Time Zone Fix - Chapter 3</a> <small>I&#8217;ve updated the iCal-Invite-Fix script again. This time to allow...</small></li>
<li><a href='http://thefragens.com/blog/2008/08/ical-exchange-time-zone-fix-part-2/' rel='bookmark' title='iCal - Exchange Time Zone Fix - part 2'>iCal - Exchange Time Zone Fix - part 2</a> <small>I&#8217;ve come across a problem with the original MailExchange2iCal-TZ-fix script....</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I came across a <a href="http://www.macosxhints.com/article.php?story=20100408114405109">great hint in Mac OS X Hints</a> today. It seems that there&#8217;s an easy way to interrupt the process of sending an email reply when accepting iCal invites. As I tend to play around with iCal invites a lot (adding and deleting the same event ad nauseum) &#8212; I love this.</p>

<p>I wrote up a <a href="http://thefragens.com/pub/iCal_Reply_Ask.zip">modified script</a> like in the example and bundled it with a shell script, to install and uninstall the modification. You have to run this shell script using <code>sudo</code> from the CLI (Command Line Interface aka Terminal.app).</p>

<p>The zip file contains the shell script, the modified Mail.scpt AppleScript, and the original Mail.scpt AppleScript.</p>

<p>To install run &#8220;<code>sudo /path/to/iCal_Reply_Send.sh install</code>&#8221;<br />
To uninstall run &#8220;<code>sudo /path/to/iCal_Reply_Send.sh revert</code>&#8221;<br />
To check usage and status, run &#8220;<code>/path/to/iCal_Reply_Send.sh</code>&#8221;</p>

<p>If you don&#8217;t like messing with the CLI then there&#8217;s a great little shareware app, <a href="http://www.nhoj.co.uk/icalreplychecker/">iCal Reply Checker</a> that does it all, and more.</p>

<p>It seems that neither method interferes with the code signing of iCal as the script in question is not code signed.</p>

<p><strong>Update</strong><br />
It appears that if you&#8217;re using an Exchange account in Mail.app that this script is being bypassed and this hint won&#8217;t work for you. <img src='http://thefragens.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>Related posts:<ol>
<li><a href='http://thefragens.com/blog/2008/04/ical-exchange-time-zone-fix/' rel='bookmark' title='iCal - Exchange Time Zone Fix'>iCal - Exchange Time Zone Fix</a> <small>As any Mac user who deals with Microsoft Exchange invites...</small></li>
<li><a href='http://thefragens.com/blog/2008/12/ical-exchange-time-zone-fix-chapter-3/' rel='bookmark' title='iCal - Exchange Time Zone Fix - Chapter 3'>iCal - Exchange Time Zone Fix - Chapter 3</a> <small>I&#8217;ve updated the iCal-Invite-Fix script again. This time to allow...</small></li>
<li><a href='http://thefragens.com/blog/2008/08/ical-exchange-time-zone-fix-part-2/' rel='bookmark' title='iCal - Exchange Time Zone Fix - part 2'>iCal - Exchange Time Zone Fix - part 2</a> <small>I&#8217;ve come across a problem with the original MailExchange2iCal-TZ-fix script....</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://thefragens.com/blog/2010/04/dont-send-ical-replies/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Fail2ban on Leopard Server</title>
		<link>http://thefragens.com/blog/2009/09/fail2ban-on-leopard-server/</link>
		<comments>http://thefragens.com/blog/2009/09/fail2ban-on-leopard-server/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 23:52:25 +0000</pubDate>
		<dc:creator>Andy Fragen</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[osx-server]]></category>
		<category><![CDATA[fail2ban]]></category>

		<guid isPermaLink="false">http://thefragens.com/blog/?p=630</guid>
		<description><![CDATA[So here I am running my own server &#8212; for almost 2 years now. It&#8217;s been a real learning experience and I&#8217;ve tried to share. My latest add-on has been fail2ban. I got tired of looking into my logs and &#8230; <a href="http://thefragens.com/blog/2009/09/fail2ban-on-leopard-server/">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://thefragens.com/blog/2010/12/fail2ban-problems-and-solutions/' rel='bookmark' title='Fail2ban Problems and Solutions'>Fail2ban Problems and Solutions</a> <small>If you use Fail2ban then you are probably aware of...</small></li>
<li><a href='http://thefragens.com/blog/2010/11/fail2ban-and-os-x-server-part-deux/' rel='bookmark' title='Fail2ban and OS X Server, part deux'>Fail2ban and OS X Server, part deux</a> <small>As some of you might know I run my own...</small></li>
<li><a href='http://thefragens.com/blog/2010/11/checking-fail2ban-regex/' rel='bookmark' title='Checking Fail2ban regex'>Checking Fail2ban regex</a> <small>I&#8217;ve just stumbled across a great command in Fail2ban to...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>So here I am running my own server &#8212; for almost 2 years now. It&#8217;s been a real learning experience and I&#8217;ve tried to share. My latest add-on has been <a href="http://www.fail2ban.org/wiki/index.php/Main_Page">fail2ban</a>. I got tired of looking into my logs and seeing where script kiddies or bots were trying to take control of my server. Fortunately, none have.</p>

<p>After a bit of googling, I found fail2ban. It&#8217;s a collection of python scripts.</p>

<blockquote>
  <p>Fail2ban scans log files like /var/log/pwdfail or /var/log/apache/error_log and bans IP that makes too many password failures. It updates firewall rules to reject the IP address.</p>
</blockquote>

<p>There are a few tricks I&#8217;ve discovered along the way to make it work on my installation and likely on Mac OS X Server in general.</p>

<p>First is that fail2ban creates a PID and socket file in a directory that it fails to create. Yeah, that&#8217;s a <a href="https://sourceforge.net/tracker/?func=detail&amp;aid=2013282&amp;group_id=121032&amp;atid=689044">bug</a>. Since I didn&#8217;t want to mess around with the actual scripts in the program, I created a plist that issues the <code>mkdir /var/run/fail2ban</code> command. I placed this in /System/Library/LaunchDaemons and set it to Run at Load. <a href="https://sourceforge.net/projects/lingon/files/">Lingon</a> is your friend, but&#8217;s now inactive. <img src='http://thefragens.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>

<p>After creating the file you have to use the command line to move it to the /System/Library/LaunchDaemons directory. I also created another launchd plist to reload fail2ban every day. I did this because I run multiple virtual websites and the error logs for those sites get rotated and the names have some time code or something tacked on the end of the filename.</p>

<p>OK, problem 1 solved. Next I discovered that since fail2ban is really running on a multitude of linux boxes all the different methods of IP tracking, sorting etc. were really useless on my OS X Server. I run ipfw firewall and fortunately there&#8217;s a module for that in fail2ban. Unfortunately it&#8217;s not quite set up correctly, at least it wasn&#8217;t for me. I had to tweak it a bit.</p>

<p>What this means is that your <code>action</code> is always going to be <code>ipfw</code>. I tweaked the <code>ipfw.conf</code> file a bit. Now it does the following.</p>

<ol>
<li>Logs it&#8217;s action to ipfw.log</li>
<li>Adds a rulenum to the ipfw command. I did this because some other rule in my setup was allowing the IP before my deny could take effect. By lowering the rulenum my deny now fires off first.</li>
<li>Abstracted the protocol (tcp, udp) to pass as a variable. Just in case something you want to block isn&#8217;t <code>tcp</code>.</li>
</ol>

<p>I also created another filter as I found many times some machine would excessively hit my Apache server looking for nonexistent files. Since it sounds like something a bot would do I decided to ban it. This was the simple creation of a new filter.</p>

<p>I created a <code>jail.local</code> file to hold all my prefs and through trial and error discovered that the examples of how to <code>call</code> for a jail weren&#8217;t working for me. Perhaps I just didn&#8217;t understand the examples. I soon discovered that parameters for the <code>jail action</code> needed to be passed inside of square brackets in the prefs.</p>

<p>I&#8217;m sure, if you&#8217;ve gotten this far that you&#8217;re either very confused by this whole post or that you&#8217;ve had an epiphany. To further the epiphany along <a href="http://thefragens.com/pub/install_fail2ban_mods.tar.gz">I&#8217;ve uploaded my file changes</a>.</p>

<p>You should be able to figure out what file goes where from the folder structure of the upload.</p>

<p>A couple of things in summary to remember. First, turn on your server&#8217;s firewall. Then make sure you change your server&#8217;s local IP address in the files to match your own. That&#8217;s the setting for <code>localhost</code>.</p>

<p>Good luck. If you have any questions leave a comment.</p>
<p>Related posts:<ol>
<li><a href='http://thefragens.com/blog/2010/12/fail2ban-problems-and-solutions/' rel='bookmark' title='Fail2ban Problems and Solutions'>Fail2ban Problems and Solutions</a> <small>If you use Fail2ban then you are probably aware of...</small></li>
<li><a href='http://thefragens.com/blog/2010/11/fail2ban-and-os-x-server-part-deux/' rel='bookmark' title='Fail2ban and OS X Server, part deux'>Fail2ban and OS X Server, part deux</a> <small>As some of you might know I run my own...</small></li>
<li><a href='http://thefragens.com/blog/2010/11/checking-fail2ban-regex/' rel='bookmark' title='Checking Fail2ban regex'>Checking Fail2ban regex</a> <small>I&#8217;ve just stumbled across a great command in Fail2ban to...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://thefragens.com/blog/2009/09/fail2ban-on-leopard-server/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>VoodooPad Pro Blogging</title>
		<link>http://thefragens.com/blog/2009/05/voodoopad-pro-blogging/</link>
		<comments>http://thefragens.com/blog/2009/05/voodoopad-pro-blogging/#comments</comments>
		<pubDate>Thu, 07 May 2009 21:54:59 +0000</pubDate>
		<dc:creator>Andy Fragen</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[mac-osx]]></category>
		<category><![CDATA[blogging]]></category>

		<guid isPermaLink="false">http://thefragens.com/blog/?p=619</guid>
		<description><![CDATA[Please note that VoodooPad Pro has been renamed to VoodooPad. It&#8217;s time to package up all my VoodooPad blogging scripts and assorted web export plugins so that I can Remember what the heck I was thinking. Remember what all these &#8230; <a href="http://thefragens.com/blog/2009/05/voodoopad-pro-blogging/">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://thefragens.com/blog/2006/11/voodoopad-automation/' rel='bookmark' title='VoodooPad Automation'>VoodooPad Automation</a> <small>I&#8217;ve finally gotten it working. I&#8217;ve now got a Ruby...</small></li>
<li><a href='http://thefragens.com/blog/2006/07/voodoopad-web-export-goodness/' rel='bookmark' title='VoodooPad Web Export Goodness'>VoodooPad Web Export Goodness</a> <small>As laziness is the mother of invention, or something like...</small></li>
<li><a href='http://thefragens.com/blog/2006/11/voodoopad-blogging/' rel='bookmark' title='VoodooPad Blogging'>VoodooPad Blogging</a> <small>Well, it&#8217;s not really VoodooPad blogging but it&#8217;s pretty close....</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Please note that VoodooPad <span style="text-decoration: line-through;">Pro</span> has been renamed to VoodooPad.</p>

<p>It&#8217;s time to package up all my <a href="http://flyingmeat.com/voodoopad/">VoodooPad</a> blogging scripts and assorted web export plugins so that I can</p>

<ol>
<li>Remember what the heck I was thinking.</li>
<li>Remember what all these pieces were supposed to accomplish as a whole.</li>
<li>Provide some sort of reference to others interested in this stuff.</li>
</ol>

<p><strong>Concept:</strong> To use VoodooPad as a CMS for a web site, allowing for static sites and inclusion of blog-style concatenated page. The blog-style page was originally intended as a &#8220;News&#8221; page of a static business site. SEO optimization necessitating the addition of a page with re-newing content. <em>Google likes it more.</em></p>

<p>Disclaimer: I like <a href="http://daringfireball.net/projects/markdown/">Markdown</a> and built these scripts around the fact that the VP document is essentially always formatted in plain text. Images need to be added using links.</p>

<p>I will include a <a href="http://thefragens.com/pub/sample-project.zip">sample package</a> that contains a VP document, a web export plugin and several script plugins. The site the sample is based upon is at.</p>

<p>VoodooPad is a requirement as the meta data and triggers are necessary in the creation of the files. My workflow is as follows.</p>

<ol>
<li>Create new page/post.</li>
<li>Run script plugin <code>Blog &gt; Meta Markup - HomepageMeta</code> on new page.</li>
<li>Run script plugin <code>Blog &gt; Make Homepage and Feed</code></li>
<li>Run web export.</li>
<li>FTP files up to site. I use <a href="http://www.panic.com/transmit/">Transmit</a>. It&#8217;s also a great app.</li>
</ol>

<p>The script will move all the created files into a folder structure so that the file structure on the computer will match the web site structure.</p>

<p><strong>VoodooPad document</strong>
<strong>Item meta</strong> data is contained in the <code>HomepageMeta</code> page of the document. This is where most of the personalized info on the site is contained.</p>

<p>In the VP document, <em>tags</em> are used to create a pseudo-folder structure. This means that a page may only have one tag. Some pages are not exported but are used as reference, ie. links in the sidebar or the HomepageMeta page. Pages that are to be rendered at the root level of the site are tagged <code>main</code>.</p>

<p><strong>Triggers</strong> can be used to include certain information into specific pages or info on every page. I use this for things like Google Analytics which needs to be on every page or the analytics confirmation that is only on the index.html page.</p>

<p><strong>The Web Export Plugin</strong>
Some customization of these files will be necessary for your specific site.</p>

<p>&gt; Images are kept in the web export plugin. Files like <code>robots.txt</code> that need to be at the root level are kept in a <code>root</code> folder inside the web export plugin.</p>

<ul>
<li><p><code>preflight.sh</code> - creates the actual folder hierarchy, the folders are created in the <code>preflight.sh</code> script. The <code>preflight.sh</code> script also copies files like images to the export folder.</p></li>
<li><p><code>postflight.sh</code> - can be used to rename pages that may be PHP based from <code>.html</code> to <code>.php</code></p></li>
<li><p><code>deleteVPExtra.sh</code> - deletes the <em>extra</em> pages that VoodooPad creates during a web export. No changes to this file are needed.</p></li>
<li><p><code>fixRelativePaths.sh</code> - fixes the relative URLs that occur inside of nested pages. No changes to this file are needed.</p></li>
<li><p><code>parseMetaXml.rb</code> - Parses the meta.xml file that VoodooPad creates and uses that infomation to move files into their correct folder structure on the disk and to create a valid sitemap.xml file for use with Google Sitemaps. It also creates and parses the vpDocMeta.xml file for variables.</p></li>
<li><p><code>Info.plist</code> - This file was edited to call these scripts during the web export process.</p></li>
<li><p><code>vpDocMeta.xml</code> - This file resides inside the <code>root</code> folder of the Web Export Plugin. It is created by the parseMetaXml.rb script. It contains the following data points.</p></li>
<li><code>root</code> - default value is <code>main</code>. This is the name of the tag of rendered pages that belong at the root level of the folder structure.</li>
<li><code>baseUrl</code> - This is the base URL for the site for creation of the sitemap.xml file.</li>
<li><code>isHomeIndex</code> - default value is <code>false</code>. This is only used if the the page name in VP for the index page of the site is <code>home</code>. This is true if the main page is a blog-style homepage.</li>
<li><code>noIndex</code> - default value is <code>private</code>. This is the name of a directory whose files you don&#8217;t want included in sitemap.xml.</li>
</ul>

<p><strong>Script Plugins</strong>
These are placed in the <code>~/Library/Application Support/VoodooPad/Script PlugIns/</code> folder. No changes should be required in these scripts. They will be viewable from the <code>Plugin &amp;gt; Blog</code> menu in VoodooPad.</p>

<ul>
<li><p><code>meta_markup_HomepageMeta.lua</code> - Takes the data from the page <code>HomepageMeta</code> in the VP doc and adds specific item meta data to the frontmost page.</p></li>
<li><p><code>meta_markup_update.lua</code> - Propagates changes made to the <code>HomepageMeta</code> page to all the item meta data of all pages that require them. This is only just the pages used for the blog-style page.</p></li>
<li><p><code>blog_home_atom.lua</code> - Creates the blog-style page now called <code>home</code> in the VP document and also creates a valid atom.xml feed in the output directory.</p></li>
</ul>

<p>Comments and questions are welcome. If some enterprising person wants to wrap this all up in the new plugin architecture that would be cool. I&#8217;m happy to help if I can.</p>
<p>Related posts:<ol>
<li><a href='http://thefragens.com/blog/2006/11/voodoopad-automation/' rel='bookmark' title='VoodooPad Automation'>VoodooPad Automation</a> <small>I&#8217;ve finally gotten it working. I&#8217;ve now got a Ruby...</small></li>
<li><a href='http://thefragens.com/blog/2006/07/voodoopad-web-export-goodness/' rel='bookmark' title='VoodooPad Web Export Goodness'>VoodooPad Web Export Goodness</a> <small>As laziness is the mother of invention, or something like...</small></li>
<li><a href='http://thefragens.com/blog/2006/11/voodoopad-blogging/' rel='bookmark' title='VoodooPad Blogging'>VoodooPad Blogging</a> <small>Well, it&#8217;s not really VoodooPad blogging but it&#8217;s pretty close....</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://thefragens.com/blog/2009/05/voodoopad-pro-blogging/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iCal - Exchange Time Zone Fix - Chapter 3</title>
		<link>http://thefragens.com/blog/2008/12/ical-exchange-time-zone-fix-chapter-3/</link>
		<comments>http://thefragens.com/blog/2008/12/ical-exchange-time-zone-fix-chapter-3/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 23:42:25 +0000</pubDate>
		<dc:creator>Andy Fragen</dc:creator>
				<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[mac-osx]]></category>

		<guid isPermaLink="false">http://thefragens.com/blog/?p=596</guid>
		<description><![CDATA[I&#8217;ve updated the iCal-Invite-Fix script again. This time to allow for adding multiple Exchange servers to the script so that you should only need a single script. The set-up is slightly more complex. As the image above shows there are &#8230; <a href="http://thefragens.com/blog/2008/12/ical-exchange-time-zone-fix-chapter-3/">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://thefragens.com/blog/2008/08/ical-exchange-time-zone-fix-chapter-2/' rel='bookmark' title='iCal - Exchange Time Zone Fix - Chapter 2'>iCal - Exchange Time Zone Fix - Chapter 2</a> <small>It was a few months ago that I originally wrote...</small></li>
<li><a href='http://thefragens.com/blog/2008/08/ical-exchange-time-zone-fix-part-2/' rel='bookmark' title='iCal - Exchange Time Zone Fix - part 2'>iCal - Exchange Time Zone Fix - part 2</a> <small>I&#8217;ve come across a problem with the original MailExchange2iCal-TZ-fix script....</small></li>
<li><a href='http://thefragens.com/blog/2008/04/ical-exchange-time-zone-fix/' rel='bookmark' title='iCal - Exchange Time Zone Fix'>iCal - Exchange Time Zone Fix</a> <small>As any Mac user who deals with Microsoft Exchange invites...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated the <a href="http://thefragens.com/blog/2008/08/ical-exchange-time-zone-fix-chapter-2/">iCal-Invite-Fix script</a> again. This time to allow for adding multiple Exchange servers to the script so that you should only need a single script. The set-up is slightly more complex.</p>

<p><img src="http://thefragens.com/blog/wp-content/uploads/2009/01/ical-fix-properties3.jpg" border="0" alt="ical-fix-properties3.jpg" width="550" height="104" /></p>

<p>As the image above shows there are now only 2 properties, both of which are lists. These lists work together as an array; which means the order of the list items is crucial.</p>

<ul>
<li><code>exchange_fragment</code> contains unique fragments of the TZID that the Exchange server sends.</li>
<li><code>ical_tzid</code> contains the tzid info that iCal expects to see.</li>
</ul>

<p>If you have any problems setting it up let me know. <a href="http://thefragens.com/blog/2008/08/ical-exchange-time-zone-fix-chapter-2/">This post</a> has all the info for the script.</p>

<p><a href="http://thefragens.com/pub/iCal-Invite-Fix.scpt">Download the iCal-Invite-Fix script</a>.</p>
<p>Related posts:<ol>
<li><a href='http://thefragens.com/blog/2008/08/ical-exchange-time-zone-fix-chapter-2/' rel='bookmark' title='iCal - Exchange Time Zone Fix - Chapter 2'>iCal - Exchange Time Zone Fix - Chapter 2</a> <small>It was a few months ago that I originally wrote...</small></li>
<li><a href='http://thefragens.com/blog/2008/08/ical-exchange-time-zone-fix-part-2/' rel='bookmark' title='iCal - Exchange Time Zone Fix - part 2'>iCal - Exchange Time Zone Fix - part 2</a> <small>I&#8217;ve come across a problem with the original MailExchange2iCal-TZ-fix script....</small></li>
<li><a href='http://thefragens.com/blog/2008/04/ical-exchange-time-zone-fix/' rel='bookmark' title='iCal - Exchange Time Zone Fix'>iCal - Exchange Time Zone Fix</a> <small>As any Mac user who deals with Microsoft Exchange invites...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://thefragens.com/blog/2008/12/ical-exchange-time-zone-fix-chapter-3/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Importing Mail Message Attachments into Aperture</title>
		<link>http://thefragens.com/blog/2008/11/importing-mail-message-attachments-into-aperture/</link>
		<comments>http://thefragens.com/blog/2008/11/importing-mail-message-attachments-into-aperture/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 00:04:01 +0000</pubDate>
		<dc:creator>Andy Fragen</dc:creator>
				<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[mac-osx]]></category>

		<guid isPermaLink="false">http://thefragens.com/blog/?p=575</guid>
		<description><![CDATA[So I&#8217;ve just gotten my new Unibody MacBook and Aperture. Immediately I find myself wanting for a Quick Look &#62; Add to Aperture just like there is for iPhoto. Unfortunately it&#8217;s nowhere to be found. Fortunately Aperture is scriptable. Version &#8230; <a href="http://thefragens.com/blog/2008/11/importing-mail-message-attachments-into-aperture/">Continue reading <span class="meta-nav">&#8594;</span></a>
Related posts:<ol>
<li><a href='http://thefragens.com/blog/2006/08/switching-to-mailapp/' rel='bookmark' title='Switching to Mail.app'>Switching to Mail.app</a> <small>I&#8217;ve recently switched to Mail.app. I never really used it...</small></li>
<li><a href='http://thefragens.com/blog/2008/08/ical-exchange-time-zone-fix-chapter-2/' rel='bookmark' title='iCal - Exchange Time Zone Fix - Chapter 2'>iCal - Exchange Time Zone Fix - Chapter 2</a> <small>It was a few months ago that I originally wrote...</small></li>
<li><a href='http://thefragens.com/blog/2010/05/server-side-email-filtering-with-sieve/' rel='bookmark' title='Server-Side Email Filtering with Sieve'>Server-Side Email Filtering with Sieve</a> <small>Another post for the peripheral brain. When I first set...</small></li>
</ol>

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve just gotten my new Unibody MacBook and Aperture. Immediately I find myself wanting for a <em>Quick Look &gt; Add to Aperture</em> just like there is for iPhoto. Unfortunately it&#8217;s nowhere to be found. Fortunately Aperture is scriptable.</p>

<p>Version 1.0 of <a href="http://www.thefragens.com/pub/SaveAttachments2Aperture.scpt">SaveAttachments2Aperture</a> is now available. It&#8217;s currently very simple with little error checking. It works multiple attachments per message and imports all attachments of a selected message into a new Aperture project.</p>

<p>It could be used in a Mail rule though I prefer to select it manually from the Script menu. I have it saved in <code>~/Library/Scripts/Applications/Mail/</code>.</p>

<p>A thanks goes out to <a href="http://homepage.mac.com/jlarson7/index.html">Automating Aperture</a> where I got some of the Aperture scripting.</p>

<p>Comments welcome.</p>

<p><strong>Update</strong>
Now at version 1.1. I added some simple logic to only import certain file types. You might need to add to this list. If I&#8217;m missing some let me know, especially with Raw images.</p>

<p>v1.2 - add a bunch of the <em>usual</em> camera raw file types</p>
<p>Related posts:<ol>
<li><a href='http://thefragens.com/blog/2006/08/switching-to-mailapp/' rel='bookmark' title='Switching to Mail.app'>Switching to Mail.app</a> <small>I&#8217;ve recently switched to Mail.app. I never really used it...</small></li>
<li><a href='http://thefragens.com/blog/2008/08/ical-exchange-time-zone-fix-chapter-2/' rel='bookmark' title='iCal - Exchange Time Zone Fix - Chapter 2'>iCal - Exchange Time Zone Fix - Chapter 2</a> <small>It was a few months ago that I originally wrote...</small></li>
<li><a href='http://thefragens.com/blog/2010/05/server-side-email-filtering-with-sieve/' rel='bookmark' title='Server-Side Email Filtering with Sieve'>Server-Side Email Filtering with Sieve</a> <small>Another post for the peripheral brain. When I first set...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://thefragens.com/blog/2008/11/importing-mail-message-attachments-into-aperture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

