وَحَدَّثَنِي عَنْ مَالِكٍ، أَنَّهُ سَأَلَ ابْنَ شِهَابٍ عَنِ الرَّجُلِ، يَعْتَكِفُ هَلْ يَدْخُلُ لِحَاجَتِهِ تَحْتَ سَقْفٍ فَقَالَ نَعَمْ لاَ بَأْسَ بِذَلِكَ ‏.‏ قَالَ مَالِكٌ الأَمْرُ عِنْدَنَا الَّذِي لاَ اخْتِلاَفَ فِيهِ أَنَّهُ لاَ يُكْرَهُ الاِعْتِكَافُ فِي كُلِّ مَسْجِدٍ يُجَمَّعُ فِيهِ وَلاَ أُرَاهُ كُرِهَ الاِعْتِكَافُ فِي الْمَسَاجِدِ الَّتِي لاَ يُجَمَّعُ فِيهَا إِلاَّ كَرَاهِيَةَ أَنْ يَخْرُجَ الْمُعْتَكِفُ مِنْ مَسْجِدِهِ الَّذِي اعْتَكَفَ فِيهِ إِلَى الْجُمُعَةِ أَوْ يَدَعَهَا فَإِنْ كَانَ مَسْجِدًا لاَ يُجَمَّعُ فِيهِ الْجُمُعَةُ وَلاَ يَجِبُ عَلَى صَاحِبِهِ إِتْيَانُ الْجُمُعَةِ فِي مَسْجِدٍ سِوَاهُ فَإِنِّي لاَ أَرَى بَأْسًا بِالاِعْتِكَافِ فِيهِ لأَنَّ اللَّهَ تَبَارَكَ وَتَعَالَى قَالَ ‏{‏وَأَنْتُمْ عَاكِفُونَ فِي الْمَسَاجِدِ‏}‏ فَعَمَّ اللَّهُ الْمَسَاجِدَ كُلَّهَا وَلَمْ يَخُصَّ شَيْئًا مِنْهَا ‏.‏ قَالَ مَالِكٌ فَمِنْ هُنَالِكَ جَازَ لَهُ أَنْ يَعْتَكِفَ فِي الْمَسَاجِدِ الَّتِي لاَ يُجَمَّعُ فِيهَا الْجُمُعَةُ إِذَا كَانَ لاَ يَجِبُ عَلَيْهِ أَنْ يَخْرُجَ مِنْهُ إِلَى الْمَسْجِدِ الَّذِي تُجَمَّعُ فِيهِ الْجُمُعَةُ ‏.‏ قَالَ مَالِكٌ وَلاَ يَبِيتُ الْمُعْتَكِفُ إِلاَّ فِي الْمَسْجِدِ الَّذِي اعْتَكَفَ فِيهِ إِلاَّ أَنْ يَكُونَ خِبَاؤُهُ فِي رَحَبَةٍ مِنْ رِحَابِ الْمَسْجِدِ وَلَمْ أَسْمَعْ أَنَّ الْمُعْتَكِفَ يَضْرِبُ بِنَاءً يَبِيتُ فِيهِ إِلاَّ فِي الْمَسْجِدِ أَوْ فِي رَحَبَةٍ مِنْ رِحَابِ الْمَسْجِدِ وَمِمَّا يَدُلُّ عَلَى أَنَّهُ لاَ يَبِيتُ إِلاَّ فِي الْمَسْجِدِ قَوْلُ عَائِشَةَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم إِذَا اعْتَكَفَ لاَ يَدْخُلُ الْبَيْتَ إِلاَّ لِحَاجَةِ الإِنْسَانِ ‏.‏ وَلاَ يَعْتَكِفُ فَوْقَ ظَهْرِ الْمَسْجِدِ وَلاَ فِي الْمَنَارِ يَعْنِي الصَّوْمَعَةَ ‏.‏ وَقَالَ مَالِكٌ يَدْخُلُ الْمُعْتَكِفُ الْمَكَانَ الَّذِي يُرِيدُ أَنْ يَعْتَكِفَ فِيهِ قَبْلَ غُرُوبِ الشَّمْسِ مِنَ اللَّيْلَةِ الَّتِي يُرِيدُ أَنْ يَعْتَكِفَ فِيهَا حَتَّى يَسْتَقْبِلَ بِاعْتِكَافِهِ أَوَّلَ اللَّيْلَةِ الَّتِي يُرِيدُ أَنْ يَعْتَكِفَ فِيهَا وَالْمُعْتَكِفُ مُشْتَغِلٌ بِاعْتِكَافِهِ لاَ يَعْرِضُ لِغَيْرِهِ مِمَّا يَشْتَغِلُ بِهِ مِنَ التِّجَارَاتِ أَوْ غَيْرِهَا وَلاَ بَأْسَ بِأَنْ يَأْمُرَ الْمُعْتَكِفُ بِبَعْضِ حَاجَتِهِ بِضَيْعَتِهِ وَمَصْلَحَةِ أَهْلِهِ وَأَنْ يَأْمُرَ بِبَيْعِ مَالِهِ أَوْ بِشَىْءٍ لاَ يَشْغَلُهُ فِي نَفْسِهِ فَلاَ بَأْسَ بِذَلِكَ إِذَا كَانَ خَفِيفًا أَنْ يَأْمُرَ بِذَلِكَ مَنْ يَكْفِيهِ إِيَّاهُ ‏.‏ قَالَ مَالِكٌ لَمْ أَسْمَعْ أَحَدًا مِنْ أَهْلِ الْعِلْمِ يَذْكُرُ فِي الاِعْتِكَافِ شَرْطًا وَإِنَّمَا الاِعْتِكَافُ عَمَلٌ مِنَ الأَعْمَالِ مِثْلُ الصَّلاَةِ وَالصِّيَامِ وَالْحَجِّ وَمَا أَشْبَهَ ذَلِكَ مِنَ الأَعْمَالِ مَا كَانَ مِنْ ذَلِكَ فَرِيضَةً أَوْ نَافِلَةً فَمَنْ دَخَلَ فِي شَىْءٍ مِنْ ذَلِكَ فَإِنَّمَا يَعْمَلُ بِمَا مَضَى مِنَ السُّنَّةِ وَلَيْسَ لَهُ أَنْ يُحْدِثَ فِي ذَلِكَ غَيْرَ مَا مَضَى عَلَيْهِ الْمُسْلِمُونَ لاَ مِنْ شَرْطٍ يَشْتَرِطُهُ وَلاَ يَبْتَدِعُهُ وَقَدِ اعْتَكَفَ رَسُولُ اللَّهِ صلى الله عليه وسلم وَعَرَفَ الْمُسْلِمُونَ سُنَّةَ الاِعْتِكَافِ ‏.‏ قَالَ مَالِكٌ وَالاِعْتِكَافَ وَالْجِوَارُ سَوَاءٌ وَالاِعْتِكَافُ لِلْقَرَوِيِّ وَالْبَدَوِيِّ سَوَاءٌ ‏.‏

Yahya related to me from Malik that he had asked Ibn Shihabwhether someone doing itikaf could go into a house to relieve himself,and he said, "Yes, there is no harm in that." Malik said,"The situation that we are all agreed upon here is that there is nodisapproval of anyone doing itikaf in a mosque where jumua is held.The only reason I see for disapproving of doing itikaf in a mosquewhere jumua is not held is that the man doing itikaf would have toleave the mosque where he was doing itikaf in order to go to jumua, orelse not go there at all. If, however, he is doing itikaf in a mosquewhere jumua is not held, and he does not have to go to jumua in anyother mosque, then I see no harm in him doing itikaf there, becauseAllah, the Blessed and Exalted, says, 'While you are doing itikaf inmosques,' and refers to all mosques in general, without specifying anyparticular kind." Malik continued, "Accordingly, it ispermissiblefor a man to do itikaf in a mosque where jumua is not heldif he does not have to leave it to go to a mosque where jumua isheld." Malik said, "A person doing itikaf should spend thenight only in the mosque where he is doing itikaf, except if his tentis in one of the courtyards of the mosque. I have never heard thatsomeone doing itikaf can put up a shelter anywhere except in themosque itself or in one of the courtyards of the mosque. Partof what shows that he must spend the night in the mosque is the sayingof A'isha, 'When the Messenger of Allah, may Allah bless him and granthim peace, was doing itikaf, he would only go into the house torelieve himself.' Nor should he do itikaf on the roof of the mosque orin the minaret." Malik said, "The person who is going to doitikaf should enter the place where he wishes to do itikaf before thesun sets on the night when he wishes to begin his itikaf, so that heis ready to begin the itikaf at the beginning of the night when he isgoing to start his itikaf. A person doing itikaf should be occupiedwith his itikaf, and not turn his attention to other things whichmight occupy him, such as trading or whatever. There is no harm,however, if some one doing itikaf tells some one to do something forhim regarding his estate, or the affairs of his family, or tellssomeone to sell some property of his, or something else that does notoccupy him directly. There is no harm in him arranging for someoneelse to do that for him if it is a simple matter." Maliksaid, "I have never heard any of the people of knowledge mentioningany modification as far as how to do itikaf is concerned. Itikaf is anact of ibada like the prayer, fasting, the hajj, and such like acts,whether they are obligatory or voluntary. Anyone who begins doing anyof these acts should do them according to what has come down in thesunna. He should not start doing anything in them that the muslimshave not done, whether it is a modification that he imposes on others,or one that he begins doing himself. The Messenger of Allah, may Allahbless him and grant him peace, practised itikaf, and the muslims knowwhat the sunna of itikaf is." Malik said, "Itikaf and jiwarare the same, and Itikaf is the same for a village-dweller as it isfor a nomad." Translation Not Available

Book Ref: Muwatta Imam Malik Book 19 Hadith 695
Web Ref:  Muwatta Imam Malik Book 19 Hadith 3