Why would you want to restrict that? Don't you want to allow people to send out mails to whomever they like?
You could say something like "I want all mails to be sent out from 1 central mail server, instead of from all separate machines" (ie using a relay), but that's something different than what you're asking right now.
or
editing /etc/postfix/transport
will show you what you can do to make special transport arrangements like the ones you're requesting.
The first example in the man page shows how you can configure something similar:
my.domain :
.my.domain :
* smtp:my-relay.my.domain
Putting this information in /etc/postfix/transport (the transport rules for postfix), will make it
send any mails from my.domain (first line) or any subdomain of my.domain (second line) without making any
alterations to the transport method or to the "next hop" (ie the next computer that will receive the mail and may deliver it or send it over to yet another computer/hop).
The 3rd line in the example will make any mails that aren't originating from "my.domain" (or any subdomain), as matched by the first 2 lines, be sent via SMTP to the machine called "my-relay.my.domain", which is supposed to relay the mail to the outside world.
If instead, you don't want to send out any mails to the outside world, you need to make the following changes to the example:
-in the first 2 lines, change "my.domain" to your domain;
-in the third line, choose a different transport service. Transport services are defined in /etc/postfix/master.cf. To bounce the external mails (ie send error messages like "mail delivery failed" back to whomever created the mail and/or to the postmaster), use "bounce:" (ie transport service = bounce,
nexthop = null/unaltered - when bouncing mails, the nexthop is probably disregarded anyway).
Other transport services, like "defer" (keep mail in queue and try again later - will keep the external mails in the queue until they expire), "flush", "relay", ... may work for you as well.
It depends really on what you want to do for the external mails that are created by your users.