Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

E-mail filtering does not seem to honor multiple line subjects

Discussion in 'E-mail Discussion' started by Nathan Ladwig, May 2, 2019.

Tags:
  1. Nathan Ladwig

    Nathan Ladwig Registered

    Joined:
    May 2, 2019
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Denver
    cPanel Access Level:
    DataCenter Provider
    Per the RFC at RFC 2822 () section 2.2.3 an e-mail subject header can be broken up into multiple lines, such as:

    Subject: This
    is a test

    If I create a filter that matches 'This is a test' it will not match the following:

    ----
    To: test@localhost
    From: test@localhost
    Subject: This
    is a test

    This is a test message.
    ----

    It will however match:

    ----
    To: test@localhost
    From: test@localhost
    Subject: This is a test

    This is a test message.
    ----


    I am seeing this behavior both in the Filter Test and in e-mails delivered using this encoding for the subject.

    Replicated on 76.0 (build 18)


    Here is another thread I found on StackOverflow/ServerFault regarding this issue:

    serverfault.com/questions/932111/invalid-newlines-in-headers-break-exim-filters
     
  2. Nathan Ladwig

    Nathan Ladwig Registered

    Joined:
    May 2, 2019
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Denver
    cPanel Access Level:
    DataCenter Provider
    The forums did not properly preserve whitespace on my example of how a header can be formatted. The RFC has a formatted example.
     
  3. omidsolo

    omidsolo Member

    Joined:
    Apr 29, 2019
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    US
    cPanel Access Level:
    Website Owner
    Email Filters in cPanel has some broken features, this folding header support is also one of them.
    Technically it is the easiest thing in programming to implement those filters, but in real world this is not happened!
    To fix this, when developer is going to find the search criteria in the source string, he just need to replace CRLF | \r\n with nothing so it's removed and then search in the string!
    Many of the broken Email Filter features in cPanel are just a matter of String manipulation!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,335
    Likes Received:
    2,162
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @Nathan Ladwig,

    Can you open a support ticket so we can take a closer look? You can post the ticket number here and we'll link this thread to it.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice