You can use the Postfix transport map to configure the delivery behavior for the specific domain.
Create a new file called /etc/postfix/transport
example.com smtp:[1.2.3.4]
Replace example.com with the domain that you want to restrict, and 1.2.3.4 with the IPv4 address of your Postfix server.
Create a new file called /etc/postfix/restrictions
/^example\.com$/ OK
/^example\..*/ REJECT
/.*@example\.com$/ OK
/.*@example\..*/ REJECT
Replace example.com with the domain you want to restrict. This file will help you restrict the domain to send emails only to itself.
Add the following lines to your /etc/postfix/main.cf file:
transport_maps = hash:/etc/postfix/transport
smtpd_sender_restrictions = check_sender_access pcre:/etc/postfix/restrictions
Run the following commands to compile the transport map and reload Postfix:
sudo postmap /etc/postfix/transport
sudo systemctl reload postfix
Now, the specified domain should only be able to send emails to the same IPv4 address, and other domains should continue to operate as before.