In the UK a magistrate is addressed as your Worship.
His/Her Excellency
The proper salutation for a retired General is "General (Retired)" or "General Smith (Retired)" when addressing them formally.
'Dear Mayor Smith' is acceptable for ordinary communication. 'Your Honor' is a more formal salutation. In Canada (and, I think, in Britain also) it might be better to use 'Your Worship.' (A mayor historically had the powers of a magistrate.) Check with the municipality's office of protocol when in doubt.
There is no general or standard salutation for an individual with a masters degree, like you would have with a doctorate degree. In other words, Dr. John Smith.
What is the proper salutation for a register of wills, e.g. Honorable John White?
If currently on active duty, the proper way is (rank)(last name). Example; Sergeant Jones, Major General Smith.
the correct salutation for two men is Messrs
Hello.
Your Honor
Chers Monsieur et Madame Consulat Général,
Dean actually is the proper salutation. One could say: Dean Redmond, would you please sign this form? Alternatively you could just use the Dr. salutation or the Professor salutation if those are appropriate, which they generally are.
The proper salutation for a doctor is doctor or professor depending on their title. In writing the short form can be used which will be Dr. or Prof.