Two years ago, Iran's second most powerful leader, speaker of parliament Hashemi Rafsanjani, sent a trusted personal envoy to Washington to reopen a dialogue. The envoy, his nephew Ali Hashemi, carried a secret, four-point message that may have even more meaning today, when the aged Ayatollah Khomeini reportedly is faltering and Rafsanjani is gaining power.

An official ''Memorandum of Conversation,'' which has been withheld from the public, details the conversation between Hashemi and Lt. Col. Oliver North, currently facing charges in the Iran-contra conspiracy case. The memo outlines Hashemi's four points, which might yet become a basis for reestablishing ties with revolutionary Iran.

Ali Hashemi led off with a truculent proposal. ''Responsible officials consider that Iran and the United States need to cooperate in opposing the Soviets in Afghanistan,'' he said. ''One of the Iranian leaders, in particular, has asked that I make this message very clear. With cooperation between Iran and the United States, we can make Afghanistan a Soviet graveyard and teach them a lesson so that they will no longer be able to interfere in Islamic countries.''

''Iran needs U.S. influence with the Arab countries friendly to the United States in order to diminish support for Iraq,'' said the nephew. Then he offered a startling concession: ''Iran has also recognized the need for a U.S. presence in the region. By this, {we} mean even a military presence.''

The third issue was oil. In the words of the memo, ''They {the Iranians} think that the U.S. object with respect to the price of oil is the same as that of Iran, that is to say, the United States favored a slight increase in the price of oil and stabilization in the price of oil.''

Hashemi described the fourth issue, the security of the Persian Gulf, as the ''most important.'' He said Iran understands U.S. concern over ''a flood of terrorism in the region.'' He insisted that ''the Shia religion, under the Ayatollah, is absolutely opposed to terrorism and the taking of hostages.'' He acknowledged that ''there are people in Iran who do espouse hostage taking and terrorism'' but pleaded that ''Iran still does not have strong, effective control'' over these extremists.

The back channel to Rafsanjani was opened by retired Air Force general Richard Secord, also a defendant in the Iran-contra affair, who met the nephew in Brussels and arranged his secret flight to Washington.

According to the memo, North, who was then on the National Security Council staff, cited the Soviets' ''naked aggression'' against Afghanistan and warned: ''We are concerned that they could do the same thing in Iran.'' But he assured Hashemi that ''the United States is no longer afraid to use its power. . . . It is not intimidated by the Soviets.''

Hashemi praised the analysis Secord had presented in Brussels of the Iran-Iraq war, which, he said, ''was keenly received by the leadership of Iran.'' Then he declared bluntly, ''Iran needs a victory.'' Later, he explained that this need not be ''a big, decisive military victory, but some kind of victory.''

North then confided, ''It is important that you relate to the leadership that, based on very sensitive intelligence, the Soviets will not let Iraq lose the war. The Soviets have an agreement with Iraq to this effect.'' He quickly added that ''the United States does not wish to see Iran lose,'' but that ''we do not want to see an {Iranian} attempt against Iraq which will bring in the Soviets actively.''

Hashemi suggested that Iran would end the war against Iraq if its ruler, Saddam Hussein, could be removed.

North agreed there was ''a need for a non-hostile regime in Baghdad,'' but would make ''no commitment about getting rid of Saddam Hussein.'' He said that the United States had a ''responsible and sincere wish'' to reestablish a relationship with Iran and reduce tensions in the Persian Gulf. ''But there is a perception,'' he said, ''that Iran has used revolutionary Islam against the United States. For example, it is clear that some in the government of Iran have encouraged the taking of hostages."

The secret memo summarizes Hashemi's response: ''He wants to keep focused on the hostage issue and to get it resolved as quickly as possible. He is content he can resolve it.''