Exim System Filter to Block Forwarded E-Mails to Specific Destinations


Well-Known Member
May 21, 2006
I would like to create a custom Exim system filter that can prevent e-mails from being forwarded to certain domains, such as Gmail.com, Hotmail.com etc. Is this possible? I've looked through the Exim documentation and there's nothing listed about SRS variables, and I can't seem to determine how Exim would realise an e-mail is being forwarded. If it's helpful, I have SRS enabled within WHM.

Thank you for any assistance.


Staff member
Apr 11, 2011
Hello @Echelon17,

We document how to create a custom Exim system filter rule on the link below:

How to Customize the Exim System Filter File - cPanel Knowledge Base - cPanel Documentation

While it's outside our scope of support to develop a custom filter rule to blocks outgoing emails if they are both forwards and match a specific domain name, you may find the example on the following post helpful:

Easiest way to block all outgoing mail to a domain

This example demonstrates how to block all outgoing emails to a specific domain name. You'd have to adjust this rule to only apply to emails that were forwarded. If you need help developing the rule, the Exim-User's mailing list is often a useful resource:

Exim-users Info Page

Thank you.