There is another citation to the USC covering weapons in a PO that IIRC refers to 'lawful purposes'. This is the citation that I recall being posted at the entrances to POs in SC.
18 USC 930
Sec. 930. Possession of firearms and dangerous weapons in
(a) Except as provided in subsection (d), whoever knowingly
possesses or causes to be present a firearm or other dangerous weapon in
a Federal facility (other than a Federal court facility), or attempts to
do so, shall be fined under this title or imprisoned not more than 1
year, or both.
[ ... ]
(d) Subsection (a) shall not apply to--
[ ... ]
(3) the lawful carrying of firearms or other dangerous weapons
in a Federal facility incident to hunting or other lawful purposes.