An Indian court Monday sentenced a school principal to 17 years in jail over the death of 23 pupils who were served a free meal laced with pesticide, a prosecutor said.