Mass. R. Dom. Rel. P. Rule 12
Defenses and Objections --
When and How Presented -- by Pleading or Motion
(a) When Presented
(1) After service upon him of any pleading requiring a responsive pleading, a party shall serve such responsive pleading within 20 days unless otherwise directed by order of the court.
(2) The service of a motion permitted under this rule alters this period of time as follows, unless a different time is fixed by order of the court:
(i) if the court denies the motion or postpones its disposition until the trial on the merits, the responsive pleading shall be served within 10 days after notice of the court's action;
(ii) if the court grants a motion for a more definite statement, the responsive pleading shall be served within 10 days after the service of the more definite statement. Identical to Mass.R.Civ.P. 12(a).
(b) How Presented. Every defense, in law or fact, to a claim for relief in any pleading, whether a claim, counterclaim, cross-claim, or third-party claim, shall be asserted in the responsive pleading thereto if one is required, except that the following defenses may at the option of the pleader be made by motion:
(1) Lack of jurisdiction over the subject matter;
(2) Lack of jurisdiction over the person;
(3) Improper venue;
(4) Insufficiency of process;
(5) Insufficiency of service of process;
(6) Failure to state a claim upon which relief can be granted;
(7) Failure to join a party under Rule 19;
(8) Misnomer of a party;
(9) Pendency of a prior action in a court of the Commonwealth.
A motion making any of these defenses shall be made before pleading if a further pleading is permitted. No defense or objection is waived by being joined with one or more other defenses or objections in a responsive pleading or motion. If a pleading sets forth a claim for relief to which the adverse party is not required to serve a responsive pleading, he may assert at the trial any defense in law or fact to that claim for relief. If, on any motion asserting the defense numbered (6), to dismiss for failure of the pleading to state a claim upon which relief can be granted, matters outside the pleading are presented to and not excluded by the court, the motion shall be treated as one for summary judgment and disposed of as provided in Rule 56, and all parties shall be given reasonable opportunity to present all material made pertinent to such a motion by Rule 56. A motion, answer, or reply presenting the defense numbered (6) shall include a short, concise statement of the grounds on which such defense is based. Identical to Mass.R.Civ.P. 12(b).
(c) [Deleted]. (Motion for Judgment on the Pleadings.)
(d) Preliminary Hearings. The defenses specifically enumerated (1)-(9) in subdivision (b) of this rule, whether made in a pleading or by motion shall be heard and determined before trial on application of any party, unless the court orders that the hearing and determination thereof be deferred until the trial.
(e) Motion for More Definite Statement. If a pleading to which a responsive pleading is permitted is so vague or ambiguous that a party cannot reasonably be required to frame a responsive pleading, he may move for a more definite statement before interposing his responsive pleading. The motion shall point out the defects complained of and the details desired. If the motion is granted and the order of the court is not obeyed within 10 days after notice of the order or within such other time as the court may fix, the court may strike the pleading to which the motion was directed or make such order as it deems just. Identical to Mass.R.Civ.P. 12(e).
(f) Motion to Strike. Upon motion made by a party before responding to a pleading or, if no responsive pleading is permitted by these rules, upon motion made by a party within 20 days after the service of the pleading upon him or upon the court's own initiative at any time, the court may after hearing order stricken from any pleading any insufficient defense, or any redundant, immaterial, impertinent, or scandalous matter. Identical to Mass.R.Civ.P. 12(f).
(g) Consolidation of Defenses in Motion. A party who makes a motion under this rule may join with it any other motions herein provided for and then available to him. If a party makes a motion under this rule but omits therefrom any defense or objection then available to him which this rule permits to be raised by motion, he shall not thereafter make a motion based on the defense or objection so omitted.
(h) Waiver or Preservation of Certain Defenses.
(1) A defense of lack of jurisdiction over the person, improper venue, insufficiency of process, insufficiency of service of process, misnomer of a party, or pendency of a prior action is waived (A) if omitted from a motion in the circumstances described in subdivision (g), or (B) if it is neither made by motion under this rule nor included in a responsive pleading or an amendment thereof permitted by Rule 15(a) to be made as a matter of course.
(3) Whenever it appears by suggestion of a party or otherwise that the court lacks jurisdiction of the subject matter, the court shall dismiss the action.