This is what you need:
Photographer - Camera Exposure, White balance, Autofocus and Physical Lights - Coding / Released Scripts and Themes - Blender Artists Community
It’s an extremely useful addon, not only for matching the camera to the viewport. There are other nifty features. Highly recommended.