There is no all-powerful President in Iran
This will be short and sweet because it'll be easy to disprove and most people already know about it. To complete the chain of errors that defined John McCain's foreign policy commentary last night, McCain treated the question of Iran as a question of Ahmadinejad. This is a short-sighted view. For the extent of the this entire campaign, the McCain campaign has painted the administration of Mahmoud Ahmadinejad as some sort of omni-escent tyrannical power who represents the Iranian people. This is absolutely false.
For all intents and purposes, the nation of Iran is a theocracy and the President only has power as long as they have the support of supreme leader. As explained by Foreign Affairs:
Of all of Iran's leaders since the country became the Islamic Republic in 1979, only Ayatollah Ruhollah Khomeini, the revolution's leader; Ali Akbar Hashemi Rafsanjani, Iran's president for much of the 1990s; and Khamenei have had defining influences. Despite all the attention he receives, Ahmadinejad does not even rank among Iran's top 100 leaders over the past 30 years. Khamenei supports Ahmadinejad immeasurably more than he did any of Ahmadinejad's predecessors, but Ahmadinejad is only as powerful as he is devoted to Khamenei and successful at advancing his aims. Khamenei's power is so great, in fact, that in 2004 the reformist Muhammad Khatami declared that the post of president, which he held at the time, had been reduced to a factotum. Blaming the country's main problems on Ahmadinejad not only overstates his influence; it inaccurately suggests that Iran's problems will go away when he does. More likely, especially regarding matters such as Iran's foreign policy, the situation will remain much the same as long as the structure of power that supports the supreme leader remains unchanged. (Foreign Affairs)
Essentially, the problem is not Ahmadinejad, the problem is the power of Ayatollah Khamenei and his aims. This is the problem that the next president must deal with - a nation whose political leader speak neither for his people nor the powers that be in his nation. This is both good and bad - good because the beliefs of Khamenei are not nearly as vitrolic as those of Ahmadinejad and bad because there is no way to wait out Ahmadinejad's presidency. As countries and people's, Iran and the US has sufficient paralell interests to form at least a cool partnership.
The next US president has an opportunity as growing economic unrest in Iran means that Ahmadinejad can serve as a scapegoat for these years of chill between Iran and the US and there is opportunity for dialogue. The only question is which of these candidates have the foresight to take this opportunity.