Skip to main content

How to remove X-Ham-Report from message header

Comments

3 comments

  • cPanelMichael
    Hello @Charles Lindsey, Have you tried making use of the "headers remove" filter action to remove part of the message header instead of handling that through a script? EX: #HamRemoval if $header_to: is "test1@email-domain-test.tld" then headers remove "X-Ham-Report" deliver "test2@email-domain-test.tld" endif
    Note this will only work as an Exim system filter rule, and requires root access to the server to setup: How to Customize the Exim System Filter File - cPanel Knowledge Base - cPanel Documentation Thank you.
    0
  • Charles Lindsey
    Mailing List Archive: remove_header not working? contains a report of similar failure of this method (without reaching much conclusion). It does suggest using report_safe 0 which I have tried, but still no results.
    0
  • cPanelMichael
    Hello @Charles Lindsey, I performed some additional testing and concluded that it's not possible to remove X-Ham-Report from the email header using account-level and email-level filter rules or custom SpamAssassin rules. Header addition and removal is available only in the Exim system filters (which requires root access to add/edit). I did test creating an Exim system filter as "root" and confirmed the following example works as intended: #HamRemoval if $header_to: is "test1@email-domain-test.tld" then headers remove "X-Ham-Report" deliver "test2@email-domain-test.tld" endif
    The best advice I can provide is to reach out to your web hosting provider to see if they can setup this custom Exim system filter rule on your behalf. Let me know if you have any additional questions. Thank you. Moderation Note: I edited/removed some of the previous posts on this thread to reflect the results of additional testing.
    0

Please sign in to leave a comment.