I'm not clear on where you were parked. Was the mailbox anywhere alongside of your car or not. If the mailbox was in front of or behind your vehicle it appears you were not in violation of the ordinance.

Generally speaking you are liable to comply with the laws/ordinances of where you are. If you are a resident of that community you have no defense of ignorance as you are expected to be aware of the Ordinances n