Filters and forwarders that can be managed directly within a cPanel account are only applied to incoming messages. They do not affect outbound messages. To forward outbound messages, you need to create a system filter. This article provides an example of how you can use an Exim system filter in cPanel to forward all outbound mail from an email account.
Please note that cPanel is not able to provide support for customizing the specific contents of your Exim filters. If you need help crafting a custom filter, you should reach out to a systems administrator with the skills, training, and expertise required to do so for you.
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Create the filter file.
- Open the newly created filter file in your preferred text editor.
- Add the following to the file.
if ("$h_from:" contains "firstname.lastname@example.org")Please note that 'email@example.com' and 'firstname.lastname@example.org' must be replaced with the sender and recipient email addresses, respectively.
## The following will make it so that the original recipient is skipped and
## and only email@example.com will recieve the message
## If you add the word unseen in front, the message will be forwarded to
## firstname.lastname@example.org as well as delivered to the original recipient.
## For example, you would remove the above deliver line and replace it with:
## unseen deliver "email@example.com"
- Rebuild the Exim configuration.
/scripts/buildeximconfPlease note that cPanel will copy your custom filter into the system filter file,
- Restart Exim.