Skip to main content

Exim custom filter not working

Comments

8 comments

  • bubaweb
    I'm reciving too much spam on server, so I dont want make cpanel filter for each customer but I want to use whm exim filter. I setup and activate a new Custom Filter in exim filter setup. I just want to test a sample filter, but I really had too much trouble. No way to see it working Can some1 help me ? ##### rule 1 update 10-10-2017 ##### ########################### # logfile /var/log/filter.log 0644 if $header_subject: contains "viagra" or $header_subject: contains "Viagra" or $header_subject: contains "reddito ogni giorno" then save "/dev/null" 660 logwrite "$header_subject with $message_body" seen finish endif ########### end rule 1############### It dosnt work. My vps main admin use a custom System Filter File. Could it be the trouble or I'm making errors or mistake in my onw filter ? Thx

    details -> exigrep user@test /var/log/exim_mainlog 2017-10-10 23:38:41 1e22EL-0006cB-NX => me F= R=virtual_user T=dovecot_virtual_delivery S=3121 C="250 2.0.0 OH+IFeE93VltYQAAlXullg Saved" 2017-10-10 23:38:41 1e22EL-0006cB-NX Completed
    0
  • cPanelMichael
    Hello, Could you let us know the full steps you took to add and enable the filter? Thank you.
    0
  • bubaweb
    just go to whm -> [LIST]
  • Home "
  • Service Configuration "
  • Exim Configuration Manager then basic editor -> filter, I enable filter after creating it in /usr/local/cpanel/etc/exim/sysfilter/options/name_filter My isp add a custom filter to allow eml attach. Could be this the problem ? see image for details ?
  • 0
  • cPanelMichael
    Hello, Could you open a support ticket using the link in my signature so we can take a closer look? Thank you.
    0
  • bubaweb
    Your Support Request ID is: 8940757
    0
  • did-vmonroig
    Hello. I think we've exactly same problem. Filter works if tested with:
    sendmail -bF senders_blacklisted
    but it is ignored in normal operation. May I know what was the problem or should I open a new thread or ticket?
    0
  • cPWilliamL
    Hi @did-vmonroig, It looks like the underlying issue here was that the user was using both methods to set a custom exim filter, the first method done by his host, and the second method done by himself. First, the default system filter is `/etc/cpanel_exim_system_filter'. This file is dynamically generated against filters in the `/usr/local/cpanel/etc/exim/sysfilter/options/' directory; it does not use includes. In this case, the host setup the server with a custom 'system_filter' in place of the usual `/etc/cpanel_exim_system_filter'. Then, the user added his custom filter file to `/usr/local/cpanel/etc/exim/sysfilter/options/'. At this point, the host had already copied the generated `/etc/cpanel_exim_system_filter' to a custom file and added their changes. The custom 'system_filter' file was generated before the user added their latest filter rules to `/usr/local/cpanel/etc/exim/sysfilter/options/', hence it was not applied, albeit the UI seems to indicate it's active. It's active for the default system filter file, but default system filter file is not in use. I've filed an internal case under 'CPANEL-16503' with our developers, for our UI allowing users to enable Custom Filter files when a Custom System Filter file is already set. Ideally, there should be some warning or the options greyed out entirely. Thanks,
    0
  • did-vmonroig
    Thank you very much, cPWilliamL. I didn't realized there was a custom system filter file in use. Kind regards.
    0

Please sign in to leave a comment.