Receive a copy for Outgoing Emails from a specific address on a CPanel server with Exim

R

How Can We Help?

  1. Within Web Host Manager, go to Exim Configuration Manager then Advanced Editor, click on Save without changing anything in this section
  2. This should create a file named /etc/exim.conf.local
  3. Edit the above mentioned file and add some configurations to the @CONFIG@and @TRANSPORTSTART@ sections
    @CONFIG@
    system_filter_directory_transport = local_copy_outgoing
    
    @TRANSPORTSTART@
    local_copy_outgoing:
    driver = appendfile
    delivery_date_add
    envelope_to_add
    return_path_add
    group = cpaneleximfilter
    user = cpaneleximfilter
    mode = 0660
    maildir_format = true
    create_directory = true
  4. Next make a copy of /etc/cpanel_exim_system_filter

    cp /etc/cpanel_exim_system_filter /etc/cpanel_exim_system_filter_custom
  5. Add the following code to the bottom of /etc/cpanel_exim_system_filter_custom

    if $header_from: contains "[email protected]"
    then
    unseen deliver "[email protected]"
    endif
  6. Now within Web Host Manager, go to Exim Configuration Manager and Advanced Editor and follow the screenshot below
  7. Click on Save and your done

About the author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

About Author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

Follow Me