Tag Archives: HowTo

Backing up an IMAP Mailbox using imapsync

A client of mine uses GoDaddy’s unlimited IMAP service to host their E-mail. This has been in place since before Gmail was the obvious solution so don’t give me crap about that. The client in question has a pretty high turnover rate and some of the turnovered are higher profile individuals for whom we need to keep their E-mail in case it needs to be later referenced.

For a long time the solution was to just not delete their accounts. Eventually I felt we had too many dangling unreferenced accounts though and wanted to find a way to clean things up. I picked an employee that was unlikely to turnover and explained to her that some new folders were going to show up in her top-level mailbox on her account. No need for alarm, it’s just the archives of the old employees. Enter the 1-liner:

imapsync --host1 imap.secureserver.net --user1 oldemployee@mail.com --password1 supersecretpass --user2 remainingemployee@mail.com --password2 supersecretpass2 --host2 imap.secureserver.net --regextrans2 's#(.*)#user_ark/$1#' 2>&1

This uses a tool called imapsync which is a yum installable on RedHat like systems using EPEL. Obviously some values need to be substituted. The interesting thing that took some figuring out was the regular expression to put in so that the user’s E-mail all ended up in a sub-folder of the remaining user’s account. I discovered I couldn’t put a period within the “user_ark” part which disappointed me. The imapsync program doesn’t seem to behave very well with regards to RegExs, I just took it in stride and achieved what I was able to. Before actually running the command it should be tested with a “–dry” flag so that no changes are made, the output is useful to find out if anything bad or harmful will come of the operation, or if it will even be successful.

On your production system you may find that the server uses a different seperator and/or prefix. This will cause your RegEx to change somewhat. Imapsync is self-documented well when ran without arguments, it just doesn’t behave very well, so experiment with that “–dry” flag before mangling your users’ Inboxes.

Hot Tub Repair

It’s easy to see that I have a fresh new website. My old one was neglected for a long time, then it went offline and needed to be replaced. Luckily I have the infrastructure here to do it right. Now all up to date with the most current WordPress (no thanks to EPEL) it’s time to backtrack and put the fun projects of recent history into words and photos.

When I bought the house in MN it was well understood that the hot tub was in need of repair. I was a bit frightened by that, but figured worst case I’d pay someone a few bucks to come haul it off if repairing it was beyond my capabilities. Come to find out repairing a hot tub isn’t so difficult.

Symptom: doesn’t hold water

I opened up the sides and kind of tracked where the leak was coming from. It was easy to find the wettest foam then just start digging that out until I reached the actual source of the leaky water. The below plenum was cracked right down the side, probably from freezing.imageI was confident seeing this. This appeared to be something I could handle, I was just now hoping that everything else worked well and there were no smaller/hidden leaks elsewhere that would be more difficult to repair, namely in the shell. I cut the piece out with my handy dandy cordless sawzall that I had already outfitted my garage with, it’s something I learned nobody should be without but left mine behind in AK for dad. Here is the broken piece, the crack can be clearly seen on the left hand side. A good eye can follow it all the way back across the section adjacent to where the tubes come out perpendicular to the plenum.imageAnd the remains inside the tub:imageI’m very glad that the plenum in question broke, you can see in the picture some other areas of tubing that are much more difficult to get to. Here I’ve started to reassemble, you can see the short coupling I had to create to deal with the loss of tube from cutting:imageMore of the same in the following picture, you can see that the pieces simply attach with PVC glue. Simple and effective:imageHere we are all reassembled and pumping water. Just had to get about 20 cans of great stuff and refill the void I left in the foam to insulate it. The hot tub now works great, holds its water and is a nice addition to the house. Next hot tub projects – replace weathered cover and repaint flaking plastic siding.

The parts were cheap and easy to walk in and out of at my local hot tub distribution place. They even suggested I go to Home Depot for the parts that could be sourced there cheaper than retail prices in-house.

Moral: don’t be afraid to take on hot tub repair even if you just have general handyman knowledge, it’s not rocket science. Continue reading Hot Tub Repair