Single Judge bench of Gauhati High Court held, any agreement which is against public policy is void.
From Para 18,
Bulbuli Saikia Vs Jadav Saikia on 17 May 2022
18. In Ranjit Kaur (Supra), the Division Bench of Punjab and Haryana High Court held that maintenance is a statutory right, which the legislature has framed irrespective of nationality, cast or creed of the parties. The statutory liability under Section 125 is, therefore, distinct from the liability under any other law. Therefore, the statutory right of a wife of a maintenance cannot be bartered, done away with or negatived by the husband by setting up an agreement to the contrary. Such an agreement in addition to it being against public policy would also be against the clear intendment of this provision. Therefore, giving effect to an agreement, which overrides this provision of law, that is, Section 125 of Cr.P.C. would tantamount to not only giving recognition to something, which is opposed to public policy, but would also amount to negation of it. The law makes a clear distinction between a void and illegal agreement and void but legal agreement. It has also been held that an agreement by which the wife waived her right to claim maintenance would be a void agreement as against public policy.
Index is here.