Every executor, administrator or guardian appointed in, but residing out of the state, shall, before entering upon the duties of his trust, in writing, appoint an agent residing in the county where he is appointed, and shall by such writing stipulate and agree that the service of any legal process against him as such executor, administrator or guardian if made on said agent shall be of the same legal effect as if made on himself personally within the state. Such writing shall give the proper address of such agent and shall be filed in the office of the judge of the district court where such appointment is made.
R.L.1910, § 6263.