Automatic detection of the exchange source