Mail filtering - Stop processing rules does not seem to work correctly

fred.philpott

Registered
Sep 26, 2008
4
0
51
I am trying to set up mail filters in cPanel on Bluehost.

This is set up as a page with drop down boxes to select the various options.

A single filter with one action works fine.

If I set two actions "Discard Message" followed by "Stop Processing Rules" the filter does not operate.

When I test the filter I get a message:-

Testing Exim filter file "/etc/vfilters/chartwellnorth.org"

Unseen save message to: /dev/null 0660
Finish
Filtering did not set up a significant delivery.
Normal delivery will occur.

Is this a cPanel problem or is it related to the Bluehost implementation?

Can anyone offer advice.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
This is a bug in how we create the filter. When 'Stop Processing rules' is selected, we add the 'unseen' directive to the filter. This is incorrect as according to the Exim Filter Specification ( http://exim.org/exim-html-current/doc/html/filter.html#SECTsigdel ):

3.8 Significant deliveries

When in the course of delivery a message is processed by a filter file, what happens next, that is, after the filter file has been processed, depends on whether or not the filter sets up any significant deliveries. If at least one significant delivery is set up, the filter is considered to have handled the entire delivery arrangements for the current address, and no further processing of the address takes place. If, however, no significant deliveries are set up, Exim continues processing the current address as if there were no filter file, and typically sets up a delivery of a copy of the message into a local mailbox. In particular, this happens in the special case of a filter file containing only comments.

The delivery commands deliver, save, and pipe are by default significant. However, if such a command is preceded by the word “unseen”, its delivery is not considered to be significant. In contrast, other commands such as mail and vacation do not set up significant deliveries unless preceded by the word “seen”. The following example commands set up significant deliveries:

deliver [email protected]ple
pipe $home/bin/mymailscript
seen mail subject "message discarded"
seen finish

The following example commands do not set up significant deliveries:

unseen deliver [email protected]ple
unseen pipe $home/bin/mymailscript
mail subject "message discarded"
finish

Thank you for the notice.
 

fred.philpott

Registered
Sep 26, 2008
4
0
51
Is there a possibility of a patch for this problem or release of an updated version of cPanel in the near future?
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
A possible work around right now would be to modify the rules directly to remove that option. However, that must be done with great care.
 

PbG

Well-Known Member
Mar 11, 2003
249
0
166
Where can I edit the number of lines checked in each message? Many spammers are loading their emails up with paragraphs of extraneous data so that the message will be longer than the default SA/filter is setup to check. At one time this default was 5000.