The emails came morning and night, apparently unsolicited, often from the mayoral BlackBerry: messages from Mayor Bill de Blasio of New York, who styled himself as an emissary from the liberal left, to a presidential campaign trying to elect Hillary Clinton in what felt like a Bernie Sanders world.

Mr. de Blasio wanted to vent that Mrs. Clinton “totally blew” a question about mass incarceration at a Democratic primary debate with Mr. Sanders, a senator from Vermont (but praised her answer on gun control as “fantastic”). He wanted Mrs. Clinton to sign on to a forum on income inequality he planned to host for the presidential candidates in Iowa (none agreed to attend).

And he wanted Mrs. Clinton’s aides to know that, even if he was playing hard to get on his endorsement of her, he was already planning to tell Mr. Sanders that he would not be supporting him in the race.

In laying bare John D. Podesta’s inbox, the WikiLeaks founder Julian Assange has made no secret of his desire to reveal the deliberations of Mrs. Clinton’s campaign for the world to see. But the leak, dumped online in two waves this week, has also found at least one collateral target: Mr. de Blasio, whose cameo appearances in Mr. Podesta’s inbox offer a less-than-flattering look at the mayor’s attempts to make his presence felt in the presidential campaign.