The traditional way of re-directing mail is to sort it as normal but to ensure that the postman at your old address (or the person who fills his sack) is aware that a redirection order is in place. The postman (or his colleague in the sorting office) should then ensure that your mail is withdrawn from the delivery, and re-addressed to your new location.
However, if the automated sorting machinery (which is now used throughout the country) is linked to a common database, it ought to be possible to re-route your mail at a much earlier stage. As soon as mail reaches a principal sorting office, the address is read and the mail is electronically labelled with the full postcode for your address. (The full code includes the house number or name. So, if you live at 23 Acacia Avenue, Sometown, ST1 2AB, your full postcode is 23ST12AB, which uniquely identifies where you live). It would be perfectly possible for the machinery to automatically withdraw any postal item where the central database indicated that a redirection order was in force for that address. A sorter could then access the database to see if the addressee was the former occupant (for whom mail should be redirected) or the new occupant (to whom the mail should still be delivered).
Chris