How does the USPS Forwarding Service Work?

I am about to move to a new town within the state of Massachusetts. Obviously I have to fill out one of those change of address cards with the U.S. Postal Service. This will supposedly cause all my mail that has not had an address change to be forwarded to my new address. My question is: How does this work within the USPS system? I am having trouble imagining how they keep track of both my old and new address and know to forward from one to another. At what point in the system does the mail get intercepted and redirected to my new address? Is it the letter carrier that keeps track of this or is it done at the routing and distribution centers?

You fill out a change of address card and your local post office. Your address then gets marked in their mail-sorting gizmo. Anything with your name on it will have the address crossed out and a sticker with the forwarding address stuck onto it. It is then sent back out and to your new address. This is why it takes a long time to get mail that’s been forwarded. It must go through your old local post office. They keep the card on file for a set amount of time; I believe it’s one year.

It’s at least partly automated. My company sends letters and statements to customers. We are going to get software that will interface with the USPS database and tell us if any of our Name/Addresses have requested mail forwarding so we can update our information. Forwarding is actually a problem for us if the customer notifies the post office and fails to notify us. If we have the old address on file, the mail will be forwarded for a year. So, until we interface with USPS, we don’t know an address is bad right away.