Exim Header Fields and Rewriting

Operating System & Version
CENTOS 7.8 kvm [vps]
cPanel & WHM Version
v88.0.10

_jman

Active Member
Jan 17, 2007
41
3
158
In the docs on customizing the Exim System Filter File

How to Customize the Exim System Filter File | cPanel & WHM Documentation

there is a reference to "$_from:" which would be the sender's address ("From" in the Exim docs.)

Where is a complete list of all header field names available for use?

Please don't just point to the Exim docs. Have looked through them and there does not seem to be a single, simple consolidated list of such header field names.

Also, when working with files such as /etc/antivirus.empty, and with regards to headers_add and headers_remove, what headers cannot be modified?

Here's an example of one wherein a company rep sends from a personal address, but "From" is re-written from the personal to a corporate email alias. Entries in /etc/valiases would take care of forwarding anything sent to the corporate alias to the actual, personal address. This is for inbound, and works as expected:

# Rewrite From address for Vermont rep
if $header_from: contains "[email protected]"
then
headers add "Actual-From: [Rep-Rewrite] $h_from:"
headers remove From
headers add "From: Vermont Rep <[email protected]>"
headers remove Reply-To
headers add "Reply-To: Vermont Rep <[email protected]>"
endif


Please advise. Thanks!
--
Carl
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
I have to point you to the exim docs because that's where they're listed - 3. Exim filter files this section lists useful variables including header fields. For details on what can and cannot be modified or alternate fields I'd suggest consulting with the exim mailing lists on specifics as they'd be the very best place to go to for this information Exim-users Info Page