How to use "Filter by Domain" with emails that uses amazonses.com?

Secmas

Well-Known Member
Feb 18, 2005
391
21
168
How to use "Filter by Domain" with emails that uses amazonses.com?

Here is the issue, "Filter by Domain" is a great utility in WHM and I use it in a daily basis.

But some domains that uses amazonses.com servers send spam and amazonses.com can't be added to the filter because a lot of valid emails also comes from those servers.

Checking on the mail headers it shows, per example, that the email received on the server comes using "envelope":

Received: from a11-113.smtp-out.amazonses.com ([54.240.11.113]:55681)
(Exim 4.95)
(envelope-from <010001[email protected]>)


and the "envelope" takes precedence to the "From:" field that in this case has the following info:

MIME-Version: 1.0
From: "guatemaxxxxx.com" <[email protected]>
To: [email protected]
Date: Wed, 31 Aug 2022 01:58:29 +0000


Due to the above, I can't "Filter by Domain" using guatemaxxxxx.com

What should be done to make that "Filter by Domain" could check both the "envelope" and the "From:" headers to match what we want to filter?
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,643
2,629
363
cPanel Access Level
Root Administrator
Hey there! Unfortunately there isn't a way to do that with the "Filter Incoming Emails by Domain" tool as that only looks at the "From" field of the message. For any more advanced filtering at the server level, you'd have to do some manual work with Exim. This would also make a great feature request if you'd like to submit one using the link in my signature.
 

Secmas

Well-Known Member
Feb 18, 2005
391
21
168
@cPRex,
thank you for the advice, I have wrote my request with the title:
"Filter Incoming Emails by Domain" should check Envelope and From headers.