First enable message filtering on your SMTP Virtual Server:
Look up Microsoft support article number 261087.
Then:
1. In System Manager, expand the Global Settings container in the left pane, right-click Message Delivery, and then click Properties. To expand a container, double-click the container or click the plus sign (+) to the left of the container.
2. Click the Connection Filtering tab, and then modify the desired settings.