§ 508.
If any officer, or other person, executing or aiding or assisting in the seizure of goods, under any Act providing for or regulating the collection of duties on imports or tonnage, is sued for anything done in virtue of the powers given thereby, or by virtue of a warrant granted by any judge, or justice, pursuant to law, he may plead the general issue and give such Act and the special matter in evidence.