They do not make decisions on your property. You have broken no laws. They have illegaly confiscated your property.
Here is what to do..
Write them a polite letter explaining that your air rifle is legaly held and was posted within their guidelines. Tell them that they have 48 hours to return it to you or else you will take legal proceedings. If you belong to a shooting organisation speak to them right away. I would also be speaking to my mp about this increasing practice at Royal Mail as what they are doing is illegal.
Pete.