The secrecy of correspondence is both a constitutional right in Germany and France, meaning the police requires a warrant to open anyone post (in Germany it even harder, only a judge can open a sealed letter there), so does anyone know how they are ever able to open anything (drugs or weapons) or control the mail?
Situation in Germany: First, distinguish between Postgeheimnis , Briefgeheimnis and Fernmeldegeheimnis look up wikipedia this goes to far in this context but you have to distinguish between the constitutional rights and the laws putting these rights into narrow cages.
What protects you in this case is the Postgeheimnis which concerns all stuff send by the "Post" (formerly deutsche Bundespost) or carriers that are registered as equivalent. I don't know if any actually are or if there is a list. Assume that any free market privat company is not.
Anyway, for the Post there is the Postgesetz (PostG). For our purposes most interesting is (warning German Fed Gov. Website!) § 39 Postgeheimnis. The reasons why a letter can ever be opened are:
The people doing this are under oath not to reveal the contents ever, with the exception of criminal law § 138 Strafgesetzbuch which generally forces every citizen to report certain crimes. Mostly this is aimed at stuff like treason, preparation for coup or war. Terroristic activity and so forth. But it also includes forgery of money, shares, bonds ect. Drugs are not listed but do get reported to the police when discovered (see shiny flakes) but it wouldn't be a criminal offence if they don't report it.
In any case be aware that the terms of delivery clearly state right at the top that you are not allowed to transport illegal narcotics otherwise they would be an accessory. Which means they will refuse to deliver your package and probably report it if it they suspect that it contains anything on the list of stuff they won't deliver or simply return it (if they can, else it will be opened in accordance with the exceptions to § 39PostG). The list with stuff they won't deliver is only available as PDF on Post.de, so I won't link to it. There is an English version of the website.
Letters and parcels are regularly flown on board of passenger planes within Germany. This means that if you send something even only a few hundred kilometers it might receive IATA screening like all aircraft cargo has to. If something fails IATA screening it will either be returned to the sender because you were not supposed to mail it anyway with regular service (like compressed gases ect.) or delivered by road, stuff like Li batteries ect. This IATA screening is in my opinion the only place were they really can find your drugs by accident. Or actually the computer image recognition program finds it.