Hello,
I have a VPS with almalinux and cPanel on it, and it also uses EXIM. My question is regarding the EXIM header information and changing that information. I will explain
In testing my software i sent myself an email via PHP to test my email process. Looking at the email header information i noticed that there is a email header which has my cPanel username as part of the header and i would like to remove my cPanel username from the mail header. First i dont want my cPanel username to be public for security reasons and second i dont understand why the username is even part of the mail header in the first place.
I did post the question on the cPanel forum but no answer to my question and so i went from there to stackoverflow (and i believe we all know the results there, i could not even get past the front door with my question before being shot down on even posting the question for some BS reason) So i decided to try a linux forum which is why i am here.
The mail header looks like this:
I have found some recources the last few days working on this.
https://stackoverflow.com/questions/33984833/exim-trying-to-change-received-headers-in-email
https://www.exim.org/exim-html-current/doc/html/spec_html/ch-main_configuration.html
And then i found some AI offered suggestions, all of which say to modify the EXIM config file or make a custom rule file and modify the "received_header_text" in some way. AI suggested to use this command:
or
or
So natually i went looking in the config file, the key is not there. So next i went looking for the actual text in the cPanel files by doing
and it found nothing but my custom file i created.
So either the key used to be in cPanel or EXIM and is no longer there or its something else. But i really need to get that username removed.
Has anyone ever run into this before and what is the solution to removing the username from the mail header?
Thank you for your time,
dave
I have a VPS with almalinux and cPanel on it, and it also uses EXIM. My question is regarding the EXIM header information and changing that information. I will explain

In testing my software i sent myself an email via PHP to test my email process. Looking at the email header information i noticed that there is a email header which has my cPanel username as part of the header and i would like to remove my cPanel username from the mail header. First i dont want my cPanel username to be public for security reasons and second i dont understand why the username is even part of the mail header in the first place.
I did post the question on the cPanel forum but no answer to my question and so i went from there to stackoverflow (and i believe we all know the results there, i could not even get past the front door with my question before being shot down on even posting the question for some BS reason) So i decided to try a linux forum which is why i am here.

The mail header looks like this:
with username being my cPanel username, that is what i want to remove.Received: from username by server.example.com with local (Exim 4.98.1) (envelope-from <[email protected]>) id 1tsvww-00000000OKq-2hdG for [email protected]; Fri, 14 Mar 2025 03:23:28 +0000
I have found some recources the last few days working on this.
https://stackoverflow.com/questions/33984833/exim-trying-to-change-received-headers-in-email
https://www.exim.org/exim-html-current/doc/html/spec_html/ch-main_configuration.html
And then i found some AI offered suggestions, all of which say to modify the EXIM config file or make a custom rule file and modify the "received_header_text" in some way. AI suggested to use this command:
Code:
received_header_text = Received: by %{primary_hostname} [%{client_ip}]
or
Code:
headers remove Received: from [my actual username] (no brackets)
or
Code:
headers remove Received: from $username
So natually i went looking in the config file, the key is not there. So next i went looking for the actual text in the cPanel files by doing
Code:
grep -R received_header_text usr/local/cpanel
and it found nothing but my custom file i created.
So either the key used to be in cPanel or EXIM and is no longer there or its something else. But i really need to get that username removed.
Has anyone ever run into this before and what is the solution to removing the username from the mail header?
Thank you for your time,
dave

Last edited: