We will consider, in the light of the foregoing facts:
First—What are rights of the telegraph company, with respect to the telegraph line and property, independently of the foreclosure proceedings, and
Second—To what extent, if at all, are those rights affected by those proceedings.
It is insisted, on the part of the respondent, that the contract which is set out in the original bill, and under which complainant claims, is void, by reason of certain provisions therein contained, which are alleged to be illegal, immoral, and contrary to public policy. Several clauses of the contract have been pointed out as coming within this description, but the one mainly relied upon is the second subdivision thereof, and which is as follows:
“The said railway company further agrees to give to said telegraph company the exclusive right of way on and. along the line of said railway, its branches and extensions, for the construction and use of said telegraph lines for commercial and public uses and business; and said railway will not transport upon said railway any material for the construction of a line of telegraph in competition with the lines of said telegraph company, except at and for the usual rates charged for similar transportation to other persons doing business with said railway company, nor stop its trains, or distribute material for such parties or their employees at other than regular stations.”
In our opinion it is not competent for a railroad company to grant to a single telegraph company the exclusive right of establishing lines of telegraphic communication along its right of way. The purpose of such contracts is very plainly to cripple and prevent competition, and they are therefore void, as being in restraint of trade and contrary to public policy. They are also in contravention of the act of Congress of July 24, 1866, which authorizes telegraph companies to maintain and operate lines of telegraph “over and along any of the military or post roads of the- United States which have been, or may hereafter be declared such by act of Congress.” 14 Stat., 221.
All railroads are by law made post roads. Pensecola Tel. Co. v. Western Union Tel. Co., 96 U. S., 1; Western Union Tel. Co. v. *312St. Joseph, etc., R. R. Co., 1 McCrary, 569; Western Union Tel. Co. v. Am. Union Tel. Co., Sup. Court of Georgia, 1880.
We therefore must hold the second subdivision of the contract to be void. We are, however, inclined to the opinion that the invalidity of this provision of the contract does not render the entire agreement null and void. The contract embraces several distinct promises on the part of the railway company, besides the one respecting the exclusive right of way, as, for example: 1. That it will furnish and distribute the poles ; 2. That it will furnish laborers to erect the line; 3. That it will maintain the poles in good order and keep the wires in good repair; 4. That it will furnish office room at its railway stations; 5. That the telegraph company shall control the commercial telegraphing along the line, and receive the proceeds thereof; and numerous other engagements of like character. The consideration for these promises, and for the additional illegal promise concerning the exclusive right of way, was certain promises on the part of the telegraph company, all of which are legal. It is, therefore, a case in which the railroad company makes a number of promises to the telegraph company, one of which promises is illegal, but all the others legal, in consideration of certain promises on the part of the telegraph company, all of which are legal. The rule respecting such a contract is thus stated in Smith’s Leading Cases, Hare & Wall. Notes, 5 Am. edition, 502: “In cases where the consideration is tainted by no illegality, but some of the * * * promises * * * are illegal, the illegality of those which are bad does not communicate itself to or contaminate those which are good, except where, in consequence of some peculiarity in the contract, its parts are inseparable, or dependent upon one another.”
And in The Oregon Steam Navigation Company v. Winsor, 20 Wal., 64, the Supreme Court laid down the rule that contracts in restraint of trade are divisible, and “ when such an agreement contains a stipulation which is capable of being construed divisibly, and one part thereof is void, as being in restraint of trade, whilst the other is not, the Court will give effect to the t latter, and will not hold the agreement to be void altogether” (p. 70).
We think the contract is capable of being construed divisibly.
It is not, however, necessary to pass finally upon this question, for we are clearly of the opinion that, even assuming the *313invalidity of the entire contract, the plaintiff is entitled to relief, unless deprived of its interest in the property by the foreclosure proceedings, of which we shall speak presently. If we leave out of view entirely any claim of right based upon the contract, we find the complainant in possession of a line of telegraph con - structed jointly by it and the railway company, each party furnishing portions of the material and labor for its erection, repair and operation.
The railway Company furnished the poles and all the labor, except a foreman, to construct the line ; the telegraph company furnished a foreman to superintend the work, and also furnished the wire and insulators. This certainly constituted the two companies joint owners of the property. In this respect, the case does not differ materially from several other telegraph cases which have recently been considered in this circuit. Atlantic and Pacific Tel. Co. v. U. P. Ry. Co., 1 McCrary, 541; Western Union Tel. Co. v. U. P. Ry. Co., 1 McCrary, 558; Western Union Tel. Co. v. St. Joseph, etc., R. Co., 1 McCrary, 565.
In each of these cases the contract, being substantially the same as the one now before us, was held void, but the right of the railroad company, in consequence of such invalidity, to take the whole telegraph property, was emphatically denied. The following quotation from the opinion in the case first cited applies to the point now under consideration:
“No case has been cited in argument, nor have I been able to find one which holds that a court of equity having jurisdiction of the parties to, and the subject matter of, an illegal contract, should require one of such parties to give up what he has received under it, without requiring the other to do the same thing. Many cases hold that a corporation which has made a contract ultra vires which has not been fully performed, is not estopped from pleading its own want of power, when sued upon such contract; but that doctrine does not apply to a case where a party comes into court of equity and, while retaining all that he has received upon such a contract, asks to be permitted to retake what he has 'parted with under it. I take it there is nothing in the law, as there is certainly nothing in the principles of equity, to estop the Court from saying that the obligation to return the property transferred under these contracts is mutual, and shall not be enforced against one of the parties without *314being at the same time enforced against the other. As the parties and subject matter are now before the Court, it is the duty of the Court, as far as possible, to place them in statu quo'.’
The ruling in that case was, that the railroad company should be restrained by injunction from interfering with the possession of the telegraph company until a bill should be filed, or other proceedings instituted to cancel and set aside said contracts upon the return of the consideration, and to settle and adjust, upon principles of equity, the accounts between the parties. And in the case last named, this Court in discussing the same subject, said:
“ If the defendants, after years of acquiesence in the contract in question, after receiving its benefits, and after a property had been built up under it to which others made claim, became suddenly convinced that it was a void contract, it was their duty to apply to the Court for relief, praying a cancellation of the contract, and a full and fair settlement of all accounts growing out of its execution in the past.. Until they seek some such remedy, and until a fair settlement, and a full accounting can be had, they will be enjoined from attempting to eject the plaintiff or to seize the property.”
In the second case the Court laid down the rule and cited many authorities to sustain it, that, assuming the invalidity of the contract, and even assuming that it was immoral, the property accumulated and constructed under, it must, as between the parties, be disposed of according to equity; and the Court will not refuse to deal with that property on the ground that it was acquired under an illegal contract. Planters Bank v. Union Bank, 16 Wall., 483, and cases cited.
We are entirely satisfied with the ruling established in these cases, and it follows that the complainant, the Western Union Telegraph Company, is entitled to decree unless deprived of all interest in the property by the foreclosure proceedings, which will now be considered.
In considering the effect upon the rights of the telegraph company of the foreclosure sale, we will first inquire whether the telegraph poles and wire and the constructed line became a part of the realty, so as to pass under the mortgage to the mortgagees as after acquired property. It is plain that the parties did *315not intend to make the line a part of the realty, so as to follow the fee to whomsoever conveyed. The contract into which they entered is entirely inconsistent with such an assumption, for, if the poles, wires and instruments had become at once part of the real estate, it would have been within the power of the railroad company, immediately upon their erection, to convey them to a third party, and thus deprive the telegraph company of all its interest under the contract. Whether the contract is valid or invalid, it may be looked into for the purpose of ascertaining the intent of the parties in placing the poles and* wires upon the right of way. But the intention of the parties is not the only thing to be considered. Ordinarily the distinction between real estate and personal property exists in the nature of the thing itself, and does not depend upon the convention of the parties with respect to it. By no agreement of parties can the bricks which are built into the wall, or the shingles that form the roof, or the stones that go into the foundation of a house, be made to retain their character as personal property, This, for the reason that they become so inseparably affixed to the realty as to be a part of it, independently of any question as to the intent of the parties. But it is otherwise, says Denio, J., in Ford v. Cobb, 20 N. Y., 348, “with things which, being originally personal in their nature, are attached to the realty in such a manner that they may be detached without being destroyed or materially injured, and without the destruction of, or material injury to, the things real with which they are connected; though their connection with the land or other real estate is such that, in the absence of an agreement or any special ’ relation between the parties in interest, they would be a part of the real'estate.”
With respect to this class of property, the parties in interest may agree that it shall remain personalty, subject to be removed. This rule is supported by a long line of well considered cases; and I do not understand that its soundness as a general rule is called in question here. Its application to this case can only be denied on the ground that the respondent is ah innocent purchaser at the Master’s sale, without notice of any claim on the part of the complainant to the telegraph property. We do not find it necessary to decide the important question whether the railroad company has the fee of the land acquired for right of way. We should, however, be slow to hold that a railroad cor*316poration, under the law of Iowa, may obtain for this purpose a strip of land across the State, perhaps cutting through farms and villages, and use it for any purpose'except for right of way, or convey it to any party for private use.
The consequences which might flow from such a doctrine would be very serious indeed. Redfield on Railways, 247-249.
As between the parties, it is well settled that the mortgagee, as to after acquired property, takes only the interest of the mortgagor. Only the interest of the railway company in the telegraph line, subject to the interest of the telegraph company therein, passed under the mortgage. United States v. New Orleans R. R., 12 Wal., 362; Fosdick v. Schall, 99 U. S., 225; Myer v. Car Co., 102 U. S., 1; Loomis et al. v. R. Co., District of Iowa, Jan., 1882.
It only remains to be determined whether the respondent, as purchaser at the Master’s sale, can be regarded as a bona fide purchaser of the telegraph line for value, and without notice of the claim of the telegraph company. We think he cannot be so regarded, and for the following reasons:
First—The telegraph company had a right to claim its interest in the telegraph line as personal property against the mortgagee, as well as against the railway company. The consent of the former to its retaining its character as personalty was not necessary. Tift v. Harton, 53 N. Y., 377, and cases cited.
Whether the purchaser at the foreclosure sale would ordinarily take only the right of the mortgagor in after acquired property, or should be regarded in the light of a purchaser for value without notice, need not be determined, because—-
Second— The respondent Smith had notice of the complainant’s claim upon said property, or, at least, the facts as they existed and were known to him were sufficient to put him upon inquiry. The agreed statement of facts shows that he had operated the road as receiver for nearly five years prior to his purchase, during which time he must have known of the existence of the telegraph contract, and of the fact that the line had been constructed and was being constructed thereunder; and it is stipulated that “the trustees in the aforementioned mortgage and the said Smith had full knowledge that the contract had been made between the railroad company and the telegraph company; but said trustees were not informed of the contents *317thereof, save that some agreement was thereby made for the operation of the line.” This was sufficient to put, not only respondent, but the trustees, upon inquiry, and inquiry would have led them to a knowledge of all the facts. Besides, we think the telegraph company was, in an important sense, in possession of the line. All the commercial business done upon it was done in its name. Printed message blanks were in constant use, showing that it was operating the line. Its sign appeared at all the offices along the line, and even the operators were employees of the railway company. We think the possession of the telegraph company was sufficiently open and notorious to advise the public and the purchaser, at the foreclosure sale, that they had or claimed an interest in the property.
Third—At the time of the Master’s sale there was on file in the foreclosure case an amended bill of the trustees in the mortgage, alleging the execution of the telegraph contract, reciting its provisions, and containing the following averment:
“ That said contract is subject to said mortgage, and these complainants are entitled to all the rights, privileges and benefits of said railway compa-ny, by, in, under, or in relation thereto, and said mortgage is a first lien thereon.” And said amended bill prayed for a decree “declaring said contract subject to said mortgage, and said mortgage a prior lien thereon, and foreclosing the right, title and interest of the railway company therein.”
To this amended bill an answer was filed, also prior to the Master’s sale, substantially admitting the allegations contained therein, and consenting to a decree as prayed. After the Master’s sale, and upon the filing of the bill in the case, said amended bill was dismissed.
Without considering the question so much discussed by counsel, whether this record should operate to estop the complainant from now claiming the ownership of the telegraph line, we have no hesitation in saying that it was sufficient notice to the purchaser at the sale, that the telegraph company claimed an interest in that property, so that he was not a purchaser for value and without notice.
We are thus brought to the conclusion that the rights of the complainant, the telegraph company, were in no wise affected by the foreclosure proceedings.
Cook & Dodge and John N. Rogers, for complainant. J. M. Woolworth, P. H. Smyth and James Hagerman, for respondent and complainant in cross-bill.The respondent, in his cross-bill, does not offer to account. He does not recognize, but, on the contrary, distinctly repudiates the claim of complainant of an interest in the telegraph property. The claim of the respondent plainly is, that he is the owner of the entire line and entitled to the possession and control of the same without interference from the complainant. In his answer he distinctly admits the seizing of the telegraph property and lines, and the cutting of the wires to destroy the connection between them and the remaining portion of the Western Union Telegraph system, and the prayer of his cross-bill is, that the telegraph company may be enjoined from intermeddling or interferring with said lines and wires. In accordance with the principles above announced, the decree must, therefore, be against the complainant in the cross-bill. The prayer of the complainant in the original bill is as follows :
“ Therefore, your orator prays that an injunction may issue to restrain these defendants, their agents, servants and employees, from preventing your orator’s re-connecting the wires that have been severed as aforesaid, and to restore the connections, which have been severed, and from preventing your orator from using the said lines and wires, and enjoying the benefits to which it is entitled under said contract of June 28, [871, and from interfering with your orator in the use of said telegraph wires until the rights of the parties may be adjudicated in the said foreclosure proceeding herein heretofore referred to, and until the further order of this Court, and that upon the final hearing of this cause the said injunction may be made perpetual.”
We do not think it proper to grant the complainant all the relief here asked, but, in our own view of the case, it is entitled to a decree to enjoin and restrain the respondents, their agents, servants and employees, from preventing the complainant’s re-connecting any wire that may have been severed, and from interfering with the restoration of any connection that may have been severed, and from preventing complainant from possessing and using said lines and wires as heretofore, until the rights of the parties with respect thereto shall be adjudicated.
Love, District Judge, concurs.