>I thought this code but one can have problems if
Usually, postal offices can make a CD available for a low cost which could be use for such validation. Other than that, by applying a basic logic, it would fit most of your needs but you will always end up with a certain low percentage of processes which shouldn't have occured and processes that should have occured.
I have been working in that area for about four years and this is what we used. Handling mailing lists and related issues has almost became an art. :) For example, in Canada, there is a certain way of printing a mailing address on an enveloppe when we do a massive mailing list. By doing it like that, it eases certain processes of the postal office workers.
But, by using pre-defined words as you did in your code, you would obtain something close to what you are looking. You can always enhance that whenever you'll discover new processes that should be included in your code in order to take care of additional conditions.