Looking at the email i sent to myself from my VPS server i noticed that there is a “Received: from” email header which contains my cPanel username, i want to remove that username from the header text for security reasons.
Here is what it looks like in the email header:
Received: from username by server3[DOT]example[DOT]com with local (Exim 4.98.1) (envelope-from mailto:noreply[AT]example[DOT] id 1tsvww-00000000OKq-2hdG for example[AT]example[DOT]com; Fri, 14 Mar 2025 03:23:28 +0000
What have i tried: First i contacted cPanel community, they dont seem to know how to do this. Then i found several resources including AI suggestions which i wont post here because the solution does not work.
Found this :
I also found this (which is the only topic that includes text “received_header_text”) on stackoverflow.
This link above and all the AI suggestions suggest to edit the “received_header_text” key in the EXIM config. The problem is that this key does not existed in cPanel. Maybe it used to but not anymore. I did a grep -R search for received_header_text in the usr/local/cpanel dir on my server and it found nothing.
I have also created a custom rule for EXIM to rewrite that text and the header with username is still there.
headers remove Received: from [my actual username] (no brackets)
and headers remove Received: from $username
The username in the email header is bad for security as i dont want my username to be public, so i would like to remove it. So how do i remove the username from the EXIM header?
Thanks