-
Curse Pentax!
I have a Pentax Optio S5i digital camera that I think is great. However, the one huge flaw in it; it uses some wacky USB cable that isn't the standard mini USB. Today my wife wanted to transfer pictures and it took me over 2 hours to find the stupid cable. I have tons of mini USB cables, but only one that fits the Pentax. My wife was able to transfer the images using a card reader, but the OCD part of me needed to find the cable. If it was just a mini USB cable, any old cable would have done and I wouldn't have cared. What is wrong with standards? I'm happy that Motorola is moving to mini USB on their cell phones for both charging and data...if I lose the cable, no big deal.
-
Bulk Email Program in a flash
I decided to put my ReceiptWallet program on MacZOT! to give it some extra marketing and see how things go. While (obviously) I won't make as much as if I sold it directly, I'm expanding my customer base. As part of this, I had to implement some new systems in order to handle the orders as MacZOT! gives me a CSV file of orders that I download, insert the serial numbers, re-upload, and then have to send out the orders. I have a MySQL database and php frontend that I use for my normal orders and that works quite well. So I had to figure out the MySQL syntax (I'm still learning it) to import the CSV file into my database as a first step. That wasn't too difficult, but required a bunch of trial and error. The next part was, "how am I going to send out the registration codes?". The normal answer would be to write a script to do this. For some reason, I really hate scripting because I'm not familiar with the syntax (AppleScript, perl, php, etc.), so it takes a lot of time to get a working script. So, I decided to write my own "bulk email" program. No, this is not a spamming program. It's a program that takes the CSV file and a message and customizes each message with info from the CSV file. So, using the Message Framework built into OS X, I was able to whip up the program in about an hour. I even made it so that the fields can be customized and the program can be re-used for when I send out update information or the like. I really should learn some of the scripting languages, but sometimes the quick and dirty way is the way to go.
-
The flip side of spam
The other day my wife asked me what the following meant in an email:
----- The following addresses had permanent fatal errors -----
(reason: 554-: (RLY:CH) http://postmaster.info.aol.com/errors/554rlych.html) Hmmm...I started looking and it appears that AOL had decided to block all email originating from my server's IP address. After a bit of research, it appears that instead of unsubscribing from mailing lists, users have been hitting the "This is spam" button in AOL. After a number of these, AOL automatically blocks email. So, I turned off all email lists that I run (except for 1) and won't turn on more in the future. I then called AOL (you have to actually call them and request to be unblocked). As my wife sends email to AOL all the time and the one mailing list I'm keeping has AOL email addresses, I had to find a workaround. I have 5 static IP addresses, so I thought that if I could rewrite the headers for all outbound traffic going to AOL to use a different IP address, I could get around the block until AOL lifted it. I series of iptables rules did the trick:
-A POSTROUTING -p tcp --dport 25 -o eth0 -d 64.12.137.184 -j SNAT --to x.x.x.x
Where the first address is one of AOL's email servers (I did this for all their servers listed as MX hosts) and the second is my alternate IP address.
Excellent, problem diverted. Well, AOL said that the block would be lifted in 48 hours; that was Monday evening. It's now Friday and the block finally got lifted, so I was able to remove my workaround.
Lessons learned: 1) avoid running mailing lists for people that don't have a clue and 2) sign up with AOL's Feedback Loop so that you get notified each time a user reports your email as spam so you can head this off before it becomes a problem.
Sometimes running my own server is a lot more trouble than it is worth.
-
CPU Cooling...it actually does something!
My saga this week has been that my server has been quite unstable and would lock up at seemingly random times. My first attempt to fix it was replacing the power supply; Monday morning, I noticed my server was completely off and it wouldn't power up, so I yank 2 of the 3 hard drives from it and it started. The conclusion (which I now believe was wrong) was that the power supply couldn't handle the 3 drives. So, I replaced it with a high efficiency one that is supposed to be quiet. Tuesday I still had problems and they seemed related to when I used one of my backup hard drives. So, I replaced the drive (which wasn't a bad thing as it was left over from my old server). I also figured out how to finally get lm-sensors to work with my motherboard. I spent time over the last year trying to get it to work, but to no avail. One of the things I was curious about was the temperature of the CPU and case. Now that lm-sensors was working, I had this information. When I looked at the CPU temperature, it ranged from 50-80 degrees Celsius. This indicated to me that there was a problem as I read that the Pentium 4 chip I have should usually be below 40 degrees Celsius. Things started clicking...the times when the system froze were when I was backing up to my secondary drive; my backups use rsync and tar/gzip, both mechanisms are very processor intensive. So it was looking like when the processor got hit hard, the temperature on it rose and the system froze. Ah ha! I may have found the cause. So another trip to Fry's to pick up a new CPU Cooler, new case fan and new hard drive cable (for good measure). I put everything in and almost fell over when I saw the temperature. It was ranging from 15 to 25 degrees Celsius! Under maximum CPU load (during my backup), it wasn't getting above 25 degrees Celsius and hasn't locked up, yet (knock on wood). I ended up getting a Cooler Master Hyper L3 as it looked like it would fit (my case has an airflow vent on top of the CPU and some of the coolers are way too big) and the heat pipe technology seems to make sense.
Hopefully all this work will actually solve this issue.