Skip to main content

How to filter outgoing spam emails using cpanel_exim_system_filter

Comments

6 comments

  • cPanelMichael
    Hello :) I am happy to see you were able to find a solution that worked successfully. Thank you for posting it here for others to see.
    0
  • Dent
    Thank you Michael. I figure if we all post our solutions somewhere online when we have them we can all find the solutions faster if same things happens to you. Sharing is caring :)
    0
  • hayridumanli
    Thank you very much for this solution, but what if the client uses more than one address, for example info@example.com, sales@example.com, import@example.com, etc. Then how can we change the code, such as; if $reply_address contains "@example.com" and $reply_address does not contain "info@" or $reply_address does not contain "sales@" or $reply_address does not contain "import@" then seen finish endif if $sender_address contains "@example.com" and $sender_address does not contain "info@" or $sender_address does not contain "sales@" or $sender_address does not contain "import@" Is it OK?
    0
  • Dent
    Great question! I would imagine that it is possible to add multiple keywords, but I am unsure about the exact syntax for exim filter. I think you can use and and or as you did but Im not sure how it should be specified exactly. The way you have specified it would probably not work. Maybe this works but you would have to test: if $reply_address contains "@example.com" and $reply_address does not contain "info@" or "sales@" or "import@" then seen finish endif
    0
  • estemismo
    Hello Can anyone confirm ? Thanks
    0
  • cPanelMichael
    The following documents offer some examples on how to implement custom filter rules: How to Customize the Exim System Filter File - cPanel Knowledge Base - cPanel Documentation How to Configure Mail Filters - cPanel Knowledge Base - cPanel Documentation Or, you could try the example in the earlier response. Thank you.
    0

Please sign in to leave a comment.