Measurement-device-independent quantum communication with an untrusted source