Neglecting History

shockme on 2002-10-01T20:45:38

Recently I was given the task of updating our sendmail virtusertable with about 1,000 new entries. No biggie, right? Wrong.

The format of the virtusertable is:

address@anywhere.com forward.address@local.com

Pretty basic stuff. Tab or whitespace delimited, and the address@anywhere.com must be unique within the file.

At some point in the past, many of these 1,000 people were entered with invalid forwarding addresses. It never caused any problems, because no one ever sent email to the addresses. So, some of the entries were good (aka unique), and some bad (aka duplicative)..

I hacked together a quick group of scripts to add the unique entries, remove the duplicates, etc. However, today I discovered that although I had removed the duplicates, I hadn't replaced the duplicates.

So, it looks like I get to walk through the code again tomorrow. *sigh* This is why I despise quick hacks. They always take more time than doing The Right Thing.

Sometimes I'm just too smart for my own good. No, that's very incorrect. Sometimes I think I'm smart enough to neglect history. As it's been said (by Dave Barry, I believe):

There's a lot we should be able to learn from history. And yet history proves that we never do. In fact, the main lesson of history is that we never learn the lessons of history. This makes us look so stupid that few people care to read it. They'd rather not be reminded. Any good history book is mainly just a long list of mistakes, complete with names and dates. It's very embarrassing.

Aptly put.


why not try using

hfb on 2002-10-02T05:01:04

the .REDIRECT feature as it lets people know that they need to update their adress book instead of silently forwarding it to the new address. I used to manage a system with 12k users where the dean made us give a 1 year grace period to students who graduated or left then a 6 month period of the redirect. A database is perfect for this sort of thing which can rebuild those tedious files every night and eliminate dupes :)

Re:why not try using

shockme on 2002-10-02T13:43:34

Because the sendmail server fowards the email to one of several different Exchange servers, which is where all of the accounts are actually located.

Why do we have a sendmail frontend? Because no one has the cajones to place the Exchange servers outside the firewall. Why not just use the sendmail server? Well ... that's the $64,000 question ...