On request, the script was supplemented by the specification of the port for the smarthost. Many thanks for the hint and the suggestion at this point J
The current version can be downloaded here:
https://www.frankysweb.de/download/configure-exchange_v1.20.zip