Sample Header Ad - 728x90

How can I filter out spam mails sent to a specific user with an arbitrary name on postfix?

0 votes
2 answers
90 views
Recently one of our company's accounts gets a target of spam mails. This account is already locked, but spam emails never end. Thus, I edit */etc/postfix/header_check* file as follows: /^To:.targetuser@ourcompanyshostname\.org/ REJECT I have tested whether I cannot send to a mail to this user and I confirmed that postfix successfully rejects it:) But, it cannot reject the spammer's mail since the header looks like: To: targetuser@ourcompanyshostname\.org There is an any name in addition to the actual email address that the spammer changes every time. How can I reject this rule?
Asked by J. Kotaki (3 rep)
Mar 26, 2018, 05:40 AM
Last activity: Oct 24, 2020, 04:25 PM