On the upside, my front teeth look better. A couple of years of sucking down 2 liter Mountain Dews every day does have it's consequences. However, due to the sensitivity of the nerves in the the front of my face... owwwwww.

Novacaine is a good thing. Until it wears off.

fun with vi

Normally I use vim for my editing needs. However there are times when vim is not available. No big deal, I can use vi. But one of the things that I use in vim is the ability to have tabs represented as spaces. After much trial and error, I finally have a way to do this in vi!

This is what I stuck in my .exrc

" convert tabs to spaces using expand(1)
map #t 1G!Gexpand -t 4^M

Now I just have to hit '#t' to convert all the tabs to 4 spaces.

email again

It has been a couple of weeks since the last drastic change to my email habits.

Instead of leaving everything on the IMAP servers, I have decided to pull all of my email down to my local home server running Ubuntu.

mutt, still the best email client

I am still using mutt and have published my muttrc for others to be able to use. One of the things that I have changed is that instead of using a global Sent folder, email for family/friends/clients gets saved in the same folder that I save all of thier incoming mails. This makes using a threading view of the mailbox make sense and also gives me one place to go to see if I have responded to thier email or taken whatever action needed to be done. Which should help me actually respond to emails in a timely manner.


To pull my mail off of the IMAP servers, I am using fetchmail. The only wish I have for this at the moment is that it would handle multipe IMAP accounts and the 'idle' command.


To pre-sort my email, I am using maildrop. In the past I have used procmail and a perl script using the Mail::Audit package. Maildrops syntax and ease of were big wins for me this time around.

One of the last things that happens before an email is dropped into an Inbox (not a mailing list folder), is that I run the message through lbdb to grab the email addresses, which I can then query using the 'Q' key inside mutt.

if ( $SIZE < 10000 )
    cc "|lbdb-fetchaddr"


I first ran across archivemail when I was looking for a solution for some of my clients that never emptied thier Spam or Trash folders, thus going over quota for email. Since then I have started to use it for archiving mailing lists and deleting old mail out of my own Spam and Trash folders.

I have 2 cronjobs that run every hour to automatically clean up Trash and Spam:

@hourly /usr/bin/archivemail -q -d 15 /home/mharlow/Maildir/.Spam
@hourly /usr/bin/archivemail -q -d 15 /home/mharlow/Maildir/.Trash

These delete anything older than 15 days from these two folders.

wrap up

All in all this seems to be working for me, mutt working against a local Maildir is MUCH faster than going over IMAP. Having my mail presorted again means that I can have mailing lists locally instead of using gmail for all of them. I have found that I do not check my gmail account except every couple of weeks, so while it may be great for archiving lists, it does not work so well for reading them. This also makes burning a CD backup of my mail easier, since everything is local.

So, how long until I make another drastic change to the way I handle my email? Who knows, but when I do, I will probably blog about it. :)

electric cars and stuff

You know... I try to do my part for the environment, I walk to the corner store instead of driving, we replaced all of the light bulbs with energy efficient ones. Then I watch something like 'An Inconvenient Truth' and 'Who Killed the Electric Car'. And I realize that I need and should do more.

markdown formatting

I have been writing my blog posts in nanoblogger using RAW formatting, which means that I have had to do all the XHTML magic myself.
This has gotten to be a bit annoying, so I have decided to give markdown a shot.
In the past I have used textile when my website was built using webmake. But that felt like learning a whole new markup language instead of learning a short-hand.

random passwords

In my quest to make my life easier and at the same time find clever ways to do things, I have run across a neat way to generate random passwords.

After seeing this post I wrote genpass.sh.

Before I have used utilities like makepasswd and passgen.pl by Andrew 'Skinny' Thompson.

What I liked about the foolab.org version was that it was very portable. It uses /dev/urandom to get the random bits and then uses standard *nix tools to turn it into a password.

The bit that does most of the work in the genpass.sh script is:

( dd if=/dev/urandom count=200 bs=1 2>/dev/null |
tr '\n' ' ' ; echo ) |
sed 's/[^a-kmnp-zA-HJ-NP-Z2-9|\+=@#$%^&*()]//g' |
cut -c-"${length}"

The sed statement strips out commonly misread characters, o, O, 0, l, I, 1.

genpass.sh has been tested on Debian 3.1, Ubuntu 6.10, FreeBSD 6.2 and Solaris 9.


After thinking about it some more, and looking at the results of my previous iptables setup, I switched to Fail2Ban.<

The main reason for the switch is the versatility. On some boxes I want a permanent ban for failed logins as only admin staff has logins. I want to be able to ban on failed ftp logins. And one day, I may want to ban on failed http auth.

Ahh the joys of having a server on the public 'net.

New soap

The other day while shopping, I saw some glycerin shaving soap on the shelf. So I bought it. And I liked it.

One of the main reasons that I switched to a Merkur safety razor was because of the condition my face would be in after shaving with a Mach3, basically raw and very very sore.

The Merkur combined with some glycerin soap appears to be the icing on the cake. Who knows, I may even be able to shave everyday again.

Hmmmm... Chai.

A couple of weekends ago I had to go to Seattle, WA for business. While there I stayed with Nomad, who showed me some of the sights in Seattle.

He also took me to Trabant Chai Lounge, thus introducing me to chai. I am not sure if that is a good thing or not. Unfortunately, there does not appear to be an equivalent place in Madison, WI.

I may have to order some chai from Kataluma Chai Company, Inc... now if only I can figure out what the recipe is for 'Mexican Holiday'.