Server generated mail not deliverd to external email service (Office 365)

We have Cyberpanel Enterprice installed with our domein and running webshop.
Server generated mails are send right to customers (other than our own domain). Confirmations to ourself are not received.

Postfix (and Dovecot) are trying to deliver this mail locally instead of to the external mail service.

The error we see:
“Jan 6 06:48:56 s2 postfix/pipe[701098]: 91933E2392:, relay=dovecot, delay=0.04, delays=0/0/0/0.03, dsn=5.1.1, status=bounced (user unknown)”

How can we tell Postfix/Dovecot to first try to deliver through the relayhost ( instead of locally?

Already tried to create ‘transport_maps’ but this seems to be used after the local mailboxes.

Tnx a lot!
Cheers, Jerry

Ok! Already found it.

Added to /etc/postfix/
‘transport_maps = hash:/etc/postfix/transport’

In /etc/postfix/transport:
‘ relay:[]’

Call: ‘postmap /etc/postfix/transport’
Call: ‘service postfix restart’

That did the trick!