The threat of an illegal mail strike grew yesterday as two more postal unions rejected a proposed new contract and the government asked a federal judge to block a walkout.

U.S. District Court Judge John Pratt refused to grant an immediate order against a strike but said he "won't delay" in issuing one if there is a breakdown in talks that began late yesterday between the Postal Service and union leaders.

It was not immediately clear whether the talks constitute a resumption of contract bargaining, which the unions are saying must start if a nationwide mail shutdown is to be averted next week.

A Postal Service spokesman refused to describe the discussions, which are under the auspices of chief federal mediator Wayne L. Horvitz, as "bargaining." But he said union lawyers described them that way in court.

One of the unions that rejected the contract yesterday was the American Postal Workers Union, the largest of four that negotiated a tentative new three-year pact with the Postal Service last month.

The APWU, which represents 300,000 of the more than 500,000 unionized postal workers, voted 94,400 to 78,487 against the contract - roughly the same margin by which the National Association of Letter Carriers, the second largest union, turned down the pact earlier in the week.

The smaller Mailhandlers Division of the Laborers International disclosed late yesterday that it, too, had rejected the pact.

In the Rural Letter Carriers Association, with 38,000 members, local union officers will vote later in the month.

While meeting the unions' major demand for a continuation of their layoffs clause, the contract provided for wage and cost-of-living increases of 19.5 percent over three years - considerably less than 30-plus percent pattern established by other large unions in recent months.

Thus the contract went a long way toward meeting the Carter administration's anti-inflation targets - but at the risk of a rank-and-file rebellion and a nationwide mail shutdown.

Postal Service contingency plans to call for handling of the mails by federal troops and for curtailed service.

Troops delivered the mail in 1970 when about 200,000 postal workers struck briefly, mainly in East Coast cities. There have been no postal strikes since.

Although postal strikes are illegal under federal law, officers of both the APWU and the NALC have been ordered by their national conventions to call a strike if the Postal Service refuses to resume negotiations within five days after a contract rejection vote.

The five days runs out for the NALC late Monday and for the APWU late Wednesday.

At a press conference to announce the APWU vote, the union's president, Emmet Andrews, joined NALC President Joseph Vacca in calling on the Postal Service to return to the bargaining table or, he put it, "face the consequences."

He noted that the APWU convention recently imposed the five-day strike deadline and added: "I can tell you I have every intention of fulfilling that mandate."

Postmaster General William F. Bolger, who is on vacation out the city, issued a statement after the APWU vote describing the situation as "serious." But he gave no indication that the Postal Service would meet the unions' demand for a new round of bargaining, which he has steadfastly rejected in the past on grounds that the contract should now go to arbitration.

He didn't close the door on more bargaining, however.

"Despite the outcome of the votes of the two largest postal unions, a peaceful way still exists to settle this dispute, and I hope the workers who have rejected to the contract will also reject any call to rash and illegale action," said Bolger.

After a brief session with Postal Service and union representatives, mediator Horvitz said he was urging management representatives to abandon their no-bargaining stance.

The afternoon session was disrupted by a false-alarm bomb threat at the Federal Mediation and Conciliation Service offices on K Street NW.

The average postal worker now earns $15,877 a year, and the rejected contract would raised this to roughly $19,000. Union officials have said a major problem was that the first-year increase was limited to 2 percent plus cost-of-living adjustments, presumably a gesture to the Carter administration's anti-inflation fight.