Bava Basra2: 5
מַרְחִיקִין אֶת הַסֻּלָּם מִן הַשּׁוֹבָךְ אַרְבַּע אַמּוֹת, כְּדֵי שֶׁלֹּא תִקְפֹּץ הַנְּמִיָּה; וְאֶת הַכֹּתֶל מִן הַמַּזְחִילָה אַרְבַּע אַמּוֹת, כְּדֵי שֶׁיְּהֵא זוֹקֵף אֶת הַסֻּלָּם.  מַרְחִיקִין אֶת הַשּׁוֹבָךָ מִן הָעִיר חֲמִשִּׁים אַמָּה; וְלֹא יַעֲשֶׂה אָדָם שׁוֹבָךְ בְּתוֹךְ שֶׁלּוֹ אֶלָּא אִם כֵּן יֶשׁ לוֹ חֲמִשִּׁים אַמָּה לְכָל רוּחַ. רַבִּי יְהוּדָה אוֹמֵר: בֵּית אַרְבַּעַת כּוֹרִין, מְלֹא שֶׁגֶר הַיּוֹנָה. וְאִם לְקָחוֹ — אֲפִלּוּ בֵית רֹבַע, הֲרֵי הוּא בְחֶזְקָתוֹ.
One must distance a ladder four cubits from a dovecote, so that a marten should not spring [into it]; and a wall four cubits from a gutter, so that he can stand a ladder [there].  One must distance a dovecote fifty cubits from a town; and a man may not build a dovecote within his own property unless he owns fifty cubits [of land] in every direction. R' Yehudah says: An area of four kor, the extent of a dove's flight. If he bought it, even [if it is within] an area of a quarter-kav, it retains its standing.