Former Secretary of State Colin Powell attempted to discourage Hillary Clinton and her team from using him as a scapegoat for her private email server problems, according to newly leaked emails from Powell’s Gmail account.

“Sad thing,” Powell wrote to one confidant, “HRC could have killed this two years ago by merely telling everyone honestly what she had done and not tie me to it.”

“I told her staff three times not to try that gambit. I had to throw a mini tantrum at a Hampton’s party to get their attention. She keeps tripping into these ‘character’ minefields,” Powell lamented. He noted that he had tried to settle the matter by meeting with Clinton aide Cheryl Mills in August.

Powell’s private messages were leaked by D.C. Leaks, an anonymously managed website that shares hacked emails from U.S. military and political figures. D.C. Leaks has a relationship with Guccifer 2.0, a hacker that many allege to have ties with Russian intelligence. D.C. Leaks provided access to Powell’s emails to a number of reporters on Tuesday.

The emails show Powell regularly corresponding with reporters and friends about the Clinton email server scandal, explaining that his situation was different. When Powell arrived at the State Department, the information technology system was badly dated, he argued. And unlike Clinton, Powell never set up a private server. Instead, he used his personal AOL account, on a server maintained by AOL, and used a government computer for classified communications.

“It is no secret that I used a unclassified personal email account in addition to my classified State computer,’” Powell wrote to the New York Times’ Amy Chozick. He implored the dozens of reporters and producers who emailed him to read his book, It Worked for Me: In Life and Leadership, in which he devoted an entire chapter to his efforts to revamp the State Department’s IT system.

The Clinton campaign’s effort to blur the lines between Clinton’s private email server and Powell’s AOL account left Powell deeply frustrated.

“They are going to dick up the legitimate and necessary use of emails with friggin record rules. I saw email more like a telephone than a cable machine,” Powell wrote last year to his business partner Jeffrey Leeds. “As long as the stuff is unclassified. I had a secure State.gov machine. Everything HRC touches she kind of screws up with hubris.”

Powell added in a tangential complaint: “I told you about the gig I lost at a University because she so overcharged them they came under heat and couldn’t any fees for awhile. I should send her a bill.”

Clinton sought Powell’s advice at a dinner on June 16, 2009 at former Secretary of State Madeleine Albright’s house, according to the emails. Powell gave Clinton “written guidance on why and how [he] had been doing it.” Also in attendance were former secretaries of state Condoleezza Rice, Lawrence Eagleburger, George Schultz, Warren Christopher, James Baker and Henry Kissinger.

“Dumb. She should have done a ‘Full Monty’ at the beginning,” Powell wrote. He added: “I warned her staff three times over the past two years not to try to connect it to me. I am not sure HRC even knew or understood what was going on in the basement.”