A 30-year-old man, accused of sodomising a minor boy here in 2009, has been sentenced to three years rigorous imprisonment by a Delhi court which held that unnatural sex between two persons is an offence "whether consensual or non-consensual".