In a nearly unanimous vote, the U.S. House of Representatives passed a bill Saturday designed to restrict ads and other unsolicited e-mails, known as spam.

Microsoft chairman Bill Gates hailed the move as "a milestone in the battle against spam, and a major step toward preserving e-mail as a powerful communication tool."

The bill, passed by a vote of 392-5, is similar to legislation already approved by the U.S. Senate last month.

With both halves of Congress now clearly in favour of trying to put a lid on spam, new federal rules could be in place before the end of the month. U.S. President George W. Bush's administration backs the measure. The House and Senate still have to settle minor differences between their separate bills.

Although some U.S. states have their own rules in place, these are the first federal restrictions against unwanted commercial e-mails. Regulators, however, have warned that laws are not enough. They argue that technology needs to improve to help consumers block spam.

Both bills would make it illegal for people or companies to disguise their identities when sending e-mails, or to try to mask spam with misleading subject lines or false return addresses.

The new rules would also prohibit compilation of spam mailing lists that are based on addresses lifted from websites. And people who send unsolicited commercial e-mail would have to make sure that recipients are given a straightforward way to decline future spam from the same source.

Penalties would range from fines to up to five years in prison in rare cases.

Many lawmakers in Washington believe people are fed up with the junk mail that regularly clogs inboxes. A lot of it is either fraudulent or pornographic. Critics of spam have said it threatens the future of e-mail.