Sometimes a user has a need to have more robust filters than what can be set in cPanel itself. In this case, a user wants a variable match to deliver the email to one address and then continue processing so if it matches and delivers to another email address and then ultimately to the address sent. This can be done using unseen in a custom Exim filter.
First a file needs to be created in /usr/local/cpanel/etc/exim/sysfilter/options/ and in this how-to that file will be /usr/local/cpanel/etc/exim/sysfilter/options/custom.
In that file the following custom Exim filter will check if the body contains HIGHLANDCBPROJECT and deliver an email to firstname.lastname@example.org but because unseen is used the email continues onward and checks if the body contains HIGHLANDCBANTENNAPROJECT and if it does the email is delivered to email@example.com and because that is set to unseen the email continues again and delivers to the intended sent address.
$message_body contains "HIGHLANDCBPROJECT"
unseen deliver "firstname.lastname@example.org"
$message_body contains "HIGHLANDCBANTENNAPROJECT"
unseen deliver "email@example.com"
More documentation from Exim can be found at: Exim Filters
Once the filter file is created the Exim configuration needs to be rebuilt and Exim restarted. This is done by doing the following: