The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Testing of Email Filters Not Working

Discussion in 'E-mail Discussions' started by Valetia, Apr 20, 2010.

  1. Valetia

    Valetia Well-Known Member

    Joined:
    Jun 20, 2002
    Messages:
    207
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    When we add any filter using User Level Filtering or Account Level Filtering, they do not seem to take effect.

    When we do a Filter Test, a blank result shows up.

    How do we resolve this problem?
     
  2. serlex

    serlex Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    Rather than doing a test via cPanel, have you tried testing by sending any emails that meet the filtering rules?

    Try to use 'contains' and not equals, don't know equals doesn't work for me
     
  3. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    What is the full cPanel version and build number of the system?

    The above can be obtained by running the following command via root SSH access and simply copying-and-pasting the displayed output:
    Code:
    # grep -H '' /etc/*release /usr/local/cpanel/version /var/cpanel/envtype
     
  4. Valetia

    Valetia Well-Known Member

    Joined:
    Jun 20, 2002
    Messages:
    207
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    The output is as follows:
    Code:
    /etc/redhat-release:CentOS release 5.4 (Final)
    /usr/local/cpanel/version:11.25.0-STABLE_44718
    /var/cpanel/envtype:xen pv
     
    #4 Valetia, Apr 21, 2010
    Last edited by a moderator: Apr 21, 2010
  5. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Thank you for the version details. The issue of not displaying output from e-mail filter test results was recently investigated and escalated through to resolution; the aforementioned issue should be fully alleviated in an upcoming new build of cPanel version 11.25.0.

    Having automatic updates enabled will ensure the affected system receives any new updates and or applicable bug-fixes promptly upon availability; the update configuration can be viewed and modified via WebHost Manager (WHM) at the following menu path:
     
  6. Zepplin

    Zepplin Well-Known Member

    Joined:
    Oct 23, 2006
    Messages:
    93
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Blue Mountains, Australia
    cPanel Access Level:
    Root Administrator
    Good to hear, noticed same issue a few days ago on 11.25.0-CURRENT_44718
     
  7. keywaystab

    keywaystab Registered

    Joined:
    May 26, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Valetia,
    Is this statement meant to read that only the *testing* of filters with cPanel is not working, or are you actually experiencing trouble with the real filters?

    After updating to 11.25.0-STABLE_44718 on one "FreeBSD 6.2-STABLE" system and to 11.25.0-CURRENT_44718 on another "FreeBSD 6.2-STABLE" system, both appear to be failing to process the email filters (account level, or user level).

    cPanelDon,
    Is there further documentation on these filters that you can direct us towards?
     
  8. Valetia

    Valetia Well-Known Member

    Joined:
    Jun 20, 2002
    Messages:
    207
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Both, actually. The *testing* of filters doesn't work 100% of the time, while the real filters may or may not work depending on how they're set up.

    For example, if you try to filter an email whose subject 'ends with' a certain string, it may not work. But changing it from 'ends with' to 'contains' may work...
     
  9. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    #9 cPanelDon, Apr 27, 2010
    Last edited: Apr 27, 2010
  10. keywaystab

    keywaystab Registered

    Joined:
    May 26, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanelDon,
    I appreciate the links to the Exim docs, and I will review them further; however, I actually meant to ask whether there was cPanel documentation regarding the cPanel implementation of these filters?

    My understanding is that a "yaml" file is created from the cPanel interface, which is then somehow parsed into the filter/.filter file where appropriate. I'd like to read the documentation on how this is all performed so that I can better troubleshoot.

    While I'm asking for documentation, is there a unified set of documentation regarding the scripts in /scripts? We regularly run into issues, and have to guess as to which script will be fitting for our need, and search the forums in hopes that there is mention of that particular script name. If there is documentation in place for what each of the scripts does, this would be incredibly beneficial to us.

    Thank you very much.
     
  11. Zepplin

    Zepplin Well-Known Member

    Joined:
    Oct 23, 2006
    Messages:
    93
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Blue Mountains, Australia
    cPanel Access Level:
    Root Administrator
    Filter Trace is now showing all results from any filter tests as expected with the latest upgrade cPanel 11.25.0-C45139

    Cheers
     
  12. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The YAML file is simply a data store of the filters for an account. The file itself is not documented as it's intended for internal use only.

    Many, if not most, scripts in the /scripts directory are old and not recommended for use. Those that are recommended and maintained are documented here WHM Scripts.

    If you have questions about a specific script feel free to ask about it. If you have a solid grasp of Perl you can also examine the script itself.
     
  13. rlerner

    rlerner Registered

    Joined:
    Aug 13, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Same problem here. Believe the filters are working, but not the "Test Filter" feature when creating new filters in cPanel.

    Screen reads "Filter Trace Results:" and then has an empty one-line box. Screenshot below:
    [​IMG]

    Using cPanel 11.25.0 r44718, auto updates nightly. Here is my configuration:

    /etc/redhat-release:CentOS release 5.4 (Final)
    /usr/local/cpanel/version:11.25.0-RELEASE_44718
    /var/cpanel/envtype:standard

    Anyone have any ideas how to fix this?:confused:
     
  14. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Build number 44718 was released before the issue was corrected and so it does not contain the subsequent fix you are expecting. At the present time I believe all build trees except STABLE and RELEASE contain the specific correction; you may either opt to wait until STABLE and or RELEASE have a new build generated or switch to the CURRENT build tree to receive the update sooner.

    The following resource may be used to verify when a new build is available: cPanel Downloads - Latest cPanel/WHM Builds
     
    #14 cPanelDon, May 10, 2010
    Last edited: May 10, 2010
  15. urano007

    urano007 Member

    Joined:
    Feb 11, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Seems like the problem persists...

    I have 11.25.0-R46156 and the filters are not working.
     
  16. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Please submit a support request so that we may assist with investigating the issue affecting your server; direct access is required so that we can properly diagnose and verify the specific circumstances involved. When available, please let me know the ticket ID number of your support request so that we may follow-up internally.
     
  17. urano007

    urano007 Member

    Joined:
    Feb 11, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Mi Support Ticket ID


    745130

    Thanks!
     
    #17 urano007, Jul 2, 2010
    Last edited: Jul 2, 2010
  18. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    During investigation two important areas of interest were noted:
    • Issue #1.)
      When testing filters on the system, with cPanel version 11.25.0-RELEASE_46156, we verified that using the X3 theme allows filter test output to display normally whereas using the configured third-party theme, from RVSkin version 9.75, filter test output was not displayed. To clarify, filter test output was not shown due to the affected cPanel account using a third-party theme that was found to contain a minor typo in the following file:
      Code:
      /usr/local/cpanel/base/frontend/rvskin/mail/filters/filtertest.html
      The same issue was already corrected in the stock-default X3 theme (as detailed earlier in this thread), but if a third-party theme is affected that would require an update from the applicable third-party vendor or developer. The fix used may be based off of the corrected file in X3. For information on applying a fix manually, here is output from "diff" showing the applicable line, before and after correction:
      Code:
      -		<div class="output" name="tracefilter" cols="80" rows="15" readonly style="text-align:left;"><pre><?cp Email::tracefilter(%,trace) account=$FORM{'account'},msg=$FORM{'msg'})"></pre></div>
      +		<div class="output" name="tracefilter" cols="80" rows="15" readonly style="text-align:left;"><pre><?cp Email::tracefilter(%,trace) account=$FORM{'account'},msg=$FORM{'msg'} ?></pre></div>
      
    • Issue #2.)
      When using "equals" this will require the e-mail header to exactly match the filter rule criteria; for example, the following filter rule and example e-mail header do not exactly match when processed by Exim:
      Code:
      [B]Filter Rule:[/B]
      From [U]equals[/U]
      [I]user@domain.tld[/I]
      
      [B]E-mail Header:[/B]
      From: [I]"Domain User" <user@domain.tld>[/I]
      
      [B]Outcome/Result:[/B]
      Header '[I]"Domain User" <user@domain.tld>[/I]' [U]does not equal[/U] filter-defined criteria '[I]user@domain.tld[/I]'
      This will not trigger the action defined in your e-mail filter.
      The From mail header is set by the sender's mail client and for this reason we recommend considering use of "contains" or "matches regex" instead of "equals" to better account for unforeseen differences in the From header of incoming messages. Here are a few examples to consider, one that still uses "equals" and another that uses "contains":
      Code:
      [B]Filter Rule:[/B]
      From [U]equals[/U]
      [I]"Domain User" <user@domain.tld>[/I]
      
      [B]E-mail Header:[/B]
      From: [I]"Domain User" <user@domain.tld>[/I]
      
      [B]Outcome/Result:[/B]
      Header '[I]"Domain User" <user@domain.tld>[/I]' [U]equals[/U] filter-defined criteria '[I]"Domain User" <user@domain.tld>[/I]'
      This will trigger the action defined in your e-mail filter.
      Code:
      [B]Filter Rule:[/B]
      From [U]contains[/U]
      [I]user@domain.tld[/I]
      
      [B]E-mail Header:[/B]
      From: [I]"Domain User" <user@domain.tld>[/I]
      
      [B]Outcome/Result:[/B]
      Header '[I]"Domain User" <user@domain.tld>[/I]' [U]contains[/U] filter-defined criteria '[I]user@domain.tld[/I]'
      This will trigger the action defined in your e-mail filter.
     
  19. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    For reference and clarification, the issue that affected the display of filter test results is corrected in all build trees, including STABLE, RELEASE, CURRENT, and EDGE; all builds numbered 45750 or higher are inclusive of the applicable correction in the cPanel X3 theme.
     
  20. Siteman

    Siteman Member

    Joined:
    Nov 15, 2008
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the update on this vexing issue :)
     
Loading...

Share This Page