Sunday, October 28, 2007

Work work work...

This weekend I was cooped up at home on the couch working on a paper. There's a deadline coming up quickly that I want to meet. Working on a paper involves working on several fronts. There's a bit of data analysis that my colleague is working on providing. Meanwhile I'm putting together some of the visualizations, incuding some plots, images, etc. The screenshot is more or less what I've been staring at all weekend. I made it small so that I don't give away too much actual info. Staring at a computer screen isn't much fun, but the work has to get done.

Monday, October 15, 2007

Out on Tippy I

On Sunday we hauled our canoe up from our swamped-in dock and drove it to the nearest boat ramp on Lake Hartwell. The thing's a bit heavy so we don't do this often, but it's nice to get out on the water on just about anything that'll float. The canoe happens to have been christened "Tippy I" by Corey who I think thinks anything floating on a V-hull is tippy. Hence most of our watercraft are "Tippy" (with the exception of the sailboat, which is "Pudgy" :) In the distance ahead of Corey you can see we're headed toward our community dock, where we normally keep Tippy II, our powerboat that we removed a couple of weekends ago. Good thing too since yet more of the boat ramp was now exposed.

One reason we wanted to get out on Hartwell was to see just how low the water has dropped. It's down by about 10 feet presently, which is a lot (we are in an exceptional drought condition). Just across from the ramp a "new" island had popped up. When we were about to trailer the boat the depth alarm had sounded over this bit of dirt ("mielizna" in Polish)—it had never sounded there before. Now we got a good glimpse of the cause of the alarm. One more week and we may have grounded the engine fin. Once we got to our subdivision, we cruised around to see the state of our community dock. There's still water, but maybe only 6 feet of depth at the farthest slips. Our slip is one of the farthest (deepest) ones out. Right now one of our neighbors has his pontoon boat in it since his dock is on dry land.

Around our neighbors' docks we picked up a little passenger that was swimming along the canoe. It's a green anole (anolis carolinensis) although we just call them geckos. I didn't know they could swim. This little guy was doing ok, so I'm not sure whether I helped him by fishing him out, or whether impeded his progress. In any case, he seemed to welcome the rest. You can see the gecko on my shoulder and our neighbour's beached dock just beyond.

And after all that paddling, a couple of brewskis! Corey's advertising a Peroni, an Italian brew that seems to go well with her caprese sandwiches.

Sunday, October 14, 2007

Message accepted for delivery

The white-on-blue xterm at right is what I've been staring at during my free moments these last couple of days. I've been trying to get my home Linux box to forward my email to our ISP but couldn't get sendmail configured properly. It's been a while since I looked at the sendmail config file and things have changed somewhat in version 8.14. Mainly there's been a lot of anti-spam stuff embedded, and rightly so. As a result, to get my Linux box to talk with the outgoing SMTP MTA I had to turn on authentication so that my sendmail could talk to the ISP's sendmail and pass on my email messages.

To get this to work, I had to turn on several things in my file, including:

  • define(`SMART_HOST', `smtp.your.provider')dnl: uncommenting this line to identify the outgoing SMTP host. This seems obvious but what wasn't was that it's really [smtp.your.provider] with the square brackets. Why are these needed I haven't a clue, but it seems to make all the difference.
    define(`confAUTH_MECHANISMS', `LOGIN PLAIN')dnl
    FEATURE(`authinfo', `hash -o /etc/mail/authinfo.db')dnl: turn on authentication, and provide the user id and password in the authinfo file. Ok, this too makes sense, except for the actual syntax of the authinfo file, which requires "M:LOGIN PLAIN". I had to go through countless google searches to find a web page that had provided this nugget.
  • Turn on masquerading: I'm not entirely sure whether this is necessary, however, I know that I'm sending out email from behind a router and that I think my ISP does reverse DNS lookups. Which I think means that sendmail should masquerade as the host whose IP will come back as the router's. This might sound kind of weird, but it also makes sense: the ISP needs to look up the IP of where it's getting a mail forwarding request, and so the host name in the request should match the IP address from where it's originating.
  • define(`confHELO_NAME', `')dnl: I'm not positive that this is necessary, but as all the other stuff it also seems to make sense. This defines the domain that my sendmail uses to say "hello" with to the ISP's sendmail. So again, this should match the IP address that the ISP is going to DNS lookup. With this I also added in lines that rewrite the sender's address to also come from this domain, using the genericstable db.
  • MAILER(local)dnl: this I think just allows sendmail to relay locally queued email, which, just like everything else, also makes sense.
All of the above configuration tweaks are logical in retrospect, but piecing together all of these ingredients took a bit of time and quite a bit of google searching. In addition to sendmail I also had to turn on the saslauthd service. This is something new from my perspective, but it is needed to encrypt the id/password that get sent to the ISP during authentication. All of this stuff just to circumvent spammers. Before these jerks came along, things were much simpler.

Eventually define(`confLOG_LEVEL', `20')dnl really helped me see what was going on at the SMTP protocol level: turning this on produces the verbose log that you see in the white-on-blue xterm. At one point I tried snooping on the ethernet port, but the increased debug level is really what I was after. This lets you see how the sendmail MTA (ISP side) and client (my side) communicate. After numerous "Deferred: Connection refused" messages, I finally got the "Message accepted for delivery" response I was after.

And why bother? You may well ask...this whole endeavour was prompted by the purchase of an UPS (Uninterrupted Power Supply) for the machine. The AE550 unit from Cyber Power Systems is basically a smart battery that provides power to the PC if the utility (AC power) goes down. Which for some strange reason is quite frequent around here. In the winter I can almost understand: our "ice storms" (South Carolina's variant of a snow storm I guess) weigh down the power lines causing them to snap. But in the summer? Too many A/C units running? Well, whatever the reason, power outages occur almost weekly it seems. And that's not good for computers. Sudden shutdowns leave the system in a bad state, potentially causing file loss and other nasty things. So it's best to shut down gracefully. Which is what the UPS allows. Not only does it allow those extra precious few minutes of up time during a power outage that you can use to shut down the machine manually, but the newer units also provide autonomous control. They do this by providing battery state information to the PC via serial or USB line. (This took a couple of days of configuration as well, btw, but eventually I got NUT compiled and properly configured.) This allows the machine to monitor its power draw and upon detecting that power is about to get cut off, it can now shut itself off without human intervention. Clever, no? Not only that, the above sendmail configuration also allows the machine to send me an email to let me know that it's about to shut itself off. Do I really need to know this? Nah, I guess not, but I think it's pretty cool! So now whenever I get an email from cyberpower_usb at my home domain name, I'll know that we've had yet another power outage out at the house.

Sunday, October 7, 2007

Of Ships and submarines

I forgot to post a blog about my trip down to Charleston, SC last week. Part of my trip included a tour of the Warren Lasch Conservation Center. That's where the Confederate submarine Hunley is being restored and studied. The Hunley was an 8-man sub that sunk circa 1864 after recording the first ever sinking of an enemy ship by a submarine on February 17 of the same year. The sub relied on manual propulsion, with the crew turning what resembled a large crankshaft connected to the screw. Off the Hunley's bow a long spar extended outward with an explosive charge attached to its barbed end. The idea was for the sub to approach an enemy vessel, ram it, and in doing so attach the explosive charge. Upon retreating, the crew of the Hunley would trigger the submerged charge rupturing a hole in the enemy vessel. That is how the USS Housatonic was sunk.

Above you can see an artist's rendition of the spar with the explosive charge attached to its forward end. On the right you can see the Hunley as it currently resides in its water tank at the Lasch Lab. The sub is considered as an archeological artifact, and is being studied in a forensic manner. It is not known how the sub sank. However, once located and recovered, human and other remains were found inside the sub. An excellent example is the well preserved gold watch belonging to Lieutenant George E. Dixon. Although I now forget what it says, the inscription on the watch is quite legible even today.

Meanwhile today the weather was quite nice, so we took the opportunity to board our own ship and take her out sailing. It was her maiden voyage on Lake Keowee, since we moved her earlier this year. The wind was variable, topping out at about 6 mph, so not much beyond a slight breeze (merely force 2 on the Beaufort scale). Still, it was nice to unfurl the sails and shake of the mud dawber nests that had accumulated over the summer. Lake Keowee, at least the section that we were on today, is much smaller than the big water of Lake Hartwell that we sailed on last year. As a result, it was much as predicted by the Big Water marina owner who moved our boat a few months ago: "It's all tack, tack, tack!" since there's no large bodies of water set sail on. So our first impression of Lake Keowee sailing is a bit confined, but we hope to explore it a bit more later this fall.