Replying to a message from: Atul

Is it possible to configure the filter for restricting email communication with all external domains? For Example: Lets say the domain hosted on the server is 'hosteddomain.com'. Then a user1@hosteddomain.com will be able to SEND and RECEIVE email to user2, user3...etc@hosteddomain.com only and not to anyuser@anyotherexternal_domain.tld

How can you achieve this?