CodePoint Open has been freely available for a number of years. It doesn't include delivery endpoints but for geolocating English, Scottish and Welsh (but, alas, not Northern Irish) postcodes it's fine.
Unfortunately we lost the postcode database as a public asset in 2013 when the UK government sold off Royal Mail[0], despite the database being compiled at huge cost to the tax payer.
This is a real shame as people had to campaign for years before the data was made freely available to begin with.[1]
Hopefully though, as long as the government still holds a large stake, we'll at least have Code Point. The Royal Mail also offer some developer options[2]
http://www.ordnancesurvey.co.uk/business-and-government/prod...