Six years ago, the future of the U.S. Postal Service was in doubt. Soaring mail rates had chased away many of its biggest users. The growth in electronic communication threatened to make conventional mail delivery obsolete. Congress seemed poised to snatch back some of the Postal Service's newfound independence. And thousands of postal employes were threatening an illegal strike in a bitter round of contract talks.

Enter the new postmaster general, William F. Bolger, the 64th successor to Benjamin Franklin. He warned that the Postal Service had clearly reached "a turning point" and that the nation's mail service monopoly either had to adapt or die.

Now the dapper, silver-haired Bolger is about to leave office after shepherding the agency through several often tumultuous years. In an interview in his 10th-floor office at L'Enfant Plaza, Bolger reflected on a tenure that he clearly believes made the service more efficient, more productive, more automated, and for the first time, wallowing in budget surpluses.

"We're working a lot smarter than we were in 1978," he said. "Not necessarily our employes working any faster, although some are, but we're working a lot smarter than we were back then." He cites figures on increased productivity and budget surpluses for an agency that once had to rely on government subsidies.

"If I had to narrow it down to one thing that I feel good about," he said, "the people in the Postal Service feel better about themselves and the institution. And they're displaying that by giving better service, more courteous service."

Some of the changes have not been without costs and controversy. The agency's venture into electronic mail was criticized by the Justice Department and the Federal Trade Commission, which charged that monopoly revenue from the first-class mail service was subsidizing the money-losing electronic mail service. The attempt to hold down employe wages has increased the rancor between labor and management. And the budget surpluses came after some controversial increases in the price of stamps.

But recently, Bolger's most frustrating battles have been not with unions or the FTC or even the Postal Rate Commission. Rather, Bolger has been sparring with the Reagan-controlled Postal Service board of governors, traditionally a rubber-stamp body. Since 1983, it has asserted itself with a vengeance in internal management decisions.

Some sources who know Bolger said privately that his increasingly frequent run-ins with the board led to his decision to quit this year, at the age of 61, after 43 years with the agency.

"I'm convinced he is retiring because he saw the handwriting on the wall," said one longtime colleague. "He and his predecessors were used to running the Postal Service as they chose . . . . But about two years ago, the composition of the board of governors started to change with the Reagan appointees. They were much more opinionated, much more ideological and much more interested in being a real board of governors."

But Bolger, who will join the Washington public relations firm of Gray & Co. next month, leaves with no unkind words for the postal board. He praised the board as a much-needed "buffer" between the mail service and the politicians. "The board is the institution that keeps us away from partisan politics," he said.

In Bolger's own view, one of his major successes over the past six years has been to bring the Postal Service's finances into the black. "Our capital investments are sizable," he said. "Over the next five years as I see it, they'll be over a billion dollars a year. And we're not borrowing money."

But to some critics, including many veteran Postal Service observers here, Bolger's self-described success is also his biggest failing. The budget surpluses, they say, are proof that the stamp price increases -- from 15 cents for a first-class stamp in 1978 to 20 cents today -- were unnecessary. Said Van H. Seagraves, publisher of the Business Mailers Review, "If you've got a monopoly, you don't have to be a genius to make a profit."

Some say Bolger pushed vigorously for the rate increases as a way to boost the surpluses and thus his own image as the Postal Service's savior.

That view reflects the differing, often conflicting attitudes toward Bolger voiced by postal workers, union leaders, congressional aides and others. Almost everyone agrees that he is a genuinely personable man and a formidable public speaker with an easy manner that has allowed him to forge close, personal relationships, particularly with individual members of Congress. But there the consensus ends.

To his many supporters, he is a sympathetic figure and a management whiz who is leaving reluctantly after losing key battles with a newly assertive board. To some, he is the mailhandlers' Cassandra, using prophecies of projected deficits to justify unnecessary rate increases in 1981 and again last year. And to more vocal critics, he is the mail service's version of Louis XVI, the clerk-turned-absolute-monarch who has grown heady with power and its excesses as he wings about the country in a private jet and rubs elbows with the Washington elite.

Said one postal consultant here, "He learned that if you raised the rate higher than it needed to be, you could get an enormous surplus and widespread public acclaim. He was involved in a genuine self-deification effort."

Seagraves, who is a retired postal worker, said, "He had an intense desire to be recognized and to get attention. He flies all over the country for commemoration ceremonies. He's willing to work 16-hour days, but the other, darker side of the coin is that he's so hungry for recognition he can't resist standing before a group and receiving some kind of acclaim."

Bolger's tenure has clearly propelled him into a kind of celebrity status. He is on the board of directors of the Wolf Trap Foundation. He proudly displays to a visitor the highest civilian medal awarded by the Defense Deptartment, which he received for improving mail delivery to servicemen. And he casually mentions the time he "once told Johnny Carson how we both make a pretty good living out of the post office." Mail service is frequently the butt of Carson jokes.

Still, Bolger insists he has not forgotten how he started in 1941, on the lower rungs of the postal bureaucracy. He points out that he has probably made more trips to the field than any of his recent predecessors -- although no other postmaster general had the benefit of a Cessna Citation 2 jet purchased at his request.

When asked to point to his biggest disappointment or failure of his tenure, Bolger immediately replied, "I wish I had more success in establishing a better climate in the labor relations field." The second disappointment, by his own account, has been the slow pace of automation, although he quickly adds, "We're on our way now."

In a sense, the labor disputes underscore the conflicting demands that confront any postmaster general, who is the chief operating officer for the nation's largest unionized employer. A postal job has traditionally been considered a secure, high-paid position, with good fringe benefits. But the Postal Service is also a business in a field that has become increasingly competitive.

That conflict is particularly poignant for Bolger, a former clerk in the post office's finance bureau who worked his way up through the ranks. He remembers his days as a manager in the northeastern United States, when regional post offices had a 25 percent turnover rate because the pay was so low compared to the private sector. Now, the concept of "pay comparability" has become another way of calling for a cut in postal workers' pay, rather than an increase.

Of contract talks, Bolger said, "From the beginning, whether it was 1978, 1981 or 1984, I recognized two things: I not only had to be fair to the public, which pays all of our expenses, but I had to be fair to the postal employes."

Postal union officials disagree that Bolger has been fair. They say his approach in contract talks has been unnecessarily tough, particularly this year with the agency's proposal to pay new employes about 23 percent less than current workers. They also think Bolger could have eased the tensions if he had gotten more directly involved in the talks. But there is still a grudging respect for him.

"I would characterize our relationship with Bolger as a typical relationship between a union representing the workers and a boss representing concerns which are broader than that," said one postal union spokesman, who asked not to be quoted by name. "People credit him with shepherding the Postal Service through difficult times, and you have to give the devil his due. Labor relations could have been better -- but they always could be better."

Bolger said he hopes his successor has better luck in easing some of the labor tensions. Asked what other advice he would give, Bolger said, "Keep the ball game going, frankly. There are some things that need changing from time to time, but as the old adage goes, 'If it ain't broke, don't fix it.' "

"I once had some advice from a wise old person," he added, "that said no matter how far you go up the ladder, every once and a while make sure you go down to that bottom rung and see what's going on."