Based on the opening line in the letter;
"You can die pretending you'll earn back your soldier's honour, or you can do something with the skills that son of a b---- taught you."
The reason the bandit is said to have lost his honour is because he was one of the soldiers who participated in the Callier massacre. Which would make Thom Rainier the individual being negatively referred to, as he lead them and taught them their skills while they served in the Orlesian Army.
It would also explain why the bandits were so determined to go after Blackwall. Imagine after five years, you suddenly came face to face with the man who ruined your life, leaving you take the fall for his crimes while he disappeared... you'd naturally be a little ticked off.
In Trespasser, a non-Warden Blackwall mentions that before they calm down, people trying to kill him tends to be a running theme when he tracks down the surviving members of his old squad to apologise for what he did.
I thought it was pretty clear that the bandits were his former men - maybe not all of them but several. I thought that was the point of the letter.
It's heavily implied she did know and didn't care. I don't think codex entries reflect character knowledge - the perks do.
That is possible. It's also entirely possible only one of the bandit people knew who he was and thus knew about his lost honor. The possibility they wanted him to work with him and not only refused but also helped others stand up against them as well would be more than enough reason for the bandits to got after Thom/Blackwall in particular.
All right, let me see if I have this down.
At least one of the bandits -- we'll call him Bob -- in the Hinterlands sees Thom Ranier and recognizes him for who he is, having been one of Ranier's soldiers who participated in the Callier massacre. He then goes back and tells his buddy bandits about it: "OMFG I just saw the a-hole who made me resort to banditry. I want to cut his balls off!"
That's all fine and dandy. What I don't understand is that the tone of the letter sounds like the bandit leader is trying to convince Bob to continue on with banditry, hence the "or you can do something with the skills that SOB taught you" line in the letter. The letter seems to be addressed to someone, possibly Bob, other than Ranier since it is a statement ABOUT him, and not TO him.
Part of the reason I have always thought the letter odd is because "Blackwall" has been teaching the farmers and peasants some limited skills, so on a first pass, it almost sounds like the bandits are trying to recruit these folks. That is, until you take the "earn back your soldier's honor" remark, which makes that implausible.
Regarding Leliana, it has always seemed to me that she suspected that he wasn't who he said he was, but waited and watched to see how he behaved while conducting her own research. She never said anything since Blackwall behaved admirably as a member of the Inquisition, and that is all that mattered to her. IMO this is in-keeping with Leliana's attitude and philosophy during most of the game, until you resolve some things during her personal quest.
It's rather like the letter the Inquisitor gets for Dorian's romance quest. Dorian was seen arguing with a merchant. Leliana find this odd and conducts her own research to make sure that there is no suspicious activity, perhaps Dorian consulting with a Venatori spy, or something, and brings it to the attention of the Inquisitor only after her suspicions are allayed as a personal favor to him, since she has observed the closeness between the two.
Then again, considering her handling of both Solas's infiltration and Qunari infiltration (even worse if Bull remains with the Qun), perhaps she is just incompetent. 