At present, there is no established technique to detect illicit drugs concealed in mail envelopes in a nondestructive way. Therefore, such mail easily passes through the domestic post or even over the international borders. We studied the nondestructive detection of chemicals (including illicit drugs) hidden in envelopes, and developed an effective inspection system using terahertz waves in a two-step procedure: First, scattering of the terahertz waves is an indicator of the presence of powders in the envelope; second, the identification of the chemicals is done by spectral fingerprinting. Furthermore, we applied the diffuse reflectance spectroscopy for the case of thicker targets and tested whether powders can be identified using spectra obtained in diffuse reflection.