The very first Congress, comprising many of the people who wrote the 4th amendment, passed a law allowing warrantless border searches.

According the text of the actual act[0] passed, the original intent was that a warrantless search was reasonable when there was suspicion of fraud with regards to the contents of goods being imported. Section 23 specifically mentions "on suspicion of fraud" and section 24 mentions "reason to suspect any goods, wares or merchandise subject to duty shall be concealed". It was not a blank allowance to search everyone at the border, particularly it did not allow for the searching of people leaving. Section 23 only mentions "after entry made of any goods, wares or merchandise". Since then, the this act has been expanded in to common law, and then expanded to allow for a general consideration of "reasonableness". Additionally, the act in section 23 specifically allowed for third party review of the search by requiring that the search be done with the oversight of "two or more reputable merchants". So yes, the first congress passed an act which allowed for limited warrantless border searches, but that doesn't tell the whole story since the scope of the authorized searches, and the warrantless border searches we have now are so far apart from each other.

Sec. 23. And be it further enacted,Collector, or other officer, suspecting fraud, may open and examine packages. That it shall be lawful for the collector, or other officer of the customs, after entry made of any goods, wares or merchandise, on suspicion of fraud, to open and examine, in the presence of two or more reputable merchants, any package or packages thereof, and if upon such examination they shall be found to agree with the entries, the officer making such seizure shall cause the same to be re-packed, and delivered to the owner or claimant forthwith, and the expense of such examination shall be paid by the collector, and allowed in the settlement of his accounts; but if any of the packages so examined be found to differ in their contents from the entry, and it shall appear that such difference hath been made with intention to defraud the revenue, then all the goods, wares or merchandise contained in such package or packages, shall be forfeited: Provided always, That if the owner or consignee of such goods as shall not be accompanied with the original invoice, should choose to wait the receipt of the invoice, in such case, the collector shall take into his possession all such goods, wares and merchandise, and store the same, at the expense and risk of the owner or consignee, until the invoice shall arrive, or until they agree to have the same valued.

Sec. 24. And be it further enacted,Goods subject to duty, and concealed, how to be searched for, seized, and secured. That every collector, naval officer and surveyor, or other person specially appointed by either of them for that purpose, shall have full power and authority, to enter any ship or vessel, in which they shall have reason to suspect any goods, wares or merchandise subject to duty shall be concealed; and therein to search for, seize, and secure any such goods, wares or merchandise; and if they shall have cause to suspect a concealment thereof, in any particular dwelling-house, store, building, or other place, they or either of them shall, upon application on oath or affirmation to any justice of the peace, be entitled to a warrant to enter such house, store, or other place (in the day time only) and there to search for such goods, and if any shall be found, to seize and secure the same for trial; and all such goods, wares and merchandise, on which the duties shall not have been paid or secured, shall be forfeited.

[0] - http://en.wikisource.org/wiki/United_States_Statutes_at_Larg... sections 23 and 24