In the finale of Series 8, Brigadier Alistair Lethbridge-Stewart's daughter Kate mentions that it had always been her father's wish that the Doctor would return his salute. Towards the end of the episode,
a Cyberman, presumably reanimated from the Brigadier's corpse, receives said salute from the twelfth Doctor.
The modern Doctor's disdain for salutes is well known. What surprises me, however, is that the third doctor, who had the most extensive relationship with the Brigadier, never returned a salute. While the Doctor was always disdainful of military customs, he was always polite as well.
Unfortunately, it's been a long time since I've seen the Pertwee era stuff. But for those who obsess, is there any off-handed return of a salute just to be polite from Pertwee or any of the other earlier Doctors?