Actions on mortgage notes, whether witnessed or not, or on other obligations to pay a debt secured by mortgage of real estate, to recover judgments for deficiencies after foreclosure by sale under a power contained in the mortgage, and actions on such notes or other obligations which are subject to a prior mortgage, to recover the amount due thereon after the foreclosure by sale of such prior mortgage under power contained therein, shall, except as hereinafter provided, be commenced within two years after the date of the foreclosure sale or, if the principal of the note or other obligation does not become payable until after the foreclosure sale, then within two years after the time when the cause of action for the principal accrues.
Such actions in cases where the foreclosure sale shall have occurred or the cause of action shall have accrued prior to January first, nineteen hundred and forty-six shall be commenced within two years after said date. Nothing in this section shall extend any other period of limitation.
Mass. Gen. Laws ch. 244, § 17A