Category Archives: Blather

Ramblings of a man who sees the world just a little bit differently.

Laptop Batteries

A few days ago I was swapping email with my friend Paul about laptop batteries. He had some concerns about runtime and stuff. I thought that parts of our conversation seemed like a good candidate for this space and he agreed. Yeah, there are plenty of tip lists and whatnot out there, but what follows is based on my actual personal experiences.

[…] how much run time do you (or should I) expect? Seems to me like I’m getting 10-15 minutes, always running plugged in, and that can’t be helping the battery to take a deeper charge.

My laptops (now old, creaky P4s with conventional hard drives, since we’ve all moved back to fast, powerful desktops) get about an hour or so of work on the network, maybe an hour forty-five backing off the screen brightness with mostly local work. My SSD-equipped netbook OTOH goes for 5-10 hours, depending. Once, on a bus back from DC, I had the netbook running a LAMP server virtualized under VirtualBox, doing Web development to while away the hours. A single charge lasted the whole trip back to Jersey! Oh, yeah, and a seatmate’s iPhone died on the way so I let him plug into a USB port to charge up. (Bonus: I got a bit of ‘net access!) So, battery life can vary greatly.

You’re right about not liking to be constantly charging. But LiIon batteries are kind of predictable once you get to know them.

Don’t subject them to temperature extremes, high ambient heat is especially bad so don’t let ’em sit in the sun. Don’t let them fully discharge. In practice, your box will shut down before full discharge becomes a problem. But don’t forget to charge a spent one before long-term storage. A battery on the shelf will discharge slowly, a battery in a powered-off laptop will discharge faster. So, to maximize life remove it when it’s not being used for extended periods.

The LiIon chemistry doesn’t wear out (like lead-acid) so much as it develops an ever-increasing internal resistance over time. You’ll notice that a new battery charges fast and lasts a long time. After a while it takes longer to acquire a full charge that doesn’t last quite as long. At end-of-life you can charge it all day and it won’t show full, while delivering only a few minutes of use (if that). The charging circuitry can only push so hard, and as the battery’s internal resistance climbs it has to work harder and harder to deliver fewer electrons. You end up getting some number of useful cycles out of a battery and that’s that. It makes sense, then, to use the battery until depleted, charge it, set it on the shelf for next use. Nobody really uses ’em that way, though…

Keep ’em in the laptop, use it on AC? Not ideal, the charge circuitry will keep cycling them near the top of charge, you actually tend to wear out the battery quicker that way – but you won’t notice it until you’re away from AC and actually need that charge. Using your laptop on AC most of the time? Take the battery out. The charge circuitry will notice and stop charging the empty hole, and the whole box will run cooler. ‘Course, you don’t get the benefit of a built-in UPS, but life’s full of trade-offs.

Finally, a safety tip. LiIon chemistry is inherently quite unstable. Without the active circuitry within the battery itself it’s prone to problems like thermal runaway – a nice term for explosions or catching fire. If you drop one, best to stand there looking dopey watching it for a few minutes. Look for signs of stress – heat, bulging, etc. – before putting it away. Is a dropped phone going to explode every time? Not by a long shot. But you never know. Sony, HP, Dell, virtually all of the big players have had massive battery recalls. There’s been plenty of property damage and injuries, but only the most spectacular ones make the news.

I haven’t actually timed it, but it seems awfully, awfully short.

Conserve. Use the power-saving power profile. Dim the screen’s backlight. Use a simple blank screen saver. Set short sleep and hibernate trigger times. Routinely sleep or hibernate the box when taking phone calls, hitting the can, making coffee, etc. Run fewer simultaneous applications and trim background processes. Save processor-intensive work for when you’ve got AC. You can probably double your runtime, with practice. Most people can.

Finally, keep the system’s monitoring and charging subsystems ‘in tune’ by calibrating according to the manufacturer’s guidelines, taking your usage patterns into consideration. Usually, calibration amounts to using the battery until it’s depleted followed by giving it a full, uninterrupted charge. That way the system has a better idea of the battery’s condition at any given time and can more effectively manage the charging circuitry. It’s that internal resistance increasing over time thing again.

Storage: the plex is missing

Last year, in the midst of migrating the VM farm from VMware to VirtualBox, I had a Seagate drive go tits up. Luckily it was part of a RAID so I just substituted another drive and that was that. It was still under warranty so I figured that one day I would clear out the confidential data and RMA the thing. No rush.

Every so often, as time permitted, I would haul the thing out and play with it a little. This morning was one of those times.

Since I’ve been rather unsuccessful with the thing so far I figured to try swapping logic boards on the drive. I’ve got a spare, of sorts; it’s on a drive that’s part of the RAID mirror in my primary desktop. Software RAID, that is, on a Windows 7 system.

It’d be a simple matter to pull the drive, failing the RAID. Then the plan was to install the known-good logic board onto the failed drive, cable it up to the ESATA port and (possibly) do the wipe. Recovery would be just as easy. Replace the logic board and re-install the RAID drive. Then recover/resync the mirror and that would be that.

Before I got started I figured a backup would be prudent. The RAID mirror is where I do all my work. The better part of a terabyte was soon copied to a spare drive.

The drive pull took but a moment. Gotta love those big, roomy cases! I booted to find that the array had NOT failed; instead it went missing altogether! Oops. No concern, though, right?Microsoft documentation says that breaking a mirror results in two drives containing the data, just no more mirror. My exercise should have merely simulated a drive failure. When I re-installed the drive it should be fine.

Okay, so I did the logic board swap and futzed with that a bit, still feeling a bit uneasy about the mirror. Didn’t get anywhere for my trouble. It looks like the failed drive is just that – a failed drive. (More about that later.)

I put the known-good logic board back on the mirror drive, shoved it into the case, cabled it up and booted. Uh oh. Still no mirror. One of the two formerly mirrored drives appeared uninitialized while the other was foreign. I imported the foreign disk, which then got its old drive letter back.The data appeared to be intact but (I guess) since the companion volume remained uninitialized it still reported itself as having “failed redundancy.” I couldn’t break the mirror, nor could I remove the mirror. It looked like it was in some kind of limbo. I tried to reactivate the volume and had a nice little “WTF” moment: “the plex is missing” mocked the resulting error message.

I’m running out of time, there’s stuff I need to be doing and it’s certainly not this.

I initialized the uninitialized drive, made it dynamic and formatted it. Then I copied the data from the drive whose plex – whatever the hell that is – was missing onto the newly formatted volume. Continuing, I wiped the plex-less drive. Would it now offer itself up as a candidate to accept a mirror? Yes, it would. So I did just that and it took a while – longer than all the file copying – to resync.

Now, I’ve had good luck with Windows’ software RAID mirrors before but this exercise worried me a little. Should I have broken the mirror instead of simply yanking the drive? What if it had failed electrically? Or if I knocked a cable loose doing some unrelated maintenance? Or someone stole the drive? What happens when a drive fails under certain circumstances? Have I just been lucky all along, where the failures I’ve experienced have just been the right kind of failures that were recoverable? Ponder, ponder.

I guess I need to set up a testbed VM and experiment. Meanwhile, I have my panic copy and the same mirror arrangement I had this morning, no lossage.

Oh, and the old drive that I was trying to wipe? Glad you asked. It’s still on the shelf. There’s confidential data on there, if one were to recover it. I haven’t been able to get to it in order to properly cleanse it. I don’t trust Seagate; not that Seagate’s evil or anything. It’s just that, well, the responsibility’s mine and I don’t take that lightly. Terabyte drives are only worth about $75 retail these days and I got a couple of good years out of the thing.

What would YOU do with a drive full of confidential but unreachable data? Can you suggest any tools that I might use to get at the drive to wipe it without needing to access it with Windows or Linux, the two predominant OSs we run here?

Bike Parts – Deal Gone Good

I love it when I have the opportunity to talk about companies that do things right. Here’s one: Will Powered Products.

Will Powered Products is a small company out of Dingman’s Ferry, PA that produces a limited line of high quality motorcycle parts. Hand grips, foot pegs, cable clamps – stuff like that. Simple stuff. But made from serious metal, cast and machined with quality and workmanship that you just know will last forever.

I first ran into Barry Will at a swap meet a couple of years back. I had gone through several sets of Harley-branded hand grips on my Dyna and I was sort of idly looking for something better. Funny thing, the Harley-branded grips start out looking and feeling great but they just don’t hold up over time. The Will Powered Products grips are machined from solid aluminum. They’re kind of expensive at nearly three times the cost of Harley-Davidson grips but they felt like they’d outlast the bike. I mulled it over as I wandered the show floor and ended up buying them on the way out. Today they look and feel just as good as the day I installed ’em.

Clutch Cable Clamp
Solid aluminum clutch cable clamp from Will Powered Products. Click for larger image.
I saw Barry again at the Jersey Giant show/swap meet last April. This time it was his polished cable clamps that looked interesting. Ever see the stock Harley-Davidson cable stays? Cheap, plastic-coated slivers of spring steel, they’re functional but kinda ugly. Anyway, I needed two clamps but there was only one on hand. Barry promised to ship another right away so I paid for both and took one, handing off a business card with my shipping address. As I walked away from the table – sans receipt for the cash purchase – Pam gave me a questioning look. “I don’t think I need a receipt, he’ll do the right thing,” I said. “It’ll be worth the price to find out if my judgment’s still good.”

This is where things got interesting. After the weekend Barry emailed that he had sent the camp. And a few days later he emailed again saying that it had come back for insufficient

Keychain as jewelry
Keychain as jewelry, Damian's idea. He's thinking it needs something in the center, hasn't figured out what yet. I'm wondering what the center is made from, just in case I need to put it on the drill press.

postage – and that another would go right out. A few days later it arrived. Bummer, though, it turned out to be the wrong size for my needs. I emailed Barry, sent it back the next day and left for some travel. When I returned from St. Louis the correct-sized clamp was waiting. But that’s not all. Also in the package were two key chains styled after their dipsticks, AND three bucks – cash – presumably to cover my return shipping.

There are a few basic principles at work in this story. The principles are proven – they work in business and in life. Do what you say you will do. Will Powered Products did exactly that every step of the way, from shipping to keeping me informed. When something goes wrong, assume responsibility and do what’s necessary to fix it. Don’t make excuses. Mistakes happen. There were a few in this story but each were always handled as well as could be expected. Barry even mentioned that they took the extra step to ensure that their stock was correctly identified for size in order to reduce the possibility of future errors. Delight your customer. Throughout this extended transaction I always felt like I knew where things stood, so there was no anxiety or tension. Then Barry stepped up with unexpected extras in the end.

So, two thumbs up to Barry and Will Powered Products! Check out their Web site and if you’ve got a need for that kind of stuff for your bike then don’t hesitate to do business with them. They’re an American company making high-quality products that are absolutely worth the cost. You’ll know that the moment you hold one of their parts in your hand.

As for me, maybe some of those spiky footpegs are in my future…

Obligatory disclaimer: I don’t have any interest in Will Powered Products other than that of a satisfied customer.

Naturally Flavored

We drink a lot of Snapple. More accurately, Pam and Damian drink a lot of Snapple. I remember when Dr. Pepper bought ’em some years back and I remember the controversy when some of the ingredients changed… Cost-cutting, like everything else.

But what prompted this entry was the label on a “limited edition” Papaya-Mango bottle the other day:

 

naturally flavored
Recursive labeling. Naturally Flavored with other Natural Flavors.

Which leads to the question, aren’t all flavors natural? What constitutes an unnatural flavor?

 

Mercedes Auto Commercials

Have you seen the recent Mercedes automobile commercials on television?

You know the ads I’m talking about. The ones that show drivers – and I use that word loosely – praising the Mercedes on-board systems for saving the life and limb of some poor, unsuspecting soul when they – the so-called driver weren’t paying proper attention.

“I didn’t see them!” they exclaim.

Well, if you’d have been paying attention then maybe you would have seen them.

I’m torn. On the one hand, as a technologist, I applaud the engineers for the incredible systems they’re building. I don’t think we’re all that far away from seeing self-driving automobiles. Have you seen Google’s? On the other hand, as an invisible motorcyclist dodging drivers inattentiveness and errors every day, I know all about how each and every auto feature that distracts from the task at hand does exactly that. (And sometimes the feature doesn’t even need to be part of the car. I’m thinking of the guy I saw in the minivan last year, in rush-hour highway traffic, with a laptop (!) balanced on the steering wheel, tapping away, oblivious. I throttled up, risking a ticket, and put the dope well behind me.)

I’m thinking that I might one day put on my Mercedes-buying clothes and stroll into a dealership, posing as a potential buyer, and learn firsthand about how they market this stuff.

81 Support Party

Dingo's Den
Dingo's Den in Clifton, NJ during the day, photo found on the Web.

I wasn’t quite sure what to expect. Coming off the Garden State Parkway, Pam and me had followed the GPS through a maze of dark residential streets. We rounded the corner onto Van Houten Avenue to find the street in front of the Dingo’s Den choked with bodies and motorcycles. This tiny place was hosting the Hells Angels Winter Party?

We eased the truck past, found parking several blocks away, walked back. A passing outbound girl warned that it was “very, very crowded and hot” inside. “As long as the beer’s cold,” I thought. We pressed on.

Inside was packed. And loud. But service was good and soon we were in the back near the band, beers in hand. It had been quite a while since I’d been in a club like this. Dark, dirty, jammed with people, fleeting smells – some recognizable and some not –  and seriously loud. The kind of loud that required shouting over, and even then… I missed it. A lot.

We only had the time to take in two of the four bands. Ghost & the Big Sky was first. Very good, tight drums & bass with competent guitar work. Then Trailer Park Mafia. Their 70s/80s metal renditions were instantly familiar. They did a blazing version of Motorhead’s Ace of Spades.

Soon enough it was time to go. Somehow, the outside world seemed much, much quieter.

“Satanic Risks?”

Oh, this is funny. I found myself in a backwater folder in my email client, searching for some long-forgotten credentials (came up dry, BTW) when I ran across some uuencoded messages. That’s right! When’s the last time you even thought about uuencode? Yeah, me too.

This particular message was dated 12 January 1998, sent from my personal email address to an address within the company I worked for at the time. It was funny then, it must still be funny now. The “don’t be evil” company hadn’t yet been invented; Larry and Sergey had already come up with the Google name but hadn’t yet received their first cash infusion or even formally formed their little company. (ref. Google history)

Satanic Risks?
“Lindsay F. Marshall”
Mon, 15 Dec 1997 11:33:31 +0000 (GMT)

In the *Letters* page of this month’s *Fortean Times* (FT106, January 1998)
there is a letter entitled Brotherly Communications, raising the privacy
risks of mandating GPS in every mobile phone — which it claims will be the
case in the USA in 1999. However, the letter then goes on to say the
following:

> Much of the data concerning mobile phone paranoia (or the enhanced 911
> service) comes from the publications of Lucent — also known as Bell
> Laboratories — AT&T and Sandia National Laboratories.

> Lucent seems an odd sort of name — Luc(iferic) Ent(erprises) as people on
> a witch hunt might suggest — but when it comes to software they have a
> real-time operating system called Inferno, written in a language called
> Limbo, with a communications protocol called Styx. Reading the product
> literature is less like engineering and more like indoctrination. The head
> offices are at 666 5th Avenue in New York. The company motif is a fiery
> red circle that might represent a bull’s eye, the star Aldebaran in the
> constellation Taurus — also associated with the Egyptian god Set …

> Lucent has been doing a lot of recruiting recently — their headline
> product is something called Airloop(tm) which looks like a cellular phone
> microcell incorporating voice and data. It is controlled by a little box
> that I expect we’ll be seeing everywhere, called the BSD2000 (Lucent seem
> to have a millennial flavour in their product numbers).

Lucent is, of course, at http://www.lucent.com, and the *Fortean Times* is at
http://www.forteantimes.com.

Supercharging the Stratocaster

I’ve got a Fender Stratocaster, one of the infamous “Splatter Stats“. Purely stock except for the strings, it’s always had a couple of quirks that I’ve wanted to address. It’s time.

I use Ernie Ball Super Slinky strings and the G string in particular has always sounded a bit on the dull side. It’s because of the way the string passes through the nut. One can brighten up the open string by dampening it a little between the nut and the tuning peg (but it’s inconvenient to play that way). I keep the tremolo bridge free-floating, which makes tuning somewhat more challenging. I don’t use the whammy bar but I sometimes ‘wobble’ the sound with my palm on the bridge. Once in tune it tends to stay in tune but lots of bendy work will tend to detune the bendy string. I chalk that one up to string friction.

Graph Tech makes what they call a Supercharger Kit that seemed like just the ticket. [addendum June 2013: Graph Tech has revised their product numbering and web site since this post was written. The link to the kit now points to the updated product. The biggest apparent difference is that my string trees are black with squared-off corners. They probably have a little more string contact.] [updated again November 2019: They’ve gone and changed their website again, so the link is updated. Here’s the part number I used: PN-8000-00] The kit includes a set of saddles, a replacement nut and nut blank, and string trees. The kit also includes an Allen key for setting string height, some emery paper for nut shaping, plus instructions. Oh, yeah, and a pick. You can read about their claimed benefits on their Web site.

The Graph Tech parts that contact strings are made of a material that promises to self-lubricate, leading to less string breakage according to their literature. I was hoping that by reducing friction, bends would return to original tune more consistently. Finally, others on the net had mentioned my preferred strings when discussing the Graph Tech nut. My shop isn’t equipped for cutting new nuts. I don’t want to invest in a set of seldom-used nut files so the closer I get to a stock nut the better.

The work is easy, but quite a bit of setup is necessary after swapping the parts around. If you’re not comfortable setting string heights and intonation then you’ll be better off having your tech do the work instead. If the setup is incorrect your instrument will sound bad. Very bad.

Mexican Splatter Stratocaster

Here’s my Strat on the floor ready for supercharging, using the kit of parts shown. You can click these images for a better look.

Stock saddles removed, new parts ready.

The stock saddles have been removed and the Graph Tech parts are ready for installation. The instructions tell you to remove the strings but I wanted to keep them a little longer; I only changed them a week ago. Since they were all loose, though, this was an excellent opportunity to clean the fretboard and other areas that aren’t often so fully exposed. (When I change strings I change them one at a time in order to keep the neck tension reasonably constant.) So these won’t be seated right and I expect setup will be harder that it would be with new strings. So it goes.

Graph Tech saddles installed.

Graph Tech saddles installed, though obviously not adjusted. Some say the black parts don’t look as good as the stock chrome but I disagree.

Stock nut removed.

The stock nut removed. I was ready for battle but mine literally fell out with a little bit of thumb pressure. Normally you’ll want to score the lacquer around the nut with a sharp Xacto blade so it doesn’t crack. This could explain why I’ve always felt the nut was just a tad low; the shop may have modified it before selling it. (Or, maybe what was sold as new was actually a return that had been set up?) According to the serial number, the guitar I bought August 14, 2004 was built in the Ensenada, Mexico plant in 2003-2004.

Stock and Graph Tech nuts.

Here are the stock and Graph Tech nuts. Note the tab on the Graph Tech – some Strats have a receiver for that tab and some don’t, I’m told. The string slots are not as deep. The new nut is a little longer than stock; I needed to remove the tab and shorten it a little, removing equal amounts of material from each side. It was easy do do using the emery included in the kit.

Tool setup for tab removal.

In the shop, a Dremel tool held by the rubber-jawed vise next to the lathe made the work of removing the tab easy. After the tab was removed, the thickness of the nut was reduced by hand to make for a snug fit in the nut slot. Then the bottom of the nut was reduced – by hand, a little bit at a time, tuning to pitch in between – to set the nut height. The supplied instructions give a good starting point but I set it a little on the high side. I’m conservative that way, figuring I can always lower the nut in the future. Raising the nut means ordering a new one and starting again.

Finished headstock.

The nut’s in place and you can see the new string trees as well. Yes, now there are two string trees! What’s not evident in the photo (my bad) is that the trees are different heights. The bottom one’s shorter and guides the high E and B strings – exactly like the stock tree. Graph Tech supplies a second, taller tree in the kit. I thought about it for a long time before placing it as I did. The additional tree guides the G string but isn’t low enough to touch the B string at all. I didn’t want the tree to touch the D string because I felt it would make the nut-to-tree angle too severe. I’m not sure how the extra tree will hold up long term, guiding only one string, but we’ll see. I drilled the pilot hole for the new screw with a 0.058-inch bit chucked in a hand drill.

Modifications complete.

Here’s the finished product. You can see the black replacement parts and the extra string tree. The setup and intonation are roughed in, good enough to start playing. I know me – it’ll a period of time of adjusting to get it just the way I like it – and I may need to further lower the nut – but so far it looks like a huge success!

The instrument tunes easier and stays in tune better despite long bends. The G string now rings true! The overall sound is decidedly different. The unamplified sound is louder and brighter. Amplified, you immediately notice the increased sustain.

Forward Into The Past

Some music is timeless. My son – he’s 17 now – likes the Beatles. No matter that the band broke up when I was in middle school! Well, as it turns out we’ve got quite a few Beatles LPs (er, vinyl records, those plastic things with the grooves that played music for us old farts) in our collection down in the basement. It was time to do some conversion and put this stuff on his iPod.

I started to research those USB turntables that promise to quickly and easily turn LPs into MP3s and found them lacking. Well, at least those in the range I was willing to spend. Frankly, the hardware I was finding sported specs that kinda sucked, mostly because of the included cartridge.

LP Digitizing Workstation
My basement LP digitizing workstation, Ethernet cable dangling from the floor joists above. That's the back of my furnace in the background and the handle of a 1 KW floodlight leaning against the desk. Also visible is a Discwasher kit to the left of the Beatles' Magical Mystery Tour LP. Bought new for 99 cents during the summer between grammar school and middle school, that was the very first record I ever bought.

I still have an old (but still kinda nice) turntable. Sony, Decent magnetic cartridge, linear-tracking, not too bad. I even have an Onkyo receiver that has a built-in phono pre-amp. That’s a bit of a rarity in receivers nowadays, as the need for one has pretty much gone away. I hauled out the gear and did some testing as I pondered the reality that was sinking into my head…

Analog music – turntables and vinyl records – have all but gone away. Some DJs still use them for mixing stuff but even that’s largely going away, leaving only the quote-audiophiles-unquote. And it’s a given that whenever a market targets a group labeled with some word that ends in phile you can add a zero or two to the price on any related gear. Wow.

I found my old audio gear to be in perfect working order, a testament to decent care while in storage. On to the computer. From parts, I thew together something to handle the digitizing chore: A 1 GHz Celeron box; all of 256 MB RAM; a 250 GB hard drive; Soundblaster PCI 512 card; Windows XP; an ancient program, CDWAV, I think it came with an ancient version of Cakewalk Pyro. Yeah, that ought to do it.

The setup makes uncompressed WAV files: PCM, 2 16-bit channels, sampled at 44,100 Hz. I pull the files up to my desktop and use Nero to correct out the clicks and pops, separate the tracks and burn a standard audio CD. Then use iTunes to import the CD to MP3. The intermediate CD saves the analog-to-digital and cleanup work, the most labor-intensive part of the process. The CDs, BTW, are in most cases good enough to allow iTunes (Gracenote, actually) to figure out the album/song titles.

My digital library is now experiencing steady growth.

Super Bowl

It’s Super Bowl Sunday. I fact, the halftime show is on as I write. It’s amazing how poor some of the acts sound when they’re not in the studio. Even with all the cool stuff the engineers can do with live performances nowadays.

To say I’m not a football fan doesn’t come anywhere even near the truth of the matter. I don’t understand the game. The rules, the language, it all baffles me. No matter how many times someone tries to explain WTF a down is… And by what logic there can be more than one of them called first… I dunno, I just don’t get it. (And no, that’s not an invitation to try to educate me. I’m perfectly happy in my football ignorance.)

But today – game day – was great. I spent the morning and part of the afternoon robot building. Then I went to the gym. Had a great workout, no waiting for anything; the place was empty! Everyone readying themselves to watch the game, I guess. Driving around, the roads were empty. Later I did some grocery shopping. Again, empty. I got a lot done and no waiting to check out.

Hmmm, I guess I’m a fan after all! But probably not for the right reasons.

Hey, didja know that today’s also National Porn Sunday? That’s “the chance to bring hope to those who are struggling with pornography.” [shrug] Haven’t seen any commercials for that. Porn is big business, but I guess xxxchurch.com and their friends can’t afford it.

Super Bowl advertising probably represents the most expensive access to eyeballs in existence. Haven’t seen anything really, really outstanding yet this year, though I can’t say I’ve seen ’em all. In a couple of days, when the servers aren’t being pounded so bad, I’ll set aside an hour and watch ’em all. Purely for entertainment value, mind you.

Resource Contribution

Astute repeat visitors may have noticed the new Spamstains page. Let me explain.

Like everyone else, this blog receives an astounding amount of spam. Doesn’t matter much, really; the tools running tirelessly in the background do a pretty good job of culling the junk. But like a grease trap in a fast food restaurant kitchen the spam traps need periodic purges. It’s a dirty job but someone’s got to do it.

The new page collects some of the best fragments of spammy junk I run across in that cesspool. Besides the obvious giggly entertainment value I’ve actually found a perfect use for the material.

Ever get an unwelcome telemarketer call? Sure you have. Ever at a loss for how to respond? The job just got easier. All you need to do is access the Spamstains page and read aloud from it to your intruder.

Better than simply hanging up, you can waste their time just like they waste yours. And it requires no thought or creativity on your part, for my spammers have taken care of that for you!

You’re welcome.

Hailey’s Harp and Pub

Last night I attended the first annual whiskey tasting at Hailey’s Harp and Pub. It was a huge success!

Pam still reads a pulp newspaper and it was there that she spotted the ad. She thought that our friend Will (also a whiskey enthusiast) and I might enjoy the nearby event and offered to drive. (Can’t beat that, right?)

About 30 of us convened in a back room of the pub to eat, sample whiskeys and converse with Whiskey Master Kevin Loser. Our host (and pub owner) Chris got the evening going with a few stories and jokes while the first of some 7 whiskeys were poured. Kevin took over and began with a high-level description of different whiskey types and common distillery operations. Each new pour was introduced with a great deal of detail. Between tastings, plates of finger foods appeared, prepared by chef Johnny O’ to compliment that particular whiskey. Delicious!

I already had varying degrees of familiarity with most everything we tasted, save one – the Redbreast. The 12-year-old didn’t impress me but it was followed by the 15-year-old which was simply outstanding. A triple-distilled pure pot still whiskey is unique. A Web search will bring you lots more information about the whiskey.

The pace of the event was good. The hours passed quickly and afterward we had a pint in the pub proper, taking in some live music. Chris spent some time hangin’ with the three of us, talking. (Nice touch, spending time with the noobs.) He runs a nice hands-on operation and customers know him by name. The house was packed – normal, I’m told.

Hailey’s has a great atmosphere, everyone made us feel welcome. It’s someplace I’ll definitely try to visit more often. Besides, I want to explore their menu.

Communicating With The Outside World

I recently set out to upgrade a virtual host server from VMware Server to Oracle’s VirtualBox. The upgrade was a huge success. This is one of several articles where I talk about various aspects of that upgrade, hopefully helping others along the way. You might want to go back and read the introductory article Virtualization Revisited. Added 5-May-2011: Originally written using Ubuntu Server 10.04, this configuration also works without change on Ubuntu Server 11.04.

One of the things that I wanted from the new VM host was alerts for anomalous situations. Manually polling for trouble begins as a noble effort but trust me – after a while you’ll stop looking. About a year ago I was almost caught by a failing hard drive in a RAID array. Even after that incident, within a month or two I had pretty much stopped paying regular attention.

While setting up monitor/alert mechanisms on an old Windows server is quite the pain in the ass it’s a snap on Linux. Delivery of alerts and status reports via email is just perfect for me. All I wanted was the ability to have the system generate SMTP traffic; no messages would ever be received by the system. To prepare for that I set up a send-only email account to use the SMTP server on one of my domains solely for the VM host’s use as a mail relay. Then I got on with configuring Postfix, the standard Ubuntu mailer – one of several excellent sendmail alternatives.

Now maybe I’m just a dummy, but I found various aspects of the Postfix and related configurations to be a little tricky. Hence this article, which details what worked for me – and should work for you, too.

(In the stuff that follows, my example machine is named foo and it’s on an internal TLD called wan. My example machine’s system administrator account is sysadmin. My SMTP server is on mail.example.com listening on port 1212. The SMTP account is username with a password of yourpassword.)

Getting Started – Basic Configuration

Begin by installing Postfix, as you would any package.

$ sudo apt-get install postfix

For now, just hit Enter through the install questions. We’ll configure it properly following the install. You’ll be asked for the general type of mail configuration and Internet Site will be the default. Accept that by pressing Enter. You’ll be asked for the System mail name and something will probably be pre-filled. Accept that, too.

Now, go back and do a proper basic configuration.

$ sudo dpkg-reconfigure postfix

Several questions will follow. Here’s how to respond.

For the general type of mail configuration choose Internet Site.

Set the domain name for the machine. The panel provides a good explanation of what’s needed here, and chances are good that it’s pre-filled correctly. By example, foo.wan.

Provide the username of the system administrator. The panel provides a good explanation of what’s needed here. Use the name of the account that you specified when you installed Ubuntu. By example, sysadmin.

Provide a list of domains for which the machine should consider itself the final destination. The panel provides an OK explanation and it’s probably already pre-filled more-or-less correctly. But look carefully at the list that appears in the panel and edit it if it has obvious errors like extra commas. Again, using my example machine, a list like this is appropriate:

foo.wan, localhost.wan, localhost

You’ll be asked whether or not to force synchronous updates on the mail queue. Answer No, which is likely the default.

Next, specify the network blocks for which the host should relay mail. This entry is pre-filled based on the connected subnets. Unless you’ll be using an external SMTP server that requires it, you can simply remove all of the IPv6 stuff that appears here, leaving only the IPv4 entry which will probably look something like this:

127.0.0.0/8

Specify the mailbox size limit. The default is zero, meaning no limit. Accept that. Remember, all we’re planning to do is send mail, not receive it.

Set the character used to define a local address extension. The default is +. Accept it.

Choose the Internet protocols to use. Again, keeping with our earlier IPv4 decision select ipv4 from the list and accept it.

That’s it for the basic Postfix configuration! Next you’ll configure Postfix to do SMTP AUTH using SASL (saslauthd).

SMTP AUTH using SASL (saslauthd)

Since there are several commands to issue as root it’s convenient to sudo yourself as root to save some typing. Good practice dictates you should logout the root account just as soon as you’re finished.

Be careful. In this list of commands there is one – it sets smtpd_recipient_restrictions – that is quite long and may have wrapped on your display. Be sure to issue the entire command.

$ sudo -i
# postconf -e 'smtpd_sasl_local_domain ='
# postconf -e 'smtpd_sasl_auth_enable = yes'
# postconf -e 'smtpd_sasl_security_options = noanonymous'
# postconf -e 'broken_sasl_auth_clients = yes'
# postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination'
# postconf -e 'inet_interfaces = all'
# echo 'pwcheck_method: saslauthd' >> /etc/postfix/sasl/smtpd.conf
# echo 'mech_list: plain login' >> /etc/postfix/sasl/smtpd.conf

Then press ctrl-D to logout the root account.

The next step is to configure the digital certificate for TLS.

Configure the Digital Certificate for TLS

Some of the commands that follow will ask questions. Follow these instructions and answer appropriately, modifying your answers to suit your situation. As earlier, sudo yourself to root and logout from root when finished.

$ sudo -i
# openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024

You’ll be asked for the smtpd.key passphrase. Enter one and remember it. You’ll need to type it twice, as is customary when creating credentials. Then continue.

# chmod 600 smtpd.key
# openssl req -new -key smtpd.key -out smtpd.csr

You’ll be asked for your smtpd.key passphrase. Enter it.

Next you’ll be asked a series of questions that will make up a Distinguished Name, which is incorporated into your certificate. There’s much you can leave blank by answering with a period only. Here’s a sample set of responses (underlined) based on my US location and example system.

Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:Texas
Locality Name (eg, city) []:.
Organization Name (eg, company) [Internet Widgits Pty Ltd]:.
Organizational Unit Name (eg, section) []:.
Common Name (eg, YOUR name) []:Rick
Email Address []:sysadmin@foo.wan
A challenge password []:some-challenge-password
An optional company name []:.

Then continue.

# openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt

You’ll be prompted for your smtpd.key passphrase. Enter it.

Then continue.

# openssl rsa -in smtpd.key -out smtpd.key.unencrypted

You’ll be prompted for your smtpd.key passphrase. Enter it.

Then continue.

# mv -f smtpd.key.unencrypted smtpd.key
# openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650

You’ll be asked for a PEM passphrase. Enter one and remember it. You’ll need to type it twice, as is customary when creating credentials.
Like earlier, you’ll be asked a series of questions that will make up a Distinguished Name, which is incorporated into your certificate. There’s much you can leave blank by answering with a period only. Here’s a sample set of responses (underlined) based on my US location and example system.

Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:Texas
Locality Name (eg, city) []:.
Organization Name (eg, company) [Internet Widgits Pty Ltd]:.
Organizational Unit Name (eg, section) []:.
Common Name (eg, YOUR name) []:Rick
Email Address []:sysadmin@foo.wan

Next, issue the remaining commands.

# mv smtpd.key /etc/ssl/private/
# mv smtpd.crt /etc/ssl/certs/
# mv cakey.pem /etc/ssl/private/
# mv cacert.pem /etc/ssl/certs/

Then press ctrl-D to logout the root account.

Whew! We’ll continue by configuring Posfix to do TLS encryption for both incoming and outgoing mail (even though we’re only planning on sending mail at this point).

Configure Postfix to Do TLS Encryption

As earlier, sudo yourself to root and logout from root when finished.

$ sudo -i
# postconf -e 'smtpd_tls_auth_only = no'
# postconf -e 'smtp_use_tls = yes'
# postconf -e 'smtpd_use_tls = yes'
# postconf -e 'smtp_tls_note_starttls_offer = yes'
# postconf -e 'smtpd_tls_key_file = /etc/ssl/private/smtpd.key'
# postconf -e 'smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt'
# postconf -e 'smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem'
# postconf -e 'smtpd_tls_loglevel = 1'
# postconf -e 'smtpd_tls_received_header = yes'
# postconf -e 'smtpd_tls_session_cache_timeout = 3600s'
# postconf -e 'tls_random_source = dev:/dev/urandom'

This next configuration command sets the host name, and this one uses my example machine’s host name. You should use your own instead.

# postconf -e 'myhostname = foo.wan'

Then press ctrl-D to logout the root account.

The postfix initial configuration is complete. Run the following command to start the Postfix daemon:

$ sudo /etc/init.d/postfix start

The Postfix daemon is now installed, configured and runing. Postfix supports SMTP AUTH as defined in RFC2554. It is based on SASL. It is still necessary to set up SASL authentication before you can use SMTP.

Setting Up SASL Authentication

The libsasl2-2 package is most likely already installed. If you’re not sure and want to try to install it you can, no harm will occur. Otherwise skip this command and simply continue.

$ sudo apt-get install libsasl2-2

Let’s continue the SASL configuration.

$ sudo mkdir -p /var/spool/postfix/var/run/saslauthd
$ sudo rm -rf /var/run/saslauthd

Create the file /etc/default/saslauthd.

$ sudo touch /etc/default/saslauthd

Use your favorite editor to edit the new file so that it contains the lines which follow. Just to be clear, the final line to add begins with “MECHANISMS=“.

# This needs to be uncommented before saslauthd will be run
# automatically
START=yes

PWDIR="/var/spool/postfix/var/run/saslauthd"
PARAMS="-m ${PWDIR}"
PIDFILE="${PWDIR}/saslauthd.pid"

# You must specify the authentication mechanisms you wish to use.
# This defaults to "pam" for PAM support, but may also include
# "shadow" or "sasldb", like this:
# MECHANISMS="pam shadow"

MECHANISMS="pam"

Save the file.

Next, update the dpkg state of /var/spool/portfix/var/run/saslauthd. The saslauthd init script uses this setting to create the missing directory with the appropriate permissions and ownership. As earlier, sudo yourself to root and logout from root when finished. Be careful, that’s another rather long command that may have wrapped on your display.

$ sudo -i
# dpkg-statoverride --force --update --add root sasl 755 /var/spool/postfix/var/run/saslauthd

Then press ctrl-D to logout the root account.

Test using telnet to connect to the running Postfix mail server and see if SMTP-AUTH and TLS are working properly.

$ telnet foo.wan 25

After you have established the connection to the postfix mail server, type this (substituting your server for mine, of course):

ehlo foo.wan

If you see the following lines (among others) then everything is working perfectly.

250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250 8BITMIME

Close the connection and exit telnet with this command.

quit

We’re almost there, promise.

Setting External SMTP Server Credentials

Remember, we set out to use an external Internet-connected SMTP server as a mail relay and this is how that is set up. I mentioned at the beginning of the article that I had set up a dedicated account on one of my domains. You might use one on your ISP. I would not, however, use your usual email account.

You’ll need to manually edit the /etc/postfix/main.cf file to add these lines:

smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/saslpasswd
smtp_always_send_ehlo = yes
relayhost = [mail.example.com]:1212

Of course, you’ll modify the relayhost = line to specify your external SMTP server. If you don’t need a port number then simply leave off the colon and port number following the closing bracket. I included the port number as a syntax example in case you needed to use one.

Did you notice the hash file mentioned in the lines you just added to/etc/postfix/main.cf? It holds the SMPT server logon credentials, and it’s time to create it.

$ sudo touch /etc/postfix/saslpasswd

Use your favorite editor to edit the file, adding the credentials with a line like this:

mail.example.com username@example.com:yourpassword

The components of the line you’re putting in the new file should be obvious.

(Before you cry foul… Yes, I’m well aware of the risk of storing credentials in the clear. It’s a manageable risk to me in this case for the following reasons. The physical machine is under my personal physical control. The credentials are dedicated to this single purpose. If the server becomes compromised I can disable the credentials from anywhere in the world I can obtain an Internet connection. If I’m dead and can’t do that, well, I guess it’s SEP and my incremental contribution to the SPAM of the world will torment my soul until the end of time. Your situation may be different and I leave it to you to secure the credentials.)

Anyway, before postfix can use that horribly insecure file it needs to be hashed by postmap:

$ sudo postmap /etc/postfix/saslpasswd

With that done, restart postfix.

$ sudo /etc/init.d/postfix restart

Applications that know how will now be able to generate mail but it’ll be convenient to be able to do it from the command line. Besides making testing of this configuration easier you’ll then be able to have your own scripts send messages with ease. For that you’ll need just one more package.

Installing the mailutils Package

Simple. Install the mailutils package.

$ sudo apt-get install mailutils

That’s it!

Try test sending some email from the command line. Substitute the address at which you usually receive mail for my example youraddress@yourserver.com.

$ echo "body: outbound email test" | mail -s "Test Subject" youraddress@yourserver.com

Check your inbox.

Wrapping Up

Well, that wasn’t so bad.

Mexican Coke

Mexican Coke US label add-on

Mexican Coke

A while back I ran into some Mexican Coca-Cola at the local Costco and just had to have some. You see, it’s made with real can sugar as opposed to the high fructose corn syrup crap they put in seemingly everything these days.

Why do they do that, anyway? Take a perfectly good ingredient and substitute junk for it. Cost, I guess.

Truth be told I only drank a couple out of the case. I’m not a big soda drinker. But the ones I had were just incredible, the taste immediately transporting me back to my childhood. The stuff even smells different.

Notice on the bottle, under the logo, the capacity is shown. On the other side of the bottle the logo is just plain, unlike bottles sold here. Also, the added label. Flat, stuck imperfectly to the rounded surface with adhesive, showing the ingredients and such, mandatory for all food products. Placement of those labels was inconsistent, which suggests that they may have been hand-applied some time after the fact.

In my experience it’s hard to get decent, sugar-laden soda today. A few brands pride themselves on it. Jones comes to mind. And a couple of times a year I have Old Doc’s Soda Shop ship me a few cases of Dublin Dr. Pepper. The independent Dublin Dr. Pepper plant continues to make the stuff the way it was made back in the beginning, while the other bottlers have ‘modernized’ and stopped using real sugar. If you can manage it, try a Dublin and a regular one side by side. The difference is unmistakable.