Set up to block email by name

You should be able to set a RegEx in the rule system or create your own postfix header check. I currently use

/etc/postfix/header_checks
Code:
/^From:/ INFO
/^To:/ INFO
/^Subject:.*medtrade.*/ REJECT
/^Subject:.*user.*list.*/ REJECT
/^Subject:/ INFO
 
I did not quite understand how to do this, could you give me example using data above .... in my example ... please .... tks
 
Ok, when you would need to follow the manual on how to copy the PMG template files and adjust the main.cf.in to include postfix header checks file.

In this file you need to do something like

/^From:.*zattini.*/ REJECT
/^From:.*netshoes.*/ REJECT

Hopefully, this is given in the header from. Otherwise you would need to check the body content.

After creating and including you would need to sync the templates as written in the docu.
 
Hi,

Never replay with a simple reject on unwanted mails. Use Discard. Even better use reject with a standard message like : xxx user unknown
 
Hi,

Never replay with a simple reject on unwanted mails. Use Discard. Even better use reject with a standard message like : xxx user unknown

Discard is forbidden in Germany as that suppress a mail and although being 99,9% sure, that it’s spam to be rejected, there is still a chance left to reject non-spam. Same for the message. I currently run good with this and had no trouble, but you’re free to do it different.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!