The right to the secret of the communications is one of the fundamental rights more important of our Constitution (art. 18.3 of the Spanish Constitution, henceforth CE), it guarantees the transmission of a message without the interference of a third party, all the process of communication is protected regardless its content may be considered private or not. Thereby, when we send a letter all the data related with it is a secret, the address, the person to whom is addressed, the sender, the date we send it, besides the proper letter. 
Notwithstanding the above, as all the fundamental rights recognized in our CE, it may be limited on account other values guaranteed by the CE. One of these values is the prevention of the crime, which is a constitutional interest and which included the investigation and the punishment of the crimes committed. The mechanism to limit the right to the secret of the communications, is established along with such right in the article 18.3 CE, the judicial police needs a judicial resolution to take knowledge of the content of a communication in which it is not a party. 
The problem arises when the concept of postal correspondence is not clear, because the CE doesn’t say anything about what has to be considered postal correspondence. We have seen repeated this problem throughout the jurisprudence of the 80´s and 90´s, to some tribunals the definition of correspondence protected by the CE was any delivery, included packets of any size or form. Whereas for others, the postal correspondence didn’t comprenden the packets which for their size may be goods, or which had been sent according to terms and conditions which obliged to declare their content. This divergence of criteria was solved by the famous sentence 281/2006 of the Spanish Constitutional Tribunal, which definitely settled the discord and excluded from the constitutional protection those packets which for their size were not aimed to contain postal correspondence or which have a external declaration of content. Therefore those who advocated a more restricted conception of what is postal correspondence finally won. This criteria was fixed by the Spanish Procedural Penal Law (in Spanish Ley de Enjuiciamiento Criminal, henceforth LECrim) in its art. 579.4, and with it we can understand more than closed the polemic of what can be considered postal correspondence under the protection of the article 18.3 of the CE. If I have to give my opinion, the option finally adopted by the Spanish Tribunals and Law, is the more correct, to consider correspondence heavy packets which later resulted, had been used to transport drug, it was and is the more habitual crime committed through correspondence, was prompted to scandals and ridiculous, because the absence of a judicial resolution invalidated the proof obtained through the packet and clear criminals had to be released. To the above we have to add that was impractical and unreal to exige a judicial resolution for every packet which attracts the suspicion of the custom agents, therefore as I said, the use of the postal service to send drug was habitual and also a good idea.
We have to talk a little more about the requisites of the judicial resolution which authorizes the interception of the correspondence. As a judicial resolution which curtails a fundamental right, it has to have the form of an auto, this means that has to be duly motivated, mustering the reasons demanded by our jurisprudence. It has to explain the evidences of the existence of the crime and their connection with the subject affected, and to make the named by the Spanish jurisprudence the proportionality trial. The evidences which would have been found, should be more than mere suspicions, they have to be objective data which may be subject to the inquiry of a third party, because without this requisite it would be impossible to control the investigation. What the law (art.579 LECrim) and the jurisprudence are trying to avoid is the called prospective investigations, these kind of investigations are those not aimed to solve a concrete crime, instead of it are aimed to incriminate a concrete subject for whatever is found. In other words, the Spanish law doesn’t give full powers to the judicial police to harass a subject to see what is found of him, with the goal to put him in jail and taint its reputation. The proportionality trial should show that from the application of the measure derives more benefits or advantages for the general interest than damages to other goods or interests in conflict, besides our jurisprudencia has stated that the judicial resolution which authorizes the intromission in a fundamental right should comply with the proportionality principle, which demands that the measure should be right to achieve the end constitutional legitimate followed by it, this is, the investigation of the crime (suitability trial), and it should be necessary or essential for it, this is that doesn’t exist other measures less costly that, without impose any sacrifice of fundamental rights or with a minor sacrifice, would be equally apt for this end (necessity trial).
Another question we should to answer, is what happen with those packets which are not protected with the right to the secret of the communications, are their secret guaranteed under other constitutional right? And the answer is yes, but the protection granted by the CE to this packets is not as broad as that granted to the postal correspondence, is narrower because the right which apply to them is the right to the intimacy established in the article 18.1 of the CE. This right to the intimacy seemingly is endowed with the same importance by the CE than that granted to the right to the secret of the communications, this is due to the fact that both rights share a place in the same article, the article 18 CE. Though when you read with care how they are wording both, you realize that the article dedicated to the right to the intimacy has not the same legal protection, in its case the CE doesn’t say anything about the necessity of a judicial resolution  to interfere with it. Therefore at first glance, we can deduce that may be allowed an interference with it without any other requisite, but this is not wholly true. The Spanish jurisprudence has asked for two requisites, a legal habilitation for the intromission, and the fulfillment of the principle of proportionality that we have seen above. In this case the legal requirement is clearly fulfilled by the art. 282 LECrim which indeed obliges the judicial police to solve the the public crimes.
We cannot end without mention, that the Spanish Penal Code (henceforth CP) has an article which establishes as a crime the interception of a communication, this is the article 197. Although in my opinion this article is more aimed to those individuals which has transgressed the expectancy of intimacy in the communications of other individual and not to the public powers. In the latter case I think that the more habitual will be only the declaration of the proofs obtained through this breach of the legality as illicit, hence not valid to destroy the presumption of innocence of the accused.