Restricting postfix destination domain

Postfix has alot of options and theres probably alot of other ways to do this also, but here's how I did.

add this line to /etc/postfix/main.cf

transport_maps = hash:/etc/postfix/transport

then edit /etc/postfix/transport like this:

example.com :
* error: only specified destination domains are allowed

The "* error: message" will create a bounce in the logs
you can also use "* discard:" ,that will just discard the mails but will still show up in the mail log as if they were sent.

Next hash the transport file and reload postfix

postmap /etc/postfix/transport
/etc/init.d/postfix reload