Wyślij wiadomość: Quantum metrology with imperfect states and detectors