This is quite handy and easy to set up.
First, open up main.cf, the principal configuration file in Postfix. I use vim, but of course you can use whatever editor you like, e.g. vi, nano etc.
sudo vim /etc/postfix/main.cf
In your main.cf, add the following lines in the configuration
Now, create a file to store the list of banned names.
sudo touch /etc/postfix/sender_access
and now edit it to add the banned names…
sudo vim /etc/postfix/sender_access
Add the banned addresses in the following format..
Save the file. Now, create the hashed db file for this file..
sudo postmap /etc/postfix/sender_access
Now you should have a file in the /etc/postfix directory called /etc/postfix/sender_access.db
Now all you need to do is restart postfix.
sudo service postfix restart