<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>The BFC Computing Weblog</title>
    <link>http://blog.bfccomputing.com</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>My God, It's Full of Source!</description>
    <item>
      <title>Rescuing a Broken pfSense Install</title>
      <description>They don't make flash drives like they used to.  I've seen several pfSense installs fail recently due to drives flaking out and the wear-leveling  not working as advertised.
&lt;br&gt;&lt;br&gt;
Of course, you make regular backups of your config file, but in case you forgot, we can probably rescue your config file off of a disk image.  Re-installing pfSense doesn't take too long, but rebuilding a working config file can take many hours, so rescuing is preferential.
&lt;br&gt;&lt;br&gt;
This script has worked for me with dozens of file versions, but one can imagine scenarios with fragmented files where it would fail.  There's nothing fancy going on here (this was hacked up with a client standing in my office with a broken pfSense box), but it might prove useful in a pinch.
&lt;br&gt;&lt;br&gt;
&lt;code&gt;&lt;pre&gt;
#!/usr/bin/perl -w
use strict;
use warnings FATAL=&gt;'all';

=comment
pfsense_extract.pl - extract pfSense configs from an input stream
(c) 2010 BFC Computing, LLC.  Licensed under the same terms as pfSense.

This is useful for taking an image file of a damaged pfSense install
and pulling out config files.  If you can mount the image normally, you
should do that first.

Due to the nature of the filesystem, there are often many copies of a 
config file in a disk image, from each time it was saved.  You will 
find a bunch of output files named: pfsense-config-1.xml, pfsense-config-2.xml,
etc.  You can then use tools like diff to find out which the right one was.

Example: 
   dd if=/dev/sdg of=broken_pfsense_image.dd bs=2M conv=sync,noerror
   strings broken_pfsense_image.dd | perl pfsense_extract.pl

Processing a 1GB image as per the example takes about 20 seconds on a standard 
2GHz desktop machine.
=cut

my $BASENAME='pfsense-config-X.xml';
my $counter = 0;
my ($outfile);
my $do_output = 0;

while (&lt;&gt;) {

    chomp;

    if ($_ eq '&amp;lt;pfsense&amp;gt;') {
	$counter++;
	my $filename = $BASENAME;
	$filename =~ s/X/$counter/;
	open($outfile,"&gt;$filename");
	$do_output = 1;
    }

    if ($do_output) {
	print $outfile $_ . "\n";
    }

    if ($_ eq '&amp;lt;/pfsense&amp;gt;') {
	close $outfile;
	$do_output = 0;
    }
    
}
&lt;/pre&gt;
&lt;/code&gt;

</description>
      <pubDate>Wed, 03 Mar 2010 13:54:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:6e218b5b-04c0-49be-b453-9854f613bff4</guid>
      <author>Bill McGonigle</author>
      <link>http://blog.bfccomputing.com/articles/2010/03/03/rescuing-a-broken-pfsense-install</link>
      <category>BFC Computing</category>
      <category>Development</category>
      <category>Open Source</category>
      <trackback:ping>http://blog.bfccomputing.com/articles/trackback/4811</trackback:ping>
    </item>
    <item>
      <title>Dual Screen vs. MythTV vs. Mouse Focus</title>
      <description>&lt;p&gt;There's a problem when running two X-displays with MythTV - some events on the non-Myth screen will steal focus and then the MythTV controls will no longer respond.  &lt;a href="http://ubuntuforums.org/showthread.php?t=191313"&gt;This thread&lt;/a&gt; describes the problem well, but is now closed for comments.&lt;/p&gt;

&lt;p&gt;Since then, &lt;a href="http://digamma.cs.unm.edu/trac.dmohr/wiki/DualscreenMouseUtils"&gt;mouse-switchscreen&lt;/a&gt; has been written, and solves the problem correctly.  It's possible to bind the program to a hotkey.&lt;/p&gt;

&lt;p&gt;In the end, I found it better to just run one display at a time since I couldn't prevent the focus stealing.&lt;/p&gt;</description>
      <pubDate>Thu, 24 Sep 2009 00:35:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:d3a31e1a-336c-4995-9cbc-fd83e43afdf1</guid>
      <author>Bill McGonigle</author>
      <link>http://blog.bfccomputing.com/articles/2009/09/24/dual-screen-vs-mythtv-vs-mouse-focus</link>
      <category>Hardware</category>
      <category>Open Source</category>
      <category>Linux</category>
      <trackback:ping>http://blog.bfccomputing.com/articles/trackback/4810</trackback:ping>
    </item>
    <item>
      <title>Converting a Windows Vista KVM Virtual Machine to Redhat VirtIO Drivers</title>
      <description>&lt;p&gt;Redhat recently released a set of virtualized I/O devices for KVM, the kernel virtual machine.  This short post will outline a method of converting a Windows Vista install (on KVM) to the new drivers using Virt-Manager.  It has been tested on Fedora 11.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Make sure Vista VM is up to date on patches and the disk is error free.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Download drivers from Redhat network or &lt;a href="http://www.linux-kvm.com/sites/default/files/virtio-setup-200908.iso"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mount the .iso file as a CD-ROM device.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now you might think you can use the &amp;#8216;Add Hardware Wizard&amp;#8217; here and add the drivers, add the hardware, and be good.  I did.  I wound up with an unbootable disk.  Apparently Vista&amp;#8217;s autodetection is required in this process.  So&amp;#8230;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Add a new network device of type &amp;#8216;virtio&amp;#8217;.  Vista will do its &amp;#8220;you&amp;#8217;ve got hardware&amp;#8221; routine and run you through all of its wizards.  When it asks you for drivers, point it at the i386/2008 directory on the driver disc image.  Yes, Yes, OK, Yes, Really, Continue, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Shutdown the VM and remove the old ethernet controller.  Boot up Vista and make sure the network works.  You can conceivably skip this step for now if you want to make troubleshooting harder.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add a new Storage controller.  Leave the existing one as-is for now.  You&amp;#8217;ll have to pick a disk image you&amp;#8217;re not using right now, or make a new one.  Anything is fine, we&amp;#8217;re not going to ever use it inside Vista.  Do the driver dance again.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Shutdown Windows.  Remove the storage controllers, and add a new one, type &amp;#8216;virtio&amp;#8217;, with your normal hard drive image.  Take care of the old ethernet controller here too, if you ignored my previous advice.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Boot Windows normally.  It should now be coming up on VirtIO disk and network drivers.  If you get a bluescreen or a plea to use the RepairCD, something went wrong.  Use the repair CD to restore to a previous restore-point and try again.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If anybody knows where to find a sound driver, please leave a comment!&lt;/p&gt;</description>
      <pubDate>Mon, 14 Sep 2009 16:23:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:d5d1e89b-6320-4a01-9288-55d7864309c2</guid>
      <author>Bill McGonigle</author>
      <link>http://blog.bfccomputing.com/articles/2009/09/14/converting-a-windows-vista-kvm-virtual-machine-to-redhat-virtio-drivers</link>
      <category>Hardware</category>
      <category>Open Source</category>
      <category>Linux</category>
      <trackback:ping>http://blog.bfccomputing.com/articles/trackback/4809</trackback:ping>
    </item>
    <item>
      <title>Firefox Crashes on Fedora 11</title>
      <description>&lt;p&gt;For folks who are running the current development, or soon-to-be-just-released Fedora 11, you might find Firefox to be very crashy.  It's not because it's the semi-controversial 3.5b4 version (which is excellent), it's because of a buggy library.&lt;/p&gt;

&lt;p&gt;I'm running it with the Tree Style Tab and NoScript extensions, and can get a crash half the time when Session Restore is running, and almost all the time when I allow a site in NoScript.&lt;/p&gt;

&lt;p&gt;If you run firefox from the console, so you get the debug messages, you'll see:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cairo-ft-font.c:554: _cairo_ft_unscaled_font_lock_face: Assertion `!unscaled-&gt;from_face' failed &lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;when the crash happens.  I tracked this down through the Mozilla and Freedesktop bug systems to a problem with the Cairo graphics engine improperly disposing of fonts which it didn't own, for which a fix was incorporated last December.  However, the version of Cairo shipping in Fedora 11 is older than that.&lt;/p&gt;

&lt;p&gt;So, I applied the simple patch, fixed up the .spec, and put up some new &lt;a href="http://swdist.bfccomputing.com/f11-i386-bfc/i386/os/"&gt;RPM's&lt;/a&gt; for i386 and an &lt;a href="http://swdist.bfccomputing.com/f11-i386-bfc/source/SRPMS/cairo-1.8.6-3.fc11.src.rpm"&gt;SRPM&lt;/a&gt; for hackers and x86_64 users to build (&lt;code&gt;rpmbuild --rebuild cairo-1.8.6-3.fc11.src.rpm&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;I haven't tried cross-compiling from i386 to x86_64 before, and --target=x86_64 doesn't work, so if anybody can tell me how to do that short of learning mock, please leave a comment and I'll put up RPM's for that too.&lt;/p&gt;

&lt;p&gt;The Redhat bug is &lt;a href="https://bugzilla.redhat.com/show_bug.cgi?id=502274"&gt;here&lt;/a&gt;.  Hopefully it gets accepted soon.&lt;/p&gt;</description>
      <pubDate>Thu, 28 May 2009 21:38:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:44cceb84-195c-4ba4-ac74-7506a71d4266</guid>
      <author>Bill McGonigle</author>
      <link>http://blog.bfccomputing.com/articles/2009/05/28/firefox-crashes-on-fedora-11</link>
      <category>Web</category>
      <category>Internet</category>
      <category>Open Source</category>
      <category>Linux</category>
      <trackback:ping>http://blog.bfccomputing.com/articles/trackback/4808</trackback:ping>
    </item>
    <item>
      <title>Quiet Rackmount Server w/ Lots of Storage</title>
      <description>&lt;p&gt;I recently had the power supply fail on my SOHO server, which was a mongrel of old parts, far too many USB cables, and was pretty darn slow.  It was also very expensive to run, having a Pentium IV in it, the worst of Intel's line.&lt;/p&gt;

&lt;p&gt;My goals for a new server were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;quiet&lt;/li&gt;
&lt;li&gt;energy efficient&lt;/li&gt;
&lt;li&gt;virtualization support&lt;/li&gt;
&lt;li&gt;lots of storage&lt;/li&gt;
&lt;li&gt;easy to take backups offsite&lt;/li&gt;
&lt;li&gt;rackmount&lt;/li&gt;
&lt;li&gt;budget-friendly.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After poking around NewEgg for a while (I think I enjoy shopping there a bit too much) I came up with a list of parts (after reading many of the helpful reviews), and I have to say I couldn't be happier with the system.&lt;/p&gt;

&lt;p&gt;It's almost inaudible, runs at about 105W under normal load, has seven hard drives in it, of various capacities, fits in my rack, has a hot-swap drive for off-site backups, and runs Fedora 10 like a charm.  The case is especially nice to work inside, and is of higher quality than you'd expect for the price.&lt;/p&gt;

&lt;p&gt;I'm acually using the 2.66GHz version of the Core2Duo, but they don't seem to make that anymore - 3.0GHz seems to be the low-end.  It's worth noting here that most of the commercial server builders try to force you into the Xeon line with a rackmount server and those are both more expensive and more power hungry than the Core2Duo and Core2Quad lines.  Get what you really need, keeping in mind that virtualizing multiple systems onto one is a huge energy win.&lt;/p&gt;

&lt;p&gt;Additionally, I got a &lt;a href="http://www.bestbuy.com/site/olspage.jsp?skuId=8926139&amp;amp;st=cpu+cooler&amp;amp;lp=8&amp;amp;type=product&amp;amp;cp=1&amp;amp;id=1214611632685"&gt;cooler&lt;/a&gt; from BestBuy (surprisingly their in-stock cooler is the nicest I've found) and used &lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16835100008"&gt;Arctic Silver 5&lt;/a&gt; thermal compound to bond the CPU.  Plus a bunch of SATA cables I have in a box (they seem to spontaneously generate in there).  The whole package comes in under $1200 even if you have to buy every part.  Compare at fifty percent more to purchase pre-assembled.&lt;/p&gt;

&lt;p&gt;Here's the parts list:&lt;/p&gt;

&lt;ul&gt;&lt;li style="padding: 1px;"&gt;1&amp;nbsp;x&amp;nbsp;&lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16811182566" title="ARK 4U-500-CA Black 4U Rackmount Case - Retail" target="_blank"&gt;ARK 4U-500-CA Black 4U Rackmount Case - Retail&lt;/a&gt;&lt;/li&gt;&lt;li style="padding: 1px;"&gt;4&amp;nbsp;x&amp;nbsp;&lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16812198015" title="Athena Power 6&amp;quot; SATA II Y cable Model CABLE-YSATA290 - Retail" target="_blank"&gt;Athena Power 6" SATA II Y cable Model CABLE-YSATA290 - Retail&lt;/a&gt;&lt;/li&gt;&lt;li style="padding: 1px;"&gt;1&amp;nbsp;x&amp;nbsp;&lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16813131348" title="ASUS P5N7A-VM LGA 775 NVIDIA GeForce 9300/nForce 730i HDMI Micro ATX Intel Motherboard - Retail" target="_blank"&gt;ASUS P5N7A-VM LGA 775 NVIDIA GeForce 9300/nForce 730i HDMI Micro ATX Intel Motherboard - Retail&lt;/a&gt;&lt;/li&gt;&lt;li style="padding: 1px;"&gt;1&amp;nbsp;x&amp;nbsp;&lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16817182159" title="Rosewill RG430-2 430W 80Plus Certified,ATX12V v2.3/EPS12V v2.91, Active-PFC Power Supply, UL,FCC,CE,TUV,ROHS - Retail" target="_blank"&gt;Rosewill RG430-2 430W 80Plus Certified,ATX12V v2.3/EPS12V v2.91, Active-PFC Power Supply, UL,FCC,CE,TUV,ROHS - Retail&lt;/a&gt;&lt;/li&gt;&lt;li style="padding: 1px;"&gt;1&amp;nbsp;x&amp;nbsp;&lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16817994062" title="ICY DOCK MB671SK-BB Tray-less 3.5&amp;quot; SATA I &amp;amp; II Mobile Rack Removable Hard Drive Kit - Retail" target="_blank"&gt;ICY DOCK MB671SK-BB Tray-less 3.5" SATA I &amp;amp; II Mobile Rack Removable Hard Drive Kit - Retail&lt;/a&gt;&lt;/li&gt;&lt;li style="padding: 1px;"&gt;1&amp;nbsp;x&amp;nbsp;&lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16819115037" title=" Intel Core 2 Duo E8400 Wolfdale 3.0GHz 6MB L2 Cache LGA 775 65W Dual-Core Processor - Retail " target="_blank"&gt; Intel Core 2 Duo E8400 Wolfdale 3.0GHz 6MB L2 Cache LGA 775 65W Dual-Core Processor - Retail&lt;/a&gt;&lt;/li&gt;&lt;li style="padding: 1px;"&gt;2&amp;nbsp;x&amp;nbsp;&lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16820134582" title="Kingston 4GB (2 x 2GB) 240-Pin DDR2 SDRAM DDR2 800 (PC2 6400) Dual Channel Kit Desktop Memory Model KVR800D2N5K2/4G - Retail" target="_blank"&gt;Kingston 4GB (2 x 2GB) 240-Pin DDR2 SDRAM DDR2 800 (PC2 6400) Dual Channel Kit Desktop Memory Model KVR800D2N5K2/4G - Retail&lt;/a&gt;&lt;/li&gt;&lt;li style="padding: 1px;"&gt;4&amp;nbsp;x&amp;nbsp;&lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16822148337" title="Seagate Barracuda 7200.11 ST31500341AS 1.5TB 7200 RPM SATA 3.0Gb/s 3.5&amp;quot; Internal Hard Drive (bare drive) - OEM" target="_blank"&gt;Seagate Barracuda 7200.11 ST31500341AS 1.5TB 7200 RPM SATA 3.0Gb/s 3.5" Internal Hard Drive (bare drive) - OEM&lt;/a&gt;&lt;/li&gt;&lt;li style="padding: 1px;"&gt;2&amp;nbsp;x&amp;nbsp;&lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16835150053" title="MASSCOOL FD08025B1M3/4 80mm Case Fan - Retail" target="_blank"&gt;MASSCOOL FD08025B1M3/4 80mm Case Fan - Retail&lt;/a&gt;&lt;/li&gt;&lt;li style="padding: 1px;"&gt;1&amp;nbsp;x&amp;nbsp;&lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16835209005" title="Antec 761345-75120-9 120mm Case Fan - Retail" target="_blank"&gt;Antec 761345-75120-9 120mm Case Fan - Retail&lt;/a&gt;&lt;/li&gt;
&lt;li style="padding: 1px;"&gt;1&amp;nbsp;x&amp;nbsp;&lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16820223103" title="Rosewill RCR-IC001 40-in-1 USB 2.0 3.5&amp;quot; Internal Card Reader w/ USB port / Extra silver face plate - Retail" target="_blank"&gt;Rosewill RCR-IC001 40-in-1 USB 2.0 3.5" Internal Card Reader w/ USB port / Extra silver face plate - Retail&lt;/a&gt;&lt;/li&gt;&lt;li style="padding: 1px;"&gt;1&amp;nbsp;x&amp;nbsp;&lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16827136153" title="LG 22X DVD&#177;R DVD Burner with LightScribe Black SATA Model GH22LS30 - OEM" target="_blank"&gt;LG 22X DVD&#177;R DVD Burner with LightScribe Black SATA Model GH22LS30 - OEM&lt;/a&gt;&lt;/li&gt;&lt;li style="padding: 1px;"&gt;1&#160;x&#160;&lt;a target="_blank" title="SYBA SD-SA2PEX-2IR PCI Express SATA II Controller Card - Retail" href="http://www.newegg.com/Product/Product.aspx?Item=N82E16815124027"&gt;SYBA SD-SA2PEX-2IR PCI Express SATA II Controller Card - Retail&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The secondary SATA controller is only needed if you're going over the number of drives the motherboard supports, and likewise the power splitters.  If you were buying all new 1.5TB drives you'd likely not need this.  Obviously the memory card reader is only if you need it.  But who wants a floppy drive anymore?&lt;/p&gt;

&lt;p&gt;Happy building!&lt;/p&gt;</description>
      <pubDate>Wed, 20 May 2009 16:43:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:b7c53ccc-8e12-4074-96ab-891dac05bac8</guid>
      <author>Bill McGonigle</author>
      <link>http://blog.bfccomputing.com/articles/2009/05/20/quiet-rackmount-server-w-lots-of-storage</link>
      <category>Hardware</category>
      <category>Business</category>
      <category>BFC Computing</category>
      <trackback:ping>http://blog.bfccomputing.com/articles/trackback/4807</trackback:ping>
    </item>
    <item>
      <title>Reducing Spam with SMTP Validation on Postfix</title>
      <description>&lt;p&gt;This is a neat enhancement to postfix for reducing spam by attacking its economics: making sure it speaks SMTP properly.&lt;/p&gt;

&lt;p&gt;A spammer gets paid by the message delivered. So, it's in his interest to flood them out as quickly as possible.  Because of this, they rarely implement mailers which negotiate the SMTP connection politely - they simply open the TCP connection and start sending.&lt;/p&gt;

&lt;p&gt;When an SMTP client doesn't respect the proper-back-and forth postfix expects, it'll flag it as unauthorized 'pipelining' - for example when multiple messages are sent in succession, but which would otherwise be OK.&lt;/p&gt;

&lt;p&gt;We can take advantage of this by forcing the issue, and increasing the odds a spammer will make this mistake by waiting just a second between establishing the TCP connection and telling the spammer we're ready to take mail.  A loaded mail server may behave this way anyway, so it's not outside the norm and the resource consumption is minimal, but it attacks the economics of spamming.&lt;/p&gt;

&lt;p&gt;In your main.cf file, you would add to &lt;code&gt;smtpd_client_restrictions&lt;/code&gt; something like this:&lt;/p&gt;

&lt;pre&gt;
&lt;code&gt;smtpd_client_restrictions =
        permit_sasl_authenticated,
        permit_mynetworks,
        check_client_access hash:/etc/postfix/access-client,
        sleep 1,
        reject_unauth_pipelining
&lt;/code&gt;
&lt;/pre&gt;

&lt;p&gt;We accept all of our own users' connections (interactive ones, perhaps) right away, and if the sender is totally unknown to us, we wait for just a second.  Then we reject any unauthorized pipelining.  The log will show something like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;May  6 10:49:00 mailhub postfix/smtpd[8965]: NOQUEUE: reject: RCPT from unknown[10.1.2.3]: 403 4.5.0 &lt;a href="&amp;#109;&amp;#097;&amp;#x69;&amp;#x6C;&amp;#x74;&amp;#x6F;:&amp;#115;&amp;#112;&amp;#x61;&amp;#x6D;t&amp;#097;&amp;#x72;&amp;#x67;&amp;#101;&amp;#116;&amp;#064;&amp;#101;&amp;#x78;&amp;#097;&amp;#x6D;&amp;#x70;&amp;#x6C;e&amp;#x2E;&amp;#099;&amp;#x6F;m"&gt;&amp;#115;&amp;#112;&amp;#x61;&amp;#x6D;t&amp;#097;&amp;#x72;&amp;#x67;&amp;#101;&amp;#116;&amp;#064;&amp;#101;&amp;#x78;&amp;#097;&amp;#x6D;&amp;#x70;&amp;#x6C;e&amp;#x2E;&amp;#099;&amp;#x6F;m&lt;/a&gt;: Recipient address rejected: Improper use of SMTP command pipelining&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;when the spammer attempts to just send.&lt;/p&gt;

&lt;p&gt;It's worth noting that this method may not scale to very large installations, as those one second delays may be too much.  But for the average-sized postfix install, it can make yet another dent in the spam deluge.  Where it does consume 'too many' resources, one must weight the cost of computing resources vs. the time cost of dealing with yet another spam.&lt;/p&gt;</description>
      <pubDate>Wed, 06 May 2009 10:50:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:8d2b1675-60f9-473c-b48a-9b9d317add3d</guid>
      <author>Bill McGonigle</author>
      <link>http://blog.bfccomputing.com/articles/2009/05/06/reducing-spam-with-smtp-validation-on-postfix</link>
      <category>Internet</category>
      <category>Open Source</category>
      <category>Security</category>
      <trackback:ping>http://blog.bfccomputing.com/articles/trackback/4806</trackback:ping>
    </item>
    <item>
      <title>Mac OS X Keychain Export Tool</title>
      <description>&lt;p&gt;A Mac user might want to export his Keychain passwords and notes for several reasons - using a third-party password manager on Mac OS X, creating a time-resistant backup of passwords, printouts of passwords for the safe-deposit box or attorney, or switching to another operating system.&lt;/p&gt;

&lt;p&gt;There's no easy way to do this.  Keychain Access only allows you to export certificates, and Apple recommends backing up the Keychain database files, which accomplishes none of the above goals and promotes lock-in.&lt;/p&gt;

&lt;p&gt;The keychain code is itself open source, but I couldn't find it compiled for another platform anywhere.  I assume that enough of the OSX toolchain is required to make this infeasible, though likely not impossible.  Still, it's not there.&lt;/p&gt;

&lt;p&gt;Fortunately, I ran across an Applescript that uses Keychain Scripting to create a text file from a user's login Keychain.  Unfortunately, it didn't do a bunch of things I thought were required for moving my passwords to a Linux machine, so here's the delta:&lt;/p&gt;

&lt;p&gt;version 2009030201: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;handle all keychains&lt;/li&gt;
&lt;li&gt;handle all key types&lt;/li&gt;
&lt;li&gt;handle comments and descriptions&lt;/li&gt;
&lt;li&gt;handle errors&lt;/li&gt;
&lt;li&gt;trim dangling whitespace&lt;/li&gt;
&lt;li&gt;write to tab delimited format&lt;/li&gt;
&lt;li&gt;unlock all keychains first, so the mad tapping won't hit 'cancel'&lt;/li&gt;
&lt;li&gt;add username to filename&lt;/li&gt;
&lt;li&gt;replace carriage returns/newlines in text fields with spaces&lt;/li&gt;
&lt;li&gt;use unix line endings in output file&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and some general code cleanup.  I'm assuming the sample code is in the public domain and releasing this version under GPLv2+.  Please improve this and comment here when you do or send changes back.  If you own the original code and feel this is improperly licensed, let me know ASAP.&lt;/p&gt;

&lt;p&gt;I've run this out of Script Editor - the advantage there is it's easy; the disadvantage is double-confirming every keychain access, one for Script Editor, one for Keychain Scripting.  Terribly time consuming.  I suspect if you compile this it'll eliminate the first half.&lt;/p&gt;

&lt;p&gt;I've set this to open all the keychains first.  Otherwise when hitting "allow, allow, allow" you might hit 'cancel' if it asks to unlock a keychain.  If your keychain is big enough you might not get through the whole thing before the keychain unlock times out, so be careful.&lt;/p&gt;

&lt;p&gt;Your minutes of tapping on the mouse button like a human waiting for a treat will be rewarded with a ~/Desktop/Passwords-yourusername file.  It'll be easy to then process with other scripts, importable into databases or spreadsheets for further manipulation.  I'll leave it up to you to be smart and not leave this password file sitting around in some unencrypted/unprotected location for any longer than absolutely necessary.  If it gets stolen you're probably up a creek, right?  So, be careful, only aim at what you intend to kill.&lt;/p&gt;

&lt;p&gt;Download &lt;a href="/files/KeychainExport.scpt"&gt;KeychainExport&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Mon, 02 Mar 2009 23:34:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:83d47a5b-6947-4b1c-915e-4afed6fd261d</guid>
      <author>Bill McGonigle</author>
      <link>http://blog.bfccomputing.com/articles/2009/03/02/mac-os-x-keychain-export-tool</link>
      <category>BFC Computing</category>
      <category>Development</category>
      <category>Open Source</category>
      <category>Security</category>
      <category>Mac</category>
      <trackback:ping>http://blog.bfccomputing.com/articles/trackback/4805</trackback:ping>
    </item>
    <item>
      <title>Portable Computer States</title>
      <description>&lt;p&gt;Here's a technology idea:  combine a solid-state flash drive, a synchronization engine, advanced virtual memory techniques, and a portable hardware abstraction layer to create a portable computer state device.&lt;/p&gt;

&lt;p&gt;The idea would be like this:  you have a small hardware device that you bring with your anywhere.  When you plug it into one of your computers, it would synchronize the filesystem states, restore memory images, and resume your computing environment the way you left it at the last location.&lt;/p&gt;

&lt;p&gt;It's roughly equivalent to the idea of network computers, except you don't need the ubiquitous ultra-high-speed Internet that doesn't really exist (when wireless gigabit is pervasive, this would become passe).&lt;/p&gt;

&lt;p&gt;Current reasons this can't work, using linux as the obvious OS to start with, include the lack of an abstract HAL (root drive, home drive, etc) and the lack of virtual-memory restore on a per-process basis.  Lots of the other parts exist already.&lt;/p&gt;

&lt;p&gt;Initial limitations would probably be a restriction to the same hardware architecture (x86, AMD64, ARM, etc), inability to deal with filesystem changes greater than the capacity of the SSD, and an inability to restore stateful network connections (an IP proxy might work around the last one).&lt;/p&gt;

&lt;p&gt;One company has made an approach at this experience by running the environment directly on the portable device, but this forfeits local resources and demands power draws unachievable on an external bus (for simple connectivity).  That approach may gain viability over time, though, but not yet.&lt;/p&gt;

&lt;p&gt;Would you, gentle reader, use such a device?&lt;/p&gt;</description>
      <pubDate>Tue, 17 Feb 2009 12:15:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:4ec5f82f-b5c8-4ba5-80f8-cb045cabcef1</guid>
      <author>Bill McGonigle</author>
      <link>http://blog.bfccomputing.com/articles/2009/02/17/portable-computer-states</link>
      <category>Hardware</category>
      <category>Development</category>
      <category>Open Source</category>
      <category>Linux</category>
      <trackback:ping>http://blog.bfccomputing.com/articles/trackback/4804</trackback:ping>
    </item>
    <item>
      <title>Preventing Streaming Video Freezes with TCP Buffer Size Adjustments</title>
      <description>&lt;p&gt;I've been using streaming video solutions more, since we pared back our satellite TV package at home and have been saving the Netflix allotment for the kids.&lt;/p&gt;

&lt;p&gt;But streaming performance has been lacking for me.  I've frequently experienced [buffering] and [recalculating bandwidth] messages, and having streams just stop dead and freeze up.&lt;/p&gt;

&lt;p&gt;I wondered if Comcast might be playing games, since they have a history of doing so and this competes with one of their other products, so I decided to check out &lt;a href="http://measurementlab.net/"&gt;Google's tools&lt;/a&gt; that measure this possibility. Comcast is clean.&lt;/p&gt;

&lt;p&gt;But the tools did help me find the actual cause: my TCP buffer receive size was set too low.  Their network diagnostic tool revealed that 80% of the time my system was responsible for causing the delay, and only 20% of the time was the network at fault.  After rejecting many forum suggestions I found as bizarre, I came across a decent O'Reilly article, which linked to an &lt;a href="http://fasterdata.es.net/TCP-tuning/MacOSX.html"&gt;LBNL site&lt;/a&gt; with this recommended setting (for Mac OS X):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
sysctl -w net.inet.tcp.win_scale_factor=8
sysctl -w kern.ipc.maxsockbuf=16777216
sysctl -w net.inet.tcp.sendspace=8388608
sysctl -w net.inet.tcp.recvspace=8388608
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This increases the send and receive buffers to 8MB each and adjusts the kernel ipc buffer to accommodate.  The first line is obsolete as of at least 10.4.11, which my video streaming system is on.&lt;/p&gt;

&lt;p&gt;The last three lines above are a good way to test, and for permanence, create a file, /etc/sysctl.conf , with just the parameters, like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
kern.ipc.maxsockbuf=16777216
net.inet.tcp.sendspace=8388608
net.inet.tcp.recvspace=8388608
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After setting that, my videos are all streaming without errors and the Google test shows that now the network is my delay 80% of the time and my client side none.&lt;/p&gt;

&lt;p&gt;Recent OSX (10.5.x) and Linux (2.6.17) have TCP buffer autotuning which might, in some cases, make the above unnecessary.  The Linux version only sets 4MB buffers, though, which may or may not be enough depending on your &lt;a href="http://en.wikipedia.org/wiki/Bandwidth-delay_product"&gt;bandwidth delay product&lt;/a&gt;.  Some experimentation may be in order, look up the proper variables for your kernel version, the above is only tested on xnu 8.11.1.&lt;/p&gt;</description>
      <pubDate>Mon, 16 Feb 2009 23:11:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:9a9a3aa3-c8ab-44ec-9793-3f1ba72ffdcb</guid>
      <author>Bill McGonigle</author>
      <link>http://blog.bfccomputing.com/articles/2009/02/16/preventing-streaming-video-freezes-with-tcp-buffer-size-adjustments</link>
      <category>Internet</category>
      <category>Mac</category>
      <category>entertainment</category>
      <trackback:ping>http://blog.bfccomputing.com/articles/trackback/4803</trackback:ping>
    </item>
    <item>
      <title>Intel BIOS ISO image with SATA CD-ROM Drive</title>
      <description>&lt;p&gt;Intel thoughtfully has some ISO images of their BIOS flash upgrades, so you don't need to worry about finding the right flash software for your operating system and then timidly hoping that all works OK.  You burn the image to a CD and reboot, then it flashes for you (using a &lt;a href="http://downloadcenter.intel.com/download.aspx?url=/9730/eng/FDOEMCD.source.zip&amp;amp;agr=N&amp;amp;ProductID=2063&amp;amp;DwnldId=9730&amp;amp;strOSs=All&amp;amp;OSFullName=All+Operating+Systems&amp;amp;lang=eng"&gt;FreeDOS/ISOLINUX&lt;/a&gt; system).&lt;/p&gt;

&lt;p&gt;However, if you have a SATA CD-ROM drive, the device driver in FreeDOS doesn't support that.  There is a SATA-compatible FreeDOS &lt;a href="http://marktsai0316.googlepages.com/gcdromfordos"&gt;driver&lt;/a&gt;, but rather than rebuild Intel's ISO, there's an easier solution - make the BIOS emulate an IDE drive.&lt;/p&gt;

&lt;p&gt;Go into BIOS Setup (F2 at boot), then Advanced ... Drive Configuration, and set 'Configure SATA as' to 'IDE' (mine was AHCI) and ATA/IDE Mode to 'Legacy'.&lt;/p&gt;

&lt;p&gt;Reboot, allow the flash to succeed, then switch your BIOS settings back.&lt;/p&gt;

&lt;p&gt;There's nothing wrong with this method, but Intel should highlight it on their download page.&lt;/p&gt;</description>
      <pubDate>Tue, 10 Feb 2009 00:22:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:d3aa7f07-4800-4dff-9b86-95a49f186b78</guid>
      <author>Bill McGonigle</author>
      <link>http://blog.bfccomputing.com/articles/2009/02/10/intel-bios-iso-image-with-sata-cd-rom-drive</link>
      <category>Hardware</category>
      <category>Open Source</category>
      <trackback:ping>http://blog.bfccomputing.com/articles/trackback/4802</trackback:ping>
    </item>
  </channel>
</rss>
