Not based on location? How weird
This may be too abstract or mathematically "perfect" to capture the sort of real-world concerns of the postal service, but a quick bit of thinking suggests the following scheme...
Divide the code in two (like eircode) with district and "fine" location.
For the first part, create a Voronoi-like diagram showing each postal district. The distribution sites would be at the centre of each "cell". Assign random names to distribution site. Real-world concerns may mean that the shape of districts may need to be tweaked by hand, but they'll all end (as a collection) up being roughly circular.
For location within a district, use a code that encodes a vector from the distribution site to the address. This could be (x,y), angle + distance or something else. Going with the "something else" option, I'd use a hexagonal lattice (search for that text here) since it gets rid of sign bits and is easily extensible by adding more digits (possibly after a "decimal", or more accurately "hex", point).
Publish a database containing the list of postal districts: their GPS coordinates, the shape of their catchment area, their unique alphabetic codes and an integer value representing the "scale" to be used when calculating the "fine" address within that district (basically the degree of tessellation which corresponds with how many digits the second part of the address has to have). With this, anyone should be able (with some simple software) to generate a post code from their GPS coordinates.
Systems that encode as origin + offset vector can generate multiple valid postcodes for the same GPS location, but they can all be converted into canonical form (based at the correct destination routing centre) automatically.
It might be interesting to allow this in the postal system itself—since it's simple to convert into the canonical code, it wouldn't matter if someone decided to construct directions using the neighbouring (and presumably more desirable) postcode as their starting point. That might be an interesting approach to dealing with "postcode envy". To encode for this, the postcode format would have to include some bits to represent the scale of the base distribution cell (ie, the number of digits, which can be cross-checked against the database) and the number of digits actually included in the encoded address (which could be more or less than the official number of digits). The idea is that your "ruler" can be reconciled with the official one.
The same scheme might also be adopted by other users, and possibly tailored by referring to a different top-level Voronoi map (or cut down to just a list of centres of interest and radii).