Section 1. A personal action shall not be maintained against a person not an inhabitant of the commonwealth unless he or his agent appointed under section five or five A has been served with process in the commonwealth, or unless service has been made upon him outside the commonwealth, as authorized by chapter two hundred and twenty-three A, or unless an effectual attachment of his property within the commonwealth has been made upon a writ of attachment, and in case of such attachment without such service, the judgment shall be valid only to secure the application of the property so attached to the satisfaction of the judgment.