Skip to main content

Exim Custom Filter for outbound messages

Comments

10 comments

  • cPRex Jurassic Moderator
    Hey there! That all looks correct, and you don't need to restart or rebuild anything else. Do you see anything helpful when you check the Exim logs at /var/log/exim_mainlog while sending a message that would trigger that filter?
    0
  • BassTeQ
    Thanks, here's the log. 2022-11-22 17:07:27 SMTP connection from [X.X.X.X]:64686 (TCP/IP connection count = 1) 2022-11-22 17:07:30 1oxMRN-000BnD-QB <= removed@domain.com H=(SURFACEPRO8) [X.X.X.X]:64686 P=esmtpsa X=TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256 CV=no A=dovecot_login:removed@domain.com S=2589 id=005101d8fe38$b4610330$1d230990$@domain.com T="Custom Text" for removed@domain.com 2022-11-22 17:07:30 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1oxMRN-000BnD-QB 2022-11-22 17:07:30 1oxMRN-000BnD-QB => removed R=virtual_user T=dovecot_virtual_delivery C="250 2.0.0 kiX5FiJnfGMdsQAAvxTo3g Saved" 2022-11-22 17:07:30 1oxMRN-000BnD-QB Completed 2022-11-22 17:07:33 SMTP connection from (SURFACEPRO8) [X.X.X.X]:64686 closed by QUIT
    0
  • cPRex Jurassic Moderator
    That's interesting, as that doesn't seem to indicate any forwarders are filters being used when that message is handled. Could you create a support ticket with our team so we could take a look at this on our end?
    0
  • BassTeQ
    Thanks, will do!
    0
  • cPRex Jurassic Moderator
    Once you get that ticket submitted, if you could post the ticket number here I can follow along.
    0
  • BassTeQ
    Hey there! That all looks correct, and you don't need to restart or rebuild anything else

    Just found this article
    0
  • ServerHealers
    BassTeQ Yes, you should rebuild the Exim configuration and restart the service to include the custom filter on the Exim service there. If you check /etc/cpanel_exim_system_filter after rebuilding the Exim command, you will see that it is listed correctly there and reflect after the Exim service restart.
    0
  • cPRex Jurassic Moderator
    Yes, if you are changing the file mentioned there you would need to run those commands. If you are only making edits through the WHM interface, no additional commands are necessary.
    0
  • BassTeQ
    Thanks all, I've run the commands and the filters are now working! Support team also helped to provide me details on how to test a filter from the command line, which is useful! exim -d-all+filter -bF /usr/local/cpanel/etc/exim/sysfilter/options/server_custom_filter < /root/test_email_from_file
    0
  • ServerHealers
    Glad to hear! and thanks for the command to test the filter :)
    0

Please sign in to leave a comment.