Section 42. Judges, registers, judicial case managers, assistant judicial case managers, first assistant registers and assistant registers shall receive from the commonwealth their actual and proper traveling expenses incurred by them in the performance of their official duties in holding and attending court at a place other than that where the registry of probate is situated and any expenses actually incurred in transporting official papers from the registry of probate to another probate office within the same county for court purposes, upon an itemized statement of such expenses being certified to, and approved by, the chief justice, but a justice appointed to the probate and family court in Dukes county or Nantucket county shall receive his actual expenses for travel by land, sea or air from his residence on the mainland to such county and from such county to his residence on the mainland. The traveling expenses necessarily incurred by judges of probate sitting at the direction of the chief justice in counties other than the counties in which they are appointed shall be paid by the commonwealth, upon the certificate of the chief justice.