We used to go on military expeditions with the Messenger of Allah ﷺ, and our time away from our wives would grow long. We asked, "Messenger of Allah, should we not castrate ourselves?" He forbade us from doing so, then he permitted us to marry a woman for a fixed term in exchange for something. Later he prohibited that for us on the day of Khaybar, along with the flesh of domesticated donkeys.
كنا نغزو مع رسول الله ﷺ فتطول غربتنا. فقلنا: ألا نستخصى يا رسول الله! فنهانا، ثم رخص أن نتزوج المرأة إلى أجل بالشيء، ثم نهانا عنها يوم خيبر، وعن لحوم الحمر الأهلية.