SpamAssassin: Whitelist your friends!

SpamAssassin is an invaluable tool for keeping spam out of your Inbox, but let’s face it, sometimes our friends look like spammers too.

Whether they forward junk mail with a real message on top that you *do* want to read, or if their outlook “stationary” screams of vintage blinking 1995ish internet, there’s two ways to solve this:

1) Get new friends

2) Whitelist them

Since canceling our friendships isn’t generally a good life-move, let’s whitelist them in SpamAssassin.

The first step is locating and opening your user prefs or configuration file.  If you’re the server administrator, and want the whitelist entries to be global, you’ll want to edit:

/etc/mail/spamassassin/local.cf

To edit the prefs for just a single user, you’ll want to look here:

~/.spamassassin/user_prefs

For each sender you want to to whitelist, add the following entry into the config or prefs file:

whitelist_from  user@domain.com

You can also whitelist every sender from an entire domain with the following entry:

whitelist_from  *@domain.com

For even more information and options, checkout the SpamAssassin doc page for whitelisting:

http://wiki.apache.org/spamassassin/ManualWhitelist

MapQuest: Free talking turn-by-turn directions for your iPhone

If you’re an iPhone user with friends on Android devices, you’ve probably seen their super-slick google maps with turn-by-turn directions.  Since the google maps app on iPhone will probably *NEVER* get updated to work the same as it does on android for obvious reasons, you have to look elsewhere for turn-by-turn directions.

I’ve gone down this road in the past, and not found anything free worth using in the app store, but that changed recently.

Remember MapQuest?. .  . you know, that site you went to for directions online before google maps existed?  Well, MapQuest has an iPhone app out called “MapQuest 4 Mobile”.  It’s 100% free, gives turn-by-turn directions both on screen and via voice, and recalculates when you miss a turn.

I tried it on my way home a few days ago, and it worked perfectly.  It *does* like to eat the battery, as any GPS app does.  I left work with ~45% battery, and got home with ~30%.   My drive is 35 miles and usually takes just under an hour, so 15% loss isn’t terrible I suppose.

If you have an iPhone, I strongly suggest you give it a try.

Get it here:

http://itunes.apple.com/us/app/mapquest-4-mobile/id316126557?mt=8&ls=1

Build your own 10TB SAN for less than $800

I’ve been upgrading my storage every 2 years or so for at least the last 10 years, and it was time to get serious.

The last two upgrades I made were 2 x 1TB drives in a RAID1, and then up to 2 x 2TB drives in a RAID1.  Both configurations were attached to a mid-level RAID card and offered “ok” performance and “ok” redundancy, since it was a simple RAID1.

Enter, “The problem”:  In addition to growing my storage needs quicker, largely around the fact that my wife and I were downloading a lot of HD TV content, I also started leveraging  VMware a lot more, and disk I/O was becoming a real bottleneck on the pair of 320GB drives I had running in that box (another simple RAID1).  It was only a year since I had moved up to 2 x 2TB HD’s and 3TB HD’s would have barely been a band-aid.

My goal was to solve both problems with 1 solution:

Build a SAN that provided higher I/O capabilities than the current local storage in my VMware box, AND provide bulk storage for the increasing amount of videos we download, pictures we take, music we collect, etc.

I had heard about ZFS years ago, but when I dug deeper, it seemed like it wasn’t ready for prime-time.  Well, things have changed.  ZFS is becoming widely used at the enterprise level and considered stable for production.  ZFS works similarly to how a basic RAID controller functions, but uses a whole x86 computer to act as the controller with ZFS acting like the “firmware” running on the controller.  ZFS offers data integrity verification against data corruption modes, support for high storage capacities, snapshots, copy-on-write clones, continuous integrity checking with automatic repair, and iSCSI through COMSTAR at the OS level.

ZFS running on a moderately priced x86 box will far outperform high-end RAID cards that alone cost more than this whole build.  Since ZFS does the “work” you previously counted on the RAID card for, you DON’T NEED high-end RAID cards to attach your drives to in a ZFS box.  You do want “fast” HBA’s, but they’re still cheap. especially if you’re willing to buy used, since these simple HBA’s are what typically ships with base-model servers and are typically “pulled” and sold on eBay.  The HBA in my recipe below is an LSI1068E with a Dell part #.  Several vendors make HBA’s with this chip, so if you can’t readily find the dell part, try looking for cards branded under Lenovo or HP.

Now, the recipe:

1x NORCO 10-bay Hot Swap Server Chassis = $240

http://www.newegg.com/Product/Product.aspx?Item=N82E16811219037

6x Western Digital WD20EARS 2TB SATA HD’s = $540

http://www.newegg.com/Product/Product.aspx?Item=N82E16822136514

2x 1M SAS 32-pin to 4 SATA = $40

http://www.provantage.com/cables-go-10249~7CBT9212.htm

1x LSI 1068E PCIe SATA/SAS Controller = $19 on eBay

http://accessories.dell.com/sna/products/Hard_Drives_Storage/productdetail.aspx?c=ca&l=en&s=biz&cs=calca1&sku=313-8239

Oracle Solaris Express 11 = FREE

http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html

TOTAL = $799

This build does expect you have some general experience with storage, x86 PC’s, and a few parts laying around you can re-use.  You’ll notice the above recipe doesn’t include the mobo, cpu, mem, or power supply.  These are all things I had laying around from other builds, and it doesn’t have to be fancy.  Anything dual-core with at least 2GB of mem and a PCIe slot that works with storage adapters will be just fine.  MOST motherboards will work with an HBA in their PCIe slot, but it’s a good idea to do a few google searches before you pull the trigger on a purchase to see if anyone else has tried with that specific board.  I used a Gigabyte mobo and had no issues.  You will want to make sure the power supply you use has enough umphh to power the system and all the drives.  I had a  550w of good quality in my parts pile and used that.

If you don’t have any of the above items, figure another $200-$250 for the build. . which still only puts the total at around $1,000.  If you’re buying a new mobo and cpu, buy something low power.  The difference between a dual core i3 and a quad core i7 will be very little.  Spend your money on memory instead, which will make a far greater impact on performance than raw CPU speed.  The memory in your home-built SAN is used similarly to how the cache would function on a classic RAID card.  The more you have, the faster it goes.

If you plan on building a SAN similar to the one above with ~6 drives, you’ll be fine with a single HBA and the cable linked above.  In addition to the drives you’ll use for your storage, you’ll want a drive or two for the OS.  One drive is all that’s needed, but if you have two laying around, it’s a good idea to have redundancy for Solaris Express, since if the OS goes down, your data will be inaccessible until you reload Solaris on a fresh drive and remount your data pools.

So, build your rig, install Solaris Express (instructions available at the same site linked above for download), and make sure Solaris can “see” all of the hardware in your box.  The next step is configuration.  I opted for configuring via a GUI, but ZFS does have a full-featured command line implementation.  The GUI I used is napp-it, available here (for free):

http://www.napp-it.org/downloads/index_en.html

You can actually install it as easily as running the below one-liner from a root shell on your SAN:

wget -O – www.napp-it.org/nappit | perl

napp-it is basically a simple web app that interfaces with ZFS underneath,  but presents a nice GUI in your browser for building and managing storage pools and their accessability.  There’s LOTS of different ways you can build a storage pool or pools with the 6 drives suggested above, but I would suggest a RAID-Z2.  This works similarly to the classic RAID-6, in that you can lose up to two drives without losing any data.  I won’t go into the other pool types  and/or their merits here, but the ZFS wikipedia page has tons of info:

http://en.wikipedia.org/wiki/ZFS

A 6 disk RAID-Z2 built from 2TB drives will yield about 7.1 terabytes of usable space after formatting.   The same 6 disks in a RAID-Z1 would yield ~9 terabytes formatted, and a simple volume with no redundancy would yield over 10 terabytes.   The reward of up to 30% more usable space is NOT worth the risk of  a single disk failure wiping out all your data.  I would strongly suggest the RAID-Z2 option.

Go build!

Here’s my home network rack with the completed SAN on the bottom shelf:

click the pic for full-size view

NOTE:  The price for the 2TB drives linked above was $89.99/ea when I put this article together.  With the flooding in Thailand, the prices for all drives skyrocketed, but is starting to settle down again.  If you’re not in a hurry, wait until the price stabilizes.  It  *will* come back down to the $89.99 price point, if it hasn’t already by the time you’re reading this :)

Proof Siri hates my wife!

If that isn’t proof enough, watch the next one!

I sware, this is legit. I have no idea what got into Siri tonight. She must be repeating stuff from past searches. . . .I mean. . not that I ever searched for strip clubs :P

PS, that’s my wife snoring in the background :)

DIY: Wooden Tie Rack

Recently I’ve had to start wearing ties to work, and the two total ties I previously owned just wasn’t cutting it.  I harvested the ties my father used to wear, which rounded out my tie selection quite acceptably.  Unfortunately, I quickly realized that while having two ties in your sock drawer works just fine, having fifteen in there doesn’t.

I headed out to my trusty local Wal-Mart to pick up a tie rack, but alas, they had none!  Mind you, they weren’t out of them, they simply didn’t carry them.  Sure, I could have ordered one online, but that meant waiting, and patient I am not.  So, I bought a few vertical wooden hangers that came with hooks meant for belts and headed home.

At home, I pulled out the hooks from the vertical wooden hangers with locking pliers and made a simple plan to build my own rack:

The tie rack is 22″ wide, and 4.5″ tall, a good size to screw to the inside of most closet doors.

I made mine out of 3/4″ pine and sanded a nice round-over onto the edges.  I marked everything with my 1:1 paper template, and drilled out the holes for hooks.  I pounded the scavenged hooks into the holes with a mallet.  You could just as easily makes the hooks from wooden dowels or cut lengths of aluminum rod.

I’m pretty happy with the result, and thought I’d share the plans.

Below is a PDF of the tie rack plans.  It prints onto 3 sheets and each page overlaps the next by 2″.   Make sure your printer is NOT set to shrink to fit, or it won’t be the full 22″ when you cut and tape it together.

Tie Rack Plans – 1:1 PDF Template

Enjoy!

Lockdown: EXCELLENT article on rights around the Internet and general computing

Wow! Cory Doctorow did a tremendous job putting together a keynote speech for the Chaos Computer Congress in Berlin, entitled “The coming war on general computation.”  He then turned it into a full-blown article titled “Lockdown” and published it here:

http://boingboing.net/2012/01/10/lockdown.html

Go read this, now and tell all your friends as well.  This guy put into words what all of us geeks that understand the inner workings of the internet and PC’s have been saying for a long, long time in a way that’s fairly easy to understand and makes a whole pile of relevant points both technologically, politically, and practically.

Hats off to you Cory!

This is about real issues that as the prevalence of technology grows year after year mean more and more.  If we don’t figure out how to properly prevent regulation in areas it doesn’t belong, we’ll be paying the price in the future in ways we haven’t even thought of today due to stifling innovation, control, etc.

I don’t mind admitting I could really use one of these right about now.

Quick script to add a rule to spamassassin

My spam volume has been ‘up’ lately, probably due to the holidays.

I find myself adding rules to match simple phrases that I seem to get a lot of  to my local.cf, and I figured I’d write a quick dirty script to make the process easier.

Feel free to copy/paste this into a new file in the same directory as your local.cf and don’t forget to chmod 755.  Execute with ./yourfilename (I used rule_creator).  There’s some comments in there to pay attention to, but as long as you place this into the same dir as your local.cf, and use ’service’ for spamd (typical for a qmailtoaster), there’s nothing to do.

Enjoy!

#$/bin/bash
#
# This script must be run from *INSIDE* the directory where your local.cf lives.
#

clear
echo “What should we name this rule? (ex. ‘RICH_DIRECTBUY’)”
echo “”
read RULENAME
echo “”
echo “Should the rule apply to the header or body? (enter: ‘header’ or ‘body’)”
echo “”
read RULETYPE
echo “”
echo “What phrase should the rule match? (ex. ‘get your free credit score’)”
echo “”
read PHRASE
echo “”
echo “How many points should I assign for this rule? (ex. ‘5.0′)”
echo “”
read SCORE
echo “”
echo “”

if [ $RULETYPE = body ]

then
RULELINE=$(echo “body $RULENAME /$PHRASE/i”)

elif [ $RULETYPE = header ]

then
RULELINE=$(echo “header $RULENAME ALL =~ /$PHRASE/i”)

else

echo “Ruletype entered wrong, exiting”
echo “”
exit

fi

SCORELINE=$(echo “score $RULENAME $SCORE”)

clear
echo “”
echo “Ok, I’ll add the following rule to ‘local.cf’:”
echo “”
echo “—————————————————-”
echo $RULELINE
echo $SCORELINE
echo “—————————————————-”
echo “”
echo “”
echo “** Press any key to add the rule, or CTRL+C to exit **”
echo “”
read
echo “” >> local.cf
echo $RULELINE >> local.cf
echo $SCORELINE >> local.cf
echo “”

# This section will restart spamd if you use ’service’ to control it.  If you don’t, you’ll probably just want to comment the whole below section out and restart spamassassin manually

echo “OK – rule added, restarting spamd”
echo “”
cd /service
echo “Stopping spamd”
svc -d spamd
echo “”
echo “Starting spamd”
svc -u spamd
echo “”
echo “Checking spamd status”
sleep 3
echo “”
svstat spamd
echo “”

Hey! Is that a tank on your speaker?

Epic.

Nik Nowak, German electronic DJ, built his own “sound tank” with 4000 watts of power and 13 speakers onboard.

Nik, I salute you, that is awesome!

(more info and vids after the jump)

http://dvice.com/archives/2011/09/the-sound-tank.php

Review: HP TouchPad – First Thoughts

Persistence paid off, and I was finally able to get an HP TouchPad at the unbelievable price of $99.99.

I got to use it for about an hour last night, so this review is truly first thoughts from a tech geek that swapped his iPad 2 for an HP TouchPad for one night.

The model I’m reviewing here is the 16GB WiFi.

Packaging: I’m only mentioning it, because it was impressive. I’d say it was on par with the quality of the iPad packaging.  An inner box slides out of an outer shell, and the TouchPad is well cushioned and separated from the accessories.  The accessories are under a flap, and also divided from each other.

Accessories: You get a USB cable and a power adapter.  The power adapter is big. . in fact, it’s a bigger then the old-style plastic 35-mm film canisters, and the same shape.  The outlet prongs fold into the cylinder, but it’s still BIG.  If you’re packing light, it’ll be frustrating that the adapter is this big.

The actual quality of both is nice, and it seems like they went out of their way to ensure this.  I bet someone in mgmt said, “OMG, we have to justify the cost of this mediocore product, make everything it comes with look like Bentley made it”.

Device: The TouchPad itself, in my opinion, is of a lower quality than both the iPad 1 and 2.  The chassis is plastic, and the buttons are “ok”.  It’s very similar to the design of the iPhone 3G, which, in my opinion, is also of inferior quality compared to the iPhone 2.5G, iPhone 4, iPad, and iPad 2.   I’ve heard rumors folks are having issues with cracking around the speakers and bottom port, and I believe it.  The design and build quality doesn’t instill the same confidence I have in other portable electronics.  That said, compared to Chinese import cheapo tablets in the $90 – $200 range, this thing is tank.

The screen is gorgeous.  No flaws here whatsoever in my limited play session.  Color rendition is good, brightness is good, viewing angle is good.  Job well done here.  The speakers are also pretty good.  I fired up Pandora and had no complaints.  I think the “beats” name is a bit of a stretch here, and I wonder how much better it could have sounded if they spent the money on the speakers instead of the licensing.  Regardless, it’s better than expected for the size of the device, and loud enough for quiet to moderately noisy environments if it’s right in front of you.

OS/Interface: Wow, such mixed feelings here. . .   I love the way multitasking is handled, and I love that it handles flash, but it feels sluggish and scrolling often pauses or stutters.  Speaking of flash, it did leave me thinking, “wtf Apple, just gimme Flash already”.  99% of the flash I  surfed to worked just fine and didn’t bog the device any more than other pages.  C’mon Apple, make it happen :)

Settings, App mgmt, and customization are all poorly implemented.  To be fair, some of the settings are easily adjusted, but most are buried intuitively leaving you feeling like you’re running Windows 3.11 all over again.  Seriously HP, is this the best you could do?

Media: This was a big fail for me.  Admittedly I spent very little time with it, but I copied an H.264 movie to it that I’ve successfully watched on my iPhone, iPad, Samsung Smart TV, Windows Media Center, VLC, etc., and the TouchPad choked.  I’m sure if I re-encoded it, it’d be fine, but that’s a real pain in the ass if you just want to get some movies on there for the kids before running out the door.  I hear there’s an app that’s a lot more flexible around media types, but I wasn’t dropping any coin on apps with Android on the horizon.

Final Thoughts: This thing is a STEAL at $99.99.  If you see one, buy it.  The original price tag was not realistic, not with the current polish of this device.  The most I would have paid if I was in the market for another tablet and it wasn’t fire-sale’d is probably about $250.  That’ll change if cyanogen is successful with their Android port.  It easily adds another $50 to $100 to what I’d pay, and I’ve got my fingers crossed I’m reviewing this same tablet again in a month or two with Android on it, much more favorably.