Section 7. If a defendant in a civil action is absent from the commonwealth or his residence is unknown to the officer serving the summons and complaint, and no personal service has been made on him or his agent appointed under section five, or if the service of process is defective or insufficient by reason of a mistake of the plaintiff or officer as to where or with whom the summons or copy ought to have been left, the court, upon suggestion thereof by the plaintiff, shall order the action to be continued until notice of the action is given in such manner as it may order. If the property of an absent defendant has been attached and the residence of such defendant is known to the plaintiff and no legal service can be made upon him within the commonwealth, except by publication, the court may order personal service to be made on him in such manner as it may direct and, upon proof that service has been so made, such defendant shall be held to answer to the action. If the defendant does not appear, the court may order the action continued and further notice given to him in such manner as it may direct.