The Logan Act makes it a felony and provides for a prison sentence of up to three years for any American, without authority of the United States, to communicate with a foreign government in an effort to influence that governments behavior on any disputes or controversies with the United States.
Here is a HuffPo quote:
“Polls suggest most U.S. voters are much more concerned about the economy than the war. The proposed agreement could make Iraq even less of an issue this fall. Steve Elmendorf, a Washington lobbyist and former Democratic leadership aide in Congress, thinks that is unlikely, however.
“I don't think this gets the issue off the table,” he said. “Between now and Election Day, not a lot of troops are going to come home” even if the proposal is enacted.
“Most Americans want this thing to end,” Elmendorf said, and McCain “still talks of continued engagement.” Many Americans, he said, “will vote for who will get us out.”
“
http://www.huffingtonpost.com/2008/08/22/bush-administration-inks_n_120598.html
Here's a link to a lot more.
But the Obama argument will be that he IS part of the government, sits on the Senate Foreign Relations Committee, and thus has a legitimate responsibilty in "clarifying" and "exploring" issues with foreign governments.