Filter incoming mail by Specific Header Value

Operating System & Version
Almalinux 8
cPanel & WHM Version
106.0.14

danfbach

Active Member
Jan 14, 2021
26
3
3
United States
cPanel Access Level
Root Administrator
Hello,

We have a spam issue in which emails, sent originally to another email address, are then being forwarded in bulk to one of our support emails.
Since forwarding an email changes some of the headers, standard email blacklisting options do not work. The emails are not inherently "spam" in a traditional sense. Many of the emails aren't even actually spam, they're newsletters or just garbage that is meant to just be annoying, so they have a low spam score that gets through filters.

As the "spam" is only being forwarded from one email, I would like to filter by the "Resent-From:" header, as it is always the same email address.

Is there a way to accomplish this with exim configuration?
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,501
2,605
363
cPanel Access Level
Root Administrator
Hey there! Could you use the cPanel >> Email Filters tool instead of directly modifying Exim itself? That has options for "Any header" and you can even use regex to match the value you're looking for.

If that won't work for your case, then yes, you'll have to do some additional research on doing this directly in Exim, as I don't know of a specific value off the top of my head that would handle that.
 
  • Like
Reactions: danfbach