Skip to main content

Limit a group of emails between few domains - custom email filtering - bcc filtering not working

Comments

2 comments

  • cPRex Jurassic Moderator
    Hey there! That advice sounds right - there isn't any tool in the product that will allow you to easily perform that work, so the only thing we can recommend would be custom Exim filters. We have been getting a lot of similar questions lately, so I added this post to request feedback:
    0
  • kssuhesh
    In the above scenario, the following rule worked and the mails from test@ to any domain in myorg.com, secondorg.com and thirdorg.com were working fine and mail to gmail.com failing. But if we add TO address in the allowed domains and set bcc or cc with gmail, the mail delivered. But it should have blocked. [QUOTE] #### Working to "TO" Address only #### if first_delivery and (("$h_from:" contains "tech@myorg.com") or ("$h_from:" contains "ittest@myorg.com") or ("$h_from:" contains "test@myorg.com") or ("$h_from:" contains "test2@myorg.com") and (("$h_to" does not contain "@myorg.com") and ("$h_to" does not contain "@secondorg.com") and ("$h_to" does not contain "@thirdorg.com") ) then fail "Filter-1-TO Messages from $header_from is limited. $header_to is not allowed domains." endif
    So I tried adding cc and bcc in the second section, but it is not working. [QUOTE] #### NOT WORKING #### if first_delivery and (("$h_from:" contains "tech@myorg.com") or ("$h_from:" contains "ittest@myorg.com") or ("$h_from:" contains "test@myorg.com") or ("$h_from:" contains "test2@myorg.com") and (("$h_to:, $h_cc, $h_bcc" does not contain "@myorg.com") and ("$h_to:, $h_cc, $h_bcc" does not contain "@secondorg.com") and ("$h_to:, $h_cc, $h_bcc" does not contain "@thirdorg.com") ) then fail "Filter-2-TO Messages from $header_from is limited. $header_to is not allowed domains." endif
    Anyone with a suggested filter code will be appreciated.
    0

Please sign in to leave a comment.