Exim stop all outgoing emails

A client wanted to ensure their scripts were sending out mails without the clients actually receiving the mails and having them redirected somewhere else.

You can do this with an exim filter:

1. Create /etc/cpanel_exim_system_filter_custom with the following content:

# Stop outgoing emails and redirect

if first_delivery
and (“$h_from:” contains “outgoing@domain.com”)
seen deliver “test@otherdomain.com”

Then in whm->Exim Configuration Editor->Filters

Change the filter to point to this new file.

Leave a Reply

Your email address will not be published. Required fields are marked *