Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Feb 2011
    Location
    London
    Posts
    4

    Default Improve user level email filters where a subject header is multi-line

    I have a situation where I am subscribed to receive emails from a number of forums managed by one provider. The only way of filtering incoming emails is on the subject line, which gets quite long. Unfortunately, when viewing email source headers I can see that the sending agent has inserted newline characters and spread the subject over multiple lines. This breaks cPanel's 'user level filtering' functionality as demonstrated in the following samples ( /frontend/x3/mail/filters/userfilters.html?account=xxxxxx@xxxxx.xxx ) ...

    Set up a filter with rule : Subject Contains 'testing 123'

    Use the filter test in following cases...

    *** Test 1: works fine

    Code:
    To: test@localhost
    From: test@localhost
    Subject: line1 testing 123
     line 2
    
    this is a test message
    *** Test 2: works fine

    Code:
    To: test@localhost
    From: test@localhost
    Subject: line1 
     line 2 testing 123
    
    this is a test message
    *** Test 3: FAILS

    Code:
    To: test@localhost
    From: test@localhost
    Subject: line1 testing
     123 line 2
    
    this is a test message
    Basically, if I were filtering on a single word, I'd be ok. But if filtering on a phrase, there's know way of knowing if the matching words will be split over multiple lines in the header. If they have been, the filter fails. Otherwise we are ok.

    So basically my feature request is that the implementation of cPanel's filters, and underlying components, are developed further to tolerate and work in the situation described.

    I first approached this by reporting as a bug (bugreport ID# 1227137). However it sounds like the various components are all behaving 'as intended' in their own contexts. But I argue that from a user experience point of view the current behaviour is neither expected nor desired.

    Thanks

    paul

  2. #2
    Registered User
    Join Date
    Feb 2011
    Location
    London
    Posts
    4

    Default Re: Improve user level email filters where a subject header is multi-line

    I should add that I was directed towards the following post for a potential configuration change to exim to 'unfold' the subject header. (though this would be an unsupported modification to the whm/cpanel setup)...

    Re: [exim] How to Unfold Subject Line ?

    However since I have worked what I consider a less scary workaround using a 'matches regex' filter rather than a 'contains' filter. So in my example above the following filter succeeds in all three cases...

    Rule: Subject matches regex 'testing\\\\s+123'

    Note: four backslashes are required to get one through to the exim filter.

    While this fixes my filter, and it is less scary than modifying the exim config, it is still not particularly user-friendly, so I'd still like cPanel's installation to manage unfolding of the subject header to allow the other filters to behave as expected in this circumstance.

    Thanks

  3. #3
    Member
    Join Date
    Jan 2008
    Location
    Buenos Aires, Argentina
    Posts
    942
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Improve user level email filters where a subject header is multi-line

    Possibly, cPanel should simply filter the new line markers in the subjects, even if they are encoded with any charset. Although, may this filtering slow down overall delivery process?

  4. #4
    Registered User
    Join Date
    Feb 2011
    Location
    London
    Posts
    4

    Default Re: Improve user level email filters where a subject header is multi-line

    As of cPanel 11.30.0 (build 27) it looks like all that escaping is no-longer required (or correct), the filter would now be rewritten...

    Rule: Subject matches regex 'testing\s+123'

Similar Threads & Tags
Similar threads

  1. User Email Filters - Add Custom Header?
    By doni49 in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 05-11-2009, 11:40 AM
  2. Restoring account level email filters
    By TGX in forum E-mail Discussions
    Replies: 5
    Last Post: 05-02-2008, 03:17 PM
  3. Discarding all Outgoing Email without a Specific Subject Line
    By Glowball in forum E-mail Discussions
    Replies: 15
    Last Post: 04-01-2008, 07:41 AM
  4. Allowing email by a code word in the subject line
    By cPandemonium in forum E-mail Discussions
    Replies: 4
    Last Post: 01-29-2008, 04:44 PM
  5. Replies: 0
    Last Post: 09-20-2003, 09:06 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube