Section 3. (a) Before any unauthorized foreign or alien insurer shall file or cause to be filed any pleading other than a plea in bar, in abatement, to the jurisdiction, or a motion to dismiss in any action, suit or proceeding instituted against it, such unauthorized insurer shall either (1) deposit with the clerk of the court in which such action, suit or proceeding is pending, cash or securities, or file with such clerk a bond with good and sufficient sureties, to be approved by the court, in an amount to be fixed by the court sufficient to secure the payment of any final judgment which may be rendered in such action; provided, however, that the court may in its discretion make an order dispensing with such deposit or bond where the insurer makes a showing satisfactory to such court that it maintains in a state of the United States funds or securities, in trust or otherwise, sufficient and available to satisfy any final judgment which may be entered in such action, suit or proceeding; or (2) procure a certificate of authority to transact the business of insurance in the commonwealth.
(b) The court in any action, suit or proceeding, in which service is made in the manner provided in subsections (b) or (c) of section two may, in its discretion, order such postponement as may be necessary to afford the defendant reasonable opportunity to comply with the provisions of subsection (a) of this section and to defend such action.
(c) Nothing in subsection (a) of this section is to be construed to prevent an unauthorized foreign or alien insurer from filing a motion to quash a writ or to set aside service thereof made in the manner provided in subsections (b) or (c) of section two hereof, on the ground either (1) that such unauthorized insurer has not done any of the acts enumerated in subsection (a) of section two, or (2) that the person on whom service was made pursuant to subsection (c) of section two was not doing any of the acts therein enumerated.