Fake policeman sentenced to prison