Mr. John Doe, principal

I was taught that if the above were written as Principal John Doe then the opposite woudl also appply and it should be written as:

Mr. John Doe, Principal

It is a title, after all.