<?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>durdle.com</title>
	<atom:link href="http://durdle.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://durdle.com</link>
	<description></description>
	<lastBuildDate>Mon, 23 Aug 2010 11:25:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Run YOURLS on IIS 7</title>
		<link>http://durdle.com/archives/2010/08/23/run-yourls-on-iis-7/</link>
		<comments>http://durdle.com/archives/2010/08/23/run-yourls-on-iis-7/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 11:23:55 +0000</pubDate>
		<dc:creator>Howard</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[iis7]]></category>
		<category><![CDATA[urlrewrite]]></category>
		<category><![CDATA[yourls]]></category>

		<guid isPermaLink="false">http://durdle.com/?p=845</guid>
		<description><![CDATA[If you&#8217;re running YOURLS on an IIS 7 box you&#8217;ll need the correct settings in your web.config to perform the URL Rewriting.  An example web.config with the correct settings is below.  
Note the security section which disables some paranoid protection IIS has switched on by default.  If your server doesn&#8217;t allow double...]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re running <a href="http://yourls.org/">YOURLS</a> on an IIS 7 box you&#8217;ll need the correct settings in your web.config to perform the URL Rewriting.  An example web.config with the correct settings is below.  <span id="more-845"></span></p>
<p>Note the security section which disables some paranoid protection IIS has switched on by default.  If your server doesn&#8217;t allow double escaping of request strings, the YOURLS links with a + in them don&#8217;t work.  This breaks the admin interface and the stats reporting pages.</p>
<p>The rest of the web.config is standard stuff to fix a non-canonical hostname, and make sure the IDs are rewritten to the right pages:</p>
<div class="wp_syntax">
<div class="code">
<pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;system.webServer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;security<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;requestFiltering</span> <span style="color: #000066;">allowDoubleEscaping</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/security<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;rewrite<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;rules<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;rule</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Canonical Host Name&quot;</span> <span style="color: #000066;">stopProcessing</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;match</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;(.*)&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;conditions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">input</span>=<span style="color: #ff0000;">&quot;{HTTP_HOST}&quot;</span> <span style="color: #000066;">negate</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;^domain\.com$&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/conditions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Redirect&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;http://domain.com/{R:1}&quot;</span> <span style="color: #000066;">redirectType</span>=<span style="color: #ff0000;">&quot;Permanent&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/rule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;rule</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;YOURLS 1&quot;</span> <span style="color: #000066;">stopProcessing</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;match</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;^([0-9A-Za-z]+)/?$&quot;</span> <span style="color: #000066;">ignoreCase</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;conditions</span> <span style="color: #000066;">logicalGrouping</span>=<span style="color: #ff0000;">&quot;MatchAll&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">input</span>=<span style="color: #ff0000;">&quot;{REQUEST_FILENAME}&quot;</span> <span style="color: #000066;">matchType</span>=<span style="color: #ff0000;">&quot;IsFile&quot;</span> <span style="color: #000066;">ignoreCase</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000066;">negate</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">input</span>=<span style="color: #ff0000;">&quot;{REQUEST_FILENAME}&quot;</span> <span style="color: #000066;">matchType</span>=<span style="color: #ff0000;">&quot;IsDirectory&quot;</span> <span style="color: #000066;">ignoreCase</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000066;">negate</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/conditions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Rewrite&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;/yourls-go.php?id={R:1}&quot;</span> <span style="color: #000066;">appendQueryString</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/rule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;rule</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;YOURLS 2&quot;</span> <span style="color: #000066;">stopProcessing</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;match</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;^([0-9A-Za-z]+)\+/?$&quot;</span> <span style="color: #000066;">ignoreCase</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Rewrite&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;/yourls-infos.php?id={R:1}&quot;</span> <span style="color: #000066;">appendQueryString</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/rule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;rule</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;YOURLS 3&quot;</span> <span style="color: #000066;">stopProcessing</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;match</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;^([0-9A-Za-z]+)\+all/?$&quot;</span> <span style="color: #000066;">ignoreCase</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Rewrite&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;/yourls-infos.php?id={R:1}&amp;amp;all=1&quot;</span> <span style="color: #000066;">appendQueryString</span>=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/rule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/rules<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/rewrite<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/system.webServer<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://durdle.com/archives/2010/08/23/run-yourls-on-iis-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RegExCatchAll Transport Agent for Exchange 2007/2010</title>
		<link>http://durdle.com/archives/2010/05/29/regexcatchall/</link>
		<comments>http://durdle.com/archives/2010/05/29/regexcatchall/#comments</comments>
		<pubDate>Sat, 29 May 2010 15:31:16 +0000</pubDate>
		<dc:creator>Howard</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[catchall]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[dotnet]]></category>
		<category><![CDATA[email suffix]]></category>
		<category><![CDATA[exchange]]></category>
		<category><![CDATA[exchange 2007]]></category>
		<category><![CDATA[exchange 2010]]></category>
		<category><![CDATA[regexp]]></category>
		<category><![CDATA[transport agent]]></category>

		<guid isPermaLink="false">http://blog.durdle.com/?p=777</guid>
		<description><![CDATA[How moving email services to an Exchange Server revealed email suffix matching as a missing feature, and how to implement that feature using a Transport Agent.]]></description>
			<content:encoded><![CDATA[<p>For a number of years now I have been doing two things with email:</p>
<p>1) I run my own <a href="http://www.microsoft.com/exchange/">Exchange Server</a>.  <a href="/wp-content/uploads/Exchange2010Logo.png" rel="lightbox[818]"><img class="alignleft  size-full wp-image-805" title="Exchange 2010 Logo" src="/wp-content/uploads/Exchange2010Logo.png" alt="Exchange 2010 Logo" width="150" height="150" /></a>It provides <a href="http://technet.microsoft.com/en-us/exchange/bb288524.aspx">ActiveSync</a>, <a href="http://www.microsoft.com/exchange/code/OWA/index.html">Outlook Web Access</a>, and <a href="http://office.microsoft.com/en-us/outlook/hp101024441033.aspx">Outlook Anywhere</a> for my company’s email domains and my personal durdle.com domain.</p>
<p>2) I provide email addresses at durdle.com for family members (and a few people who just happen to share the family name).</p>
<p>&nbsp;<br />
&nbsp;</p>
<p>Historically all those family emails have been maintained by <a href="http://www.gradwell.com/">Gradwell</a> without going near my Exchange Server.  The durdle.com <a href="http://en.wikipedia.org/wiki/MX_record">MX records</a> in DNS pointed to Gradwell’s servers for mail delivery and I had a forwarder at Gradwell that would redirect my – and only my – messages to the Exchange Server.  For a number of reasons I needed to change this so that all email is delivered via my Exchange Server.  I made this change yesterday, discovering one problem in the process.</p>
<h5>Email Suffixes</h5>
<p>Gradwell’s mail server supports email suffix matching.  If you have a <a href="http://mail.google.com/">GMail</a> account you may be familiar with the approach.  Say you have an email <a href="mailto:john@gmail.com">john@gmail.com</a>.  Gmail will actually deliver mail to <a href="mailto:john+anything@gmail.com">john+anything@gmail.com</a>; you can add any suffix you like after the + and GMail will still deliver it to your inbox.  Gradwell support this by allowing you to place a period after the local part so you can use <a href="mailto:john.anything@example.com">john.anything@example.com</a>.  You don’t have to create these email addresses anywhere – you can just start using it and the mail server will make sure it gets to you.</p>
<p>This is fantastically useful because it means that when a website asks for your email address you can give out a custom throwaway email just for that site.  So when you sign up at DodgyCo.com, you give them the email <a href="mailto:john.dodgyco@example.com">john.dodgyco@example.com</a>.  If you ever receive spam because DodgyCo sold your email address you’ll know a) who sold you out, and b) which email address to add to your spam filter.</p>
<h5>Exchange Server</h5>
<p>Enter Microsoft Exchange Server.  I’m currently running the 2010 edition, but the problem I’m about to describe (and solve!) exists in every recent version.  Exchange Server doesn’t support email suffixes.  Every recipient has to have an alias created on the server.  If you want to deliver to <a href="mailto:john.suffix@example.com">john.suffix@example.com</a> you’d better remember to create an alias for that user, otherwise the Exchange Recipient Filter will reject the message since – as far as it is concerned – the user does not exist on the server.</p>
<p>Worse, Exchange doesn’t even implement any generic <a href="http://en.wikipedia.org/wiki/Catch-all">CatchAll</a> functionality.  CatchAll would allow the server to redirect messages for non-existing recipients to a specific address. <a href="http://catchallagent.codeplex.com/" target="_blank">Smart people</a> have created solutions to the CatchAll problem but all that does is allow you to define one mailbox for ALL non-deliverable messages to be delivered to.  Since I need to provide suffix matching to multiple users this doesn’t work for me.</p>
<p>Time to extend Exchange’s functionality!</p>
<h5>Transport Agents</h5>
<p><a href="http://technet.microsoft.com/en-us/library/bb125012.aspx" target="_blank">Transport Agents</a> were introduced in Exchange 2007 to replace Exchange 2003’s SMTP Event Sinks and have been retained largely unchanged in Exchange 2010.  Broadly speaking when a message arrives at an Exchange Server it is moved through the transport pipeline as each SMTP event occurs.  Each <a href="http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol">SMTP event</a> (Connect, MAIL FROM, RCPT TO, etc) can trigger an interested Transport Agent to perform some actions on the message.<br />
The complete list of SMTP events and their sequence is described on <a href="http://technet.microsoft.com/en-us/library/bb125012.aspx" target="_blank">this Exchange Server TechCenter page</a>.</p>
<p>Transport Agents are simply DLLs written in managed code that fire on SMTP events.  Back when I contracted for the <a href="http://www.mod.uk/">MOD</a> I wrote a Transport Agent for Exchange 2007 which demonstrated that Exchange was capable of performing Dominance Checking on outgoing emails so I knew that it wouldn&#8217;t take to long to write a Transport Agent to filter incoming messages.  I was able to reuse some of that code and also made use of some of <a href="http://www.codeplex.com/site/users/view/wilbertdg" target="_blank">Wilbert De Graaf</a>’s <a href="http://catchallagent.codeplex.com/" target="_blank">CatchAll Agent</a> code which made the handling of a configuration file very quick to implement.  Thank you Wilbert!</p>
<h5>Requirements</h5>
<p>I had a couple of requirements for my Transport Agent:</p>
<p>1) It should allow redirection of multiple suffixes to different recipients.</p>
<p>2) It should allow me to ban delivery to any previously used suffixes and ensure that the sender receives a non-deliverable report.</p>
<p>I ended up meeting these requirements by using C# to write a Transport Agent that accepts its configuration from an XML file.  The config.xml defines multiple regular expressions to match against along with associated redirect addresses.  It also lists banned email addresses which the Transport Agent should reject.</p>
<p>To mimic the <a href="http://www.gradwell.com/support/howto/article/392">Gradwell behaviour</a> which we were already making use of I needed to match firstname then a dot and then any word before the domain.  This is a fairly simple <a href="http://support.microsoft.com/kb/308252">regular expression in C#</a>, and looks like this:</p>
<div class="wp_syntax">
<div class="code">
<pre class="xml" style="font-family:monospace;">^firstname+\.[a-z]+@example.com$</pre>
</div>
</div>
<p>The config.xml takes the form:</p>
<div class="wp_syntax">
<div class="code">
<pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;config<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;redirect</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;^john+\.[a-z]+@domain.com$&quot;</span> <span style="color: #000066;">address</span>=<span style="color: #ff0000;">&quot;john@domain.com&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;redirect</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;^jane+\.[a-z]+@domain.com$&quot;</span> <span style="color: #000066;">address</span>=<span style="color: #ff0000;">&quot;jane.doe@gmail.com&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;banned</span> <span style="color: #000066;">address</span>=<span style="color: #ff0000;">&quot;john.spam@domain.com&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;banned</span> <span style="color: #000066;">address</span>=<span style="color: #ff0000;">&quot;jane.newsletter@domain.com&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/config<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre>
</div>
</div>
<p>Here we define two patterns for redirect, one to an internal recipient and one redirect to an external SMTP address.  We also ban two known &#8220;bad&#8221; recipient addresses.</p>
<p>You’ll need to provide at least one redirect entry, but you’re not required to ban any addresses if you don&#8217;t want to.  Also, while redirects specifiy regular expressions to match, banned addresses are just strings which are simply compared.  I leave it as an exercise for the reader to add regular expressions to the banned list!</p>
<h5>The Code</h5>
<p>Whenever the config.xml file is changed, the agent reloads it and parses the XML.  It puts the banned emails into a List and the regular expression patterns and redirect addresses into a Dictionary.  If any of the emails in the config appear invalid the new configuration is rejected and the agent continues to use the running config.</p>
<p>The agent defines a RCPT TO: handler.  This event is fired as soon as the sending MTA starts to transmit the recipient addresses.  rcptArgs contains the argument we need: RecipientAddress, which we store as a lowercase string for comparison.  Although the spec (<a href="http://www.faqs.org/rfcs/rfc2821.html">RFC2821</a>) actually requires email addresses to be case sensitive, I&#8217;ve never met an MTA that adheres to that part of the spec.  So for our purposes email addresses are case insensitive and we can do all comparisons in lowercase.</p>
<div class="wp_syntax">
<div class="code">
<pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #0600FF;">void</span> RcptToHandler<span style="color: #000000;">&#40;</span>ReceiveCommandEventSource source, RcptCommandEventArgs rcptArgs<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-style: italic;">// Get the recipient address as a lowercase string.</span>
<span style="color: #FF0000;">string</span> strRecipientAddress <span style="color: #008000;">=</span> rcptArgs.<span style="color: #0000FF;">RecipientAddress</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">ToLower</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre>
</div>
</div>
<p>It performs two checks.  First &#8211; is the recipient address in the ban list?</p>
<div class="wp_syntax">
<div class="code">
<pre class="csharp" style="font-family:monospace;"><span style="color: #008080; font-style: italic;">// Search the banned email List for the recipient.</span>
<span style="color: #FF0000;">bool</span> exists <span style="color: #008000;">=</span> catchAllConfig.<span style="color: #0000FF;">Banned</span>.<span style="color: #0000FF;">Exists</span><span style="color: #000000;">&#40;</span>element <span style="color: #008000;">=&gt;</span> element <span style="color: #008000;">==</span> strRecipientAddress<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>exists<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #008080; font-style: italic;">// If found respond to the sending MTA with the reject response.</span>
	source.<span style="color: #0000FF;">RejectCommand</span><span style="color: #000000;">&#40;</span>CatchAllAgent.<span style="color: #0000FF;">rejectResponse</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
	<span style="color: #008080; font-style: italic;">// No further processing.</span>
	return<span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre>
</div>
</div>
<p>And second, does the recipient address match any of the regular expressions?</p>
<div class="wp_syntax">
<div class="code">
<pre class="csharp" style="font-family:monospace;"><span style="color: #008080; font-style: italic;">// For each pair of regexps to email addresses</span>
<span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>var pair <span style="color: #0600FF;">in</span> catchAllConfig.<span style="color: #0000FF;">AddressMap</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #008080; font-style: italic;">// Create the regular expression and the routing address from the dictionary.</span>
	Regex emailPattern <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Regex<span style="color: #000000;">&#40;</span>pair.<span style="color: #0000FF;">Key</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
	RoutingAddress emailAddress <span style="color: #008000;">=</span> pair.<span style="color: #0000FF;">Value</span><span style="color: #008000;">;</span>
&nbsp;
	<span style="color: #008080; font-style: italic;">// If the recipient address matches the regular expression.</span>
	<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>emailPattern.<span style="color: #0000FF;">IsMatch</span><span style="color: #000000;">&#40;</span>strRecipientAddress<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #008080; font-style: italic;">// And if the recipient is NOT in the address book.</span>
		<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">addressBook</span> <span style="color: #008000;">!=</span> <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">&amp;&amp;</span>
			<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">addressBook</span>.<span style="color: #0000FF;">Find</span><span style="color: #000000;">&#40;</span>rcptArgs.<span style="color: #0000FF;">RecipientAddress</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">==</span> <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #008080; font-style: italic;">// Redirect the recipient to the other address.</span>
			rcptArgs.<span style="color: #0000FF;">RecipientAddress</span> <span style="color: #008000;">=</span> emailAddress<span style="color: #008000;">;</span>
&nbsp;
			<span style="color: #008080; font-style: italic;">// No further processing.</span>
			return<span style="color: #008000;">;</span>
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre>
</div>
</div>
<p>Note that in both cases as soon as we&#8217;ve got a positive result we stop further processing.  If an address is in the ban list we immediately reject it, and if we find a matching regular expression we use its paired address to redirect the message and stop looking for further matches.</p>
<p>I&#8217;ve given enough information here that a C# developer with some spare time could create this Transport Agent themselves.  However I know that it is really useful to have a package you can just download and install without having to worry about compiling it yourself.  So I&#8217;ve packaged the DLL together with installation scripts and the <a href="/regexcatchall/installation/">install and configuration guide</a>.  </p>
<p>Please visit the <a href="/regexcatchall/">product page</a> for more information and to purchase the Transport Agent.  Payment is via PayPal, you will receive the download link within minutes of payment.</p>
]]></content:encoded>
			<wfw:commentRss>http://durdle.com/archives/2010/05/29/regexcatchall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snow Leopard dual NVidia cards EFI Strings</title>
		<link>http://durdle.com/archives/2010/05/03/snow-leopard-dual-nvidia-cards-efi-strings/</link>
		<comments>http://durdle.com/archives/2010/05/03/snow-leopard-dual-nvidia-cards-efi-strings/#comments</comments>
		<pubDate>Mon, 03 May 2010 15:33:30 +0000</pubDate>
		<dc:creator>Howard</dc:creator>
				<category><![CDATA[Future Howard]]></category>
		<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://blog.durdle.com/?p=769</guid>
		<description><![CDATA[Another post for future Howard, which may be useful to other people with a very specific set of circumstances.  Namely: you&#8217;re running Snow Leopard on a Gigabyte P35-DS4 with a GeForce 8800 GTX 768MB in the first PCIE slot, and a GeForce 8800 GTS 320MB in the second.  The PciRoot addresses you need...]]></description>
			<content:encoded><![CDATA[<p>Another post for future Howard, which may be useful to other people with a very specific set of circumstances.  Namely: you&#8217;re running Snow Leopard on a Gigabyte P35-DS4 with a GeForce 8800 GTX 768MB in the first PCIE slot, and a GeForce 8800 GTS 320MB in the second.  The PciRoot addresses you need for those cards on this board are:</p>
<p><code>PciRoot(0x1)/Pci(0x1c,0x0)/Pci(0x0,0x0)</code> for the GTS in slot one.<br />
<code>PciRoot(0x1)/Pci(0x1,0x0)/Pci(0x0,0x0)</code> for the GTX in slot two (PEG2).</p>
<p>You&#8217;ll need this for when you generate the EFI hex string in EFI Studio.</p>
<p>Remember also to change the BIOS to boot from PEG2.</p>
<p>Maybe that&#8217;ll save someone else the pain of pulling the cards and running <code>gfxutil -f display</code> on each one!</p>
]]></content:encoded>
			<wfw:commentRss>http://durdle.com/archives/2010/05/03/snow-leopard-dual-nvidia-cards-efi-strings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix orphaned SQL Server users</title>
		<link>http://durdle.com/archives/2010/03/11/fix-orphaned-sql-server-users/</link>
		<comments>http://durdle.com/archives/2010/03/11/fix-orphaned-sql-server-users/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 17:04:21 +0000</pubDate>
		<dc:creator>Howard</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Future Howard]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://blog.durdle.com/?p=765</guid>
		<description><![CDATA[I always forget this in between using it, so for the benefit of future Howard, here&#8217;s how to fix orphaned users resulting from restoring a SQL database to a different machine.
First, list the orphan users to make sure this is the problem:


EXEC sp_change_users_login 'Report'


Usually I already have the login and password set up on the...]]></description>
			<content:encoded><![CDATA[<p>I always forget this in between using it, so for the benefit of future Howard, here&#8217;s how to fix orphaned users resulting from restoring a SQL database to a different machine.<span id="more-765"></span></p>
<p>First, list the orphan users to make sure this is the problem:</p>
<div class="wp_syntax">
<div class="code">
<pre class="sql" style="font-family:monospace;">EXEC sp_change_users_login <span style="color: #ff0000;">'Report'</span></pre>
</div>
</div>
<p>Usually I already have the login and password set up on the server, this being the case you can fix the orphan by doing:</p>
<div class="wp_syntax">
<div class="code">
<pre class="sql" style="font-family:monospace;">EXEC sp_change_users_login <span style="color: #ff0000;">'Auto_Fix'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'user'</span></pre>
</div>
</div>
<p>If not, and you want/need to create the login and password, you&#8217;ll need to do this instead:</p>
<div class="wp_syntax">
<div class="code">
<pre class="sql" style="font-family:monospace;">EXEC sp_change_users_login <span style="color: #ff0000;">'Auto_Fix'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'user'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'login'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'password'</span></pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://durdle.com/archives/2010/03/11/fix-orphaned-sql-server-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IIS7 web.config fun</title>
		<link>http://durdle.com/archives/2010/03/08/iis7-web-config-fun/</link>
		<comments>http://durdle.com/archives/2010/03/08/iis7-web-config-fun/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 20:15:11 +0000</pubDate>
		<dc:creator>Howard</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[gradwell]]></category>
		<category><![CDATA[iis7]]></category>
		<category><![CDATA[memset]]></category>
		<category><![CDATA[web.config]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[workavoidance]]></category>

		<guid isPermaLink="false">http://blog.durdle.com/?p=747</guid>
		<description><![CDATA[I spent some time last weekend migrating the Work Avoidance site away from Gradwell and onto a dedicated virtual server from MEMSET.  Since this involved a move to a Windows box away from UNIX hosting, I had to configure in IIS7 some of the settings I had in the .htaccess under the UNIX host.
For...]]></description>
			<content:encoded><![CDATA[<p><a href="/wp-content/uploads/iis7-logo.jpg" rel="lightbox[747]"><img src="/wp-content/uploads/iis7-logo.jpg" alt="IIS7 Logo" title="IIS7" width="200" height="125" class="alignleft size-full wp-image-757" /></a>I spent some time last weekend migrating the <a href="http://workavoidance.net">Work Avoidance</a> site away from <a href="http://www.gradwell.net/">Gradwell</a> and onto a dedicated virtual server from <a href="http://www.memset.com/dedicated-servers/virtual.php">MEMSET</a>.  Since this involved a move to a Windows box away from UNIX hosting, I had to configure in IIS7 some of the settings I had in the .htaccess under the UNIX host.<span id="more-747"></span></p>
<p>For example, I want a canonical host name (so visitors always see <a href="http://workavoidance.net">workavoidance.net</a> with no www prefix in the address bar) and to ensure that the <a href="http://wordpress.org/">Wordpress</a> permalinks work properly.  While I was at it I took the opportunity to disable hot-linking of our images, since for some reason a Russian website had taken a shine to some of our <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=303892009&#038;mt=8">Armory</a> graphics.</p>
<p>Below is the <code>web.config</code> I created.  It redirects users to the canonical host name, enables Wordpress permalinks and disables hot-linking of our images.  The redirect proved something of a problem to begin with.  Our iPhone App &#8220;<a href="http://itunes.apple.com/us/app/monkey-shaker/id290779801?mt=8">Monkey Shaker</a>&#8221; has an online <a href="http://workavoidance.net/highscores/shaker/">high score system</a>.  Scores are submitted from the app via an encrypted HTTP POST to a PHP page which decrypts the information and updates the database.  I discovered that when you issue a server side redirect most clients won&#8217;t re-POST their data to the new page &#8211; they will issue a GET for the new page and the original POST data is lost.  This meant that highscore submissions were failing.</p>
<p>(NB: this isn&#8217;t as big a disaster as it sounds since we built a very robust mechanism to retry score submission into the app.)</p>
<p>So, you&#8217;ll note an extra entry in the web.config to exclude that page from a redirect:</p>
<div class="wp_syntax">
<div class="code">
<pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">input</span>=<span style="color: #ff0000;">&quot;{URL}&quot;</span> <span style="color: #000066;">negate</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;scoresubmit\.php$&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre>
</div>
</div>
<p>&#8220;Why not just change the URL in the app to be canonical?!&#8221; You may well ask.  Yes, we probably will, but that relies on issuing an update and getting <strong>over a quarter of a million users</strong> to download it.  This way we don&#8217;t have to rely on that.</p>
<p>Still to come &#8211; how I implemented caching in Wordpress and in our high score system to improve performance.</p>
<p>Here&#8217;s the rewrite rules section of the completed web.config:</p>
<div class="wp_syntax">
<div class="code">
<pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;rule</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Canonical Host Name&quot;</span> <span style="color: #000066;">stopProcessing</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;match</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;(.*)&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;conditions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">input</span>=<span style="color: #ff0000;">&quot;{HTTP_HOST}&quot;</span> <span style="color: #000066;">negate</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;^workavoidance\.net$&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">input</span>=<span style="color: #ff0000;">&quot;{URL}&quot;</span> <span style="color: #000066;">negate</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;scoresubmit\.php$&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/conditions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Redirect&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;http://workavoidance.net/{R:1}&quot;</span> <span style="color: #000066;">redirectType</span>=<span style="color: #ff0000;">&quot;Permanent&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/rule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;rule</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Prevent image hotlinking&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;match</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;.*\.(gif|jpg|png)$&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;conditions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">input</span>=<span style="color: #ff0000;">&quot;{HTTP_REFERER}&quot;</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;^$&quot;</span> <span style="color: #000066;">negate</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">input</span>=<span style="color: #ff0000;">&quot;{HTTP_REFERER}&quot;</span> <span style="color: #000066;">pattern</span>=<span style="color: #ff0000;">&quot;^http://workavoidance\.net/.*$&quot;</span> <span style="color: #000066;">negate</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/conditions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Rewrite&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;/no.png&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/rule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;rule</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;wordpress&quot;</span> <span style="color: #000066;">patternSyntax</span>=<span style="color: #ff0000;">&quot;Wildcard&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;match</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;conditions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">input</span>=<span style="color: #ff0000;">&quot;{REQUEST_FILENAME}&quot;</span> <span style="color: #000066;">matchType</span>=<span style="color: #ff0000;">&quot;IsFile&quot;</span> <span style="color: #000066;">negate</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;add</span> <span style="color: #000066;">input</span>=<span style="color: #ff0000;">&quot;{REQUEST_FILENAME}&quot;</span> <span style="color: #000066;">matchType</span>=<span style="color: #ff0000;">&quot;IsDirectory&quot;</span> <span style="color: #000066;">negate</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/conditions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;Rewrite&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;index.php&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/rule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://durdle.com/archives/2010/03/08/iis7-web-config-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hyper-V: Increase network throughput to guest VMs</title>
		<link>http://durdle.com/archives/2010/02/03/hyper-v-increase-network-throughput-to-guest-vms/</link>
		<comments>http://durdle.com/archives/2010/02/03/hyper-v-increase-network-throughput-to-guest-vms/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 12:33:29 +0000</pubDate>
		<dc:creator>Howard</dc:creator>
				<category><![CDATA[Future Howard]]></category>
		<category><![CDATA[Virtualisation]]></category>

		<guid isPermaLink="false">http://blog.durdle.com/?p=745</guid>
		<description><![CDATA[The Windows Server Performance team show how to increase network throughput to guest VMs on Hyper-V.  Linking here for Future-Howard, who will certainly need it again.
Windows Server Performance Team Blog : Increase VMBus buffer sizes to increase network throughput to guest VMs.
]]></description>
			<content:encoded><![CDATA[<p>The Windows Server Performance team show how to increase network throughput to guest VMs on Hyper-V.  Linking here for Future-Howard, who will certainly need it again.</p>
<p><a href="http://blogs.technet.com/winserverperformance/archive/2010/02/02/increase-vmbus-buffer-sizes-to-increase-network-throughput-to-guest-vms.aspx">Windows Server Performance Team Blog : Increase VMBus buffer sizes to increase network throughput to guest VMs</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://durdle.com/archives/2010/02/03/hyper-v-increase-network-throughput-to-guest-vms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable VT on Sony Vaio Z11</title>
		<link>http://durdle.com/archives/2009/07/30/enable-vt-on-sony-vaio-z11/</link>
		<comments>http://durdle.com/archives/2009/07/30/enable-vt-on-sony-vaio-z11/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 09:33:57 +0000</pubDate>
		<dc:creator>Howard</dc:creator>
				<category><![CDATA[Future Howard]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Virtualisation]]></category>

		<guid isPermaLink="false">http://blog.durdle.com/?p=715</guid>
		<description><![CDATA[Some time ago I posted at length about Sony&#8217;s decision to disable the Virtualization Technology features of the Intel chips in their high-end laptops, namely my Vaio Z11.
 Well thanks to the sterling efforts of one man and his EFI hacking skills, we now have a solution as this image demonstrates.  The image on...]]></description>
			<content:encoded><![CDATA[<p>Some time ago I <a href="http://blog.durdle.com/archives/2008/09/03/sony-vaio-z-disabled-vt-virtualization-technology/">posted at length</a> about Sony&#8217;s decision to disable the Virtualization Technology features of the Intel chips in their high-end laptops, namely my Vaio Z11.</p>
<p><a href="http://farm4.static.flickr.com/3540/3771017933_8a5aa31648.jpg" rel="lightbox[715]"><img src="http://farm4.static.flickr.com/3540/3771017933_8a5aa31648_s.jpg" alt="VT enabled" title="VT enabled" width="75" height="75" class="alignleft size-thumbnail wp-image-717" /></a> Well thanks to the sterling efforts of <a href="http://feature-enable.blogspot.com/2009/07/enable-vt-on-insydeh2o-based-sony-vaio.html">one man</a> and his EFI hacking skills, we now have a solution as this image demonstrates.  The image on the left shows the result of the VMWare Virtualization Technology test CD confirming that VT is now enabled on my Vaio Z11.</p>
<p>I&#8217;ve mirrored his code and instructions here in case his site disappears, read more after the jump&#8230;</p>
<p><span id="more-715"></span></p>
<p>Download <a href="http://blog.durdle.com/wp-content/uploads/2009/07/BOOTX64.EFI">this EFI application</a> and put it on a FAT32 formatted USB stick in the <strong>\EFI\BOOT</strong> directory.</p>
<p>Boot from the USB stick.  When this USB stick is plugged in to your laptop it will boot from it regardless of your settings to deny booting from external devices.</p>
<p>If all goes well you will see the following message:</p>
<pre>> Welcome to GRUB!
>
> Entering rescue mode...
> error: file not found
> grub rescue></pre>
<p>At this prompt, type:</p>
<pre>setup_var</pre>
<p><a href="http://farm3.static.flickr.com/2588/3770999329_13660eb7c9.jpg" rel="lightbox[715]"><img src="http://farm3.static.flickr.com/2588/3770999329_13660eb7c9_s.jpg" alt="GUID match" title="GUID match" width="75" height="75" class="alignleft size-thumbnail wp-image-717" /></a>
<p>You&#8217;ll be informed of the risks but most importantly you should see confirmation that the tool has found the correct setup variable.  You want to see the message say &#8220;the GUID should match the expected GUID&#8221;.  If it does not don&#8217;t continue &#8211; visit the site of the author and let him know.</p>
<p>Since this definitely works on a Vaio Z11, you should have got this far and can now look at the current setting of the VT offset which is at <b>0&#215;1af</b>.  Type:</p>
<pre>setup_var 0x1af</pre>
<p>Verify that the variable is set to <b>0&#215;00</b>.  If it is not, do not continue.</p>
<p>Assuming that the variable is as expected, we&#8217;ll change the setting, locking VT for your processor to ON:</p>
<pre>setup_var 0x1af 0x1</pre>
<p>You can verify that this change has been accepted by typing:</p>
<pre>setup_var 0x1af</pre>
<p>And confirming that the output is now <b>0&#215;01</b>.</p>
<p><a href="http://farm4.static.flickr.com/3520/3771832114_ae54dca28f.jpg" rel="lightbox[715]"><img src="http://farm4.static.flickr.com/3520/3771832114_ae54dca28f_s.jpg" alt="SecurAble confirms" title="SecurAble confirms" width="75" height="75" class="alignleft size-thumbnail wp-image-717" /></a>
<p>That&#8217;s it!  Hit CTRL-ALT-DEL and remove the USB stick.  You can now check that VT is enabled using whichever tool you prefer.  I confirmed mine from a VMWare boot CD and also within Windows using <a href="http://www.grc.com/securable.htm">Steve Gibson&#8217;s SecurAble</a> tool.</p>
]]></content:encoded>
			<wfw:commentRss>http://durdle.com/archives/2009/07/30/enable-vt-on-sony-vaio-z11/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Java Update 13 breaks Cisco SDM 2.5</title>
		<link>http://durdle.com/archives/2009/04/22/java-update-13-breaks-cisco-sdm-25/</link>
		<comments>http://durdle.com/archives/2009/04/22/java-update-13-breaks-cisco-sdm-25/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 09:24:50 +0000</pubDate>
		<dc:creator>Howard</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://blog.durdle.com/?p=432</guid>
		<description><![CDATA[Another post in a series designed to help Future-Howard work out why things have broken.
If you install Java 6 Update 13 and then try and log into Cisco SDM 2.5 it will fail.  The SDM console will not load.
I found I had to go back to Java 6 Update 6 (available at the Java...]]></description>
			<content:encoded><![CDATA[<p>Another post in a series designed to help Future-Howard work out why things have broken.</p>
<p>If you install Java 6 Update 13 and then try and log into Cisco SDM 2.5 it will fail.  The SDM console will not load.</p>
<p>I found I had to go back to Java 6 Update 6 (available at the <a href="http://java.sun.com/products/archive/j2se/6u6/index.html">Java archive page</a>, or <a href="http://cds-esd.sun.com/ESD41/JSCDL/jdk/6u6/jre-6u6-windows-i586-p.exe?AuthParam=1240392304_c9e1fea007eb4de38eb1009830507b8c&#038;TicketId=B%2Fw3nBqGTltPSxFDOlNekgfm&#038;GroupName=CDS&#038;FilePath=/ESD41/JSCDL/jdk/6u6/jre-6u6-windows-i586-p.exe&#038;File=jre-6u6-windows-i586-p.exe">direct download</a>.).</p>
<p>With that the Cisco SDM started working again.  I&#8217;ve not found anything about this on the Cisco site.</p>
]]></content:encoded>
			<wfw:commentRss>http://durdle.com/archives/2009/04/22/java-update-13-breaks-cisco-sdm-25/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Calendar for TV</title>
		<link>http://durdle.com/archives/2009/03/11/calendar-for-tv/</link>
		<comments>http://durdle.com/archives/2009/03/11/calendar-for-tv/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 07:25:51 +0000</pubDate>
		<dc:creator>Howard</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.durdle.com/?p=421</guid>
		<description><![CDATA[Because it is outstanding, and because they asked for people to link to them, it&#8217;s time to mention the Calendar for TV.  Your one stop shop for knowing what is airing and when &#8211; even taking into account time zones.  As someone who watches a lot of American TV, this is excellent for keeping track...]]></description>
			<content:encoded><![CDATA[<p>Because it is outstanding, and because they asked for people to link to them, it&#8217;s time to mention the <a href="http://www.pogdesign.co.uk/cat/">Calendar for TV</a>.  Your one stop shop for knowing what is airing and when &#8211; even taking into account time zones.  As someone who watches a lot of American TV, this is excellent for keeping track of their sometimes erratic airing schedule.  I&#8217;ve created an account which allows me to select only the TV shows I&#8217;m interested in.</p>
]]></content:encoded>
			<wfw:commentRss>http://durdle.com/archives/2009/03/11/calendar-for-tv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bad Bell Wire!</title>
		<link>http://durdle.com/archives/2009/03/10/bad-bell-wire/</link>
		<comments>http://durdle.com/archives/2009/03/10/bad-bell-wire/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 20:45:47 +0000</pubDate>
		<dc:creator>Howard</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://blog.durdle.com/?p=426</guid>
		<description><![CDATA[It&#8217;s one of those &#8220;why didn&#8217;t I think of that before?!&#8221; moments.  BT are selling a device called the iPlate at the moment claiming that for 7 out of 10 people it will increase their DSL speed by filtering out the noise from the bell wire in your master socket.  By all accounts it does...]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s one of those &#8220;why didn&#8217;t I think of that before?!&#8221; moments.  BT are selling a device called the <a title="iPlate at BT Shop" href="http://www.shop.bt.com/ProductView.aspx?Quicklinx=58LT&amp;InMerch=1" target="_blank">iPlate</a> at the moment claiming that for 7 out of 10 people it will increase their DSL speed by filtering out the noise from the bell wire in your master socket.  By all accounts it does exactly what they describe.   I only bothered looking this up today after hearing about it a few weeks ago, and it occurred to me: if the bell wire is the offender here, why not just disconnect it from my wiring altogether?  It&#8217;s not as if I have any clunky analogue phones that will suddenly cease ringing.  In fact, I use my BT line purely for DSL anyway, who cares if the phones don&#8217;t ring!<span id="more-426"></span></p>
<p>So, I opened up my master socket and disconnected the wire at pin 3 &#8211; the bell wire.  Plugged it all back in and found an immediate speed boost of approximately 2Mb.  I fully expect this to increase as my ISP (<a title="Be Broadband" href="https://www.bethere.co.uk/" target="_blank">Be Unlimited</a>) rate up their equipment to match my now far less lossy line.</p>
<p>If you&#8217;re handy with a screwdriver and don&#8217;t much care about the rules about messing with BT&#8217;s sockets it could well be worth your while pulling the wire out of pin 3.  And if you&#8217;re a bit scared of that and you have the right master socket, <a title="BroadbandBuyer" href="http://www.broadbandbuyer.co.uk/" target="_blank">BroadbandBuyer</a> can ship you an <a title="BT iPlate at BroadbandBuyer" href="http://www.broadbandbuyer.co.uk/Shop/ShopDetail.asp?ProductID=7256" target="_blank">iPlate</a> for less than BT charge, and they actually have them in stock!</p>
<p>Unsurprisingly, this is old news for <a title="Broadband and Bellwire" href="http://www.jarviser.co.uk/jarviser/broadbandspeed.html" target="_blank">some people</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://durdle.com/archives/2009/03/10/bad-bell-wire/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
