  This paper proposes a new approach to separate the $\mu$ spectral distortions
of the cosmic microwave background from foregrounds with poorly defined
spectral shapes. The idea is based on finding the optimal response to the
observed signal. This response is weakly sensitive to foregrounds with
parameters that are within some certain limits of their possible variations
and, at the same time, very sensitive to the amplitude of $\mu$ distortion. The
algorithm described in this paper is stable, easy to implement, and
simultaneously minimizes the response to foregrounds and photon noise.
