A man is running from some people who have him under surveillance, and when he wants to send a letter he thinks they can see the address he wrote on the letter, so he writes a fake address and prints a differing postal code surreptitiously, by hand. This was many years before the invention of the Postal Bar Code, and it used dots instead of bars. But the UPS MaxiCode uses a two-dimensional square of dots, very similar to what was used in the story. Thus I think of this as a Heinlein story, one more "invention" ahead of his time.
You may be looking for Robert Heinlein's novella "Gulf".
Our hero is an agent working for the government (World, I think). He has just returned from the moon carrying vital evidence (film canisters, I think). After the sequence involving forging the destination codes and posting the evidence, the protagonist retires to a hotel, where he is easily and ellegantly captured by sinister forces working out of the building (to which he was directed by a plant at the port). He meets the arch villainess, and has to watch some poor innocent tortured to keep the vital secret. He gets some help busting out from a fellow prisoner who turns out to be running a secret society of supermen and women. Our hero is offered a place in this organization and trained in varied skills and arts.
In the end he and a partner undertake dangerous mission on the moon. The partner is a women he met and fell in love with.
And they die in the execution of the mission.