GETTING MAILED GOODS FROM OUTSIDE OF THE EUROPEAN UNION:
We do NOT recommend that your family/friends send you any goods by mail while you are in Spain, especially if they are not personal belongings (clothes, computers, presents…).
According to Spanish Customs regulations, your package can randomly be held back in Madrid. If that happened, you would need to go through some paperwork and pay a fee in order to get your goods (and wait for a while until they are released). The fee will depend on the value of the goods, but it is usually not low.
Because of all this, we highly recommend that you ask your family and friends not to send you anything by postal mail.