An agreement for the payment, in money or other property, of a capital sum in settlement of all future claims to maintenance shall not be effective until it has been approved, with or without conditions, by the Court, but, when so approved, shall be good defence to any claim for maintenance.