Sometimes we have emails going to a particular address, which cannot be stopped. There are many reasons, but most common is an invalid address, which pollutes the mail queue with invalid entries. The simplest way to solve this is by adding a DISCARD directive for postfix.
If you don't have it already, add this line in main.cf
header_checks = regexp:/etc/postfix/header_checks
Create the file (or add to it, if you already have one):
Finally, restart postfix:
The file header_checks is very useful for other things. You can, for example, add a subject line to the logs using header_checks file:
The above command directs postfix to save the Subject into the logs. This makes things easier when searching for an email in the logs. The code can be separated by line in header_checks. Keep in mind that the more you add to it, the slower postfix becomes.
If you need help with Postfix or other Linux related issues, feel free to contact us and our team of IT consultants will be happy to assist you.