Community Discussions and Support
mail filtering rules

I did the same (by editing my Winrules.pmc) using the rule the OP gave, with a Return-Path address from a post in my folders,

moved to NMF,

marked unread,

when Pegasus was re-started it got coloured

 

 

 

<p>I did the same (by editing my Winrules.pmc) using the rule the OP gave, with a Return-Path address from a post in my folders,</p><p>moved to NMF,</p><p>marked unread,</p><p>when Pegasus was re-started it got coloured</p><p>  </p><p> </p><p> </p>

I strongly suspect this is some oversight on my part, but:

I have written a mail filtering rule that searches for the string 

Return-Path: <myemailaddress>

as I've been getting a bunch of spam from invented addresses (so can't block on From), but this setting of return path to my own mailbox is a giveaway.

I've got a regular expression rule with the string above (myemailaddress of course replaced by the right string), searching Headers only, action is to move the matching msg to a spam folder. Rule is enabled and is in  New mail filtering rules, Rules applied when folder is opened. Yet nothing happens. I've got unread msgs with the relevant string as the first header, yet nothing gets moved. I'm using version 4.72.572

Tried quoting the string just in case, but no luck.

What might I be doing wrong? Just want the sucker to fire and move aside this category of spam.

 thanks for any advice

&lt;p&gt;I strongly suspect this is some oversight on my part, but:&lt;/p&gt;&lt;p&gt;I have written a mail filtering rule that searches for the string&amp;nbsp; &lt;/p&gt;&lt;p&gt;Return-Path: &amp;lt;myemailaddress&amp;gt; &lt;/p&gt;&lt;p&gt;as I&#039;ve been getting a bunch of spam from invented addresses (so can&#039;t block on From), but this setting of return path to my own mailbox is a giveaway.&lt;/p&gt;&lt;p&gt;I&#039;ve got a regular expression rule with the string above (myemailaddress of course replaced by the right string), searching Headers only, action is to move the matching msg to a spam folder. Rule is enabled and is in&amp;nbsp; New mail filtering rules, Rules applied when folder is opened. Yet nothing happens. I&#039;ve got unread msgs with the relevant string as the first header, yet nothing gets moved. I&#039;m using version 4.72.572&lt;/p&gt;&lt;p&gt;Tried quoting the string just in case, but no luck. &lt;/p&gt;&lt;p&gt;What might I be doing wrong? Just want the sucker to fire and move aside this category of spam.&lt;/p&gt;&lt;p&gt;&amp;nbsp;thanks for any advice &lt;/p&gt;

My first thought is that there is a problem with the move.  If you typed in the destination folder name, redo it using the Set button.

If that isn't it, here is a process I would follow to troubleshoot:

  • Since the current rule isn't working, delete it and start fresh (new mail filtering rule, expression, headers only).
  • If you have a number of rules, make this rule the very first one during troubleshooting to rule out interference by another rule.
  • Copy the Return-Path header from a message and paste it into this rule.  Be sure not to inadvertently add a leading or trailing space.
  • Set the action to "Set message colour" and pick a color.  You can change it to Move once done troubleshooting.
  • Add an 'always exit' rule as the second rule to insure processing is isolated to just the first rule. 
  • Save the rule set.
  • Close then open the new mail folder and check for the color change.
  • If you don't see the color, something is wrong with the expression.
  • Once you see color, change the rule sequence as desired if you don't want this one at the top (keep the following 'always exit' rule).  Change the color, then test again.
  • If still good, remove the 'always exit' rule, change the color, test again.
  • If still good, change the action to Move, then test again. 
  • A failure here indicates a problem with the move not with the filter so create a new folder and set the move destination to it.
Based on your original post it appears that you know that only unread messages are processed through the new mail filter rules.  It occurs as they arrive and each time the new mail folder is opened.
 
&lt;p&gt;My first thought is that there is a problem with the move.&amp;nbsp; If you typed in the destination folder name, redo it using the Set button.&lt;/p&gt;&lt;p&gt;If that isn&#039;t it, here is a process I would follow to troubleshoot: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Since the current rule isn&#039;t working, delete it and start fresh (new mail filtering rule, expression, headers only). &lt;/li&gt;&lt;li&gt;If you have a number of rules, make this rule the very first one during troubleshooting to rule out interference by another rule.&lt;/li&gt;&lt;li&gt;Copy the Return-Path header from a message and paste it into this rule.&amp;nbsp; Be sure not to inadvertently add a leading or trailing space. &lt;/li&gt;&lt;li&gt;Set the action to &quot;Set message colour&quot; and pick a color.&amp;nbsp; You can change it to Move once done troubleshooting. &lt;/li&gt;&lt;li&gt;Add an &#039;always exit&#039; rule as the second rule to insure processing is isolated to just the first rule.&amp;nbsp; &lt;/li&gt;&lt;li&gt;Save the rule set. &lt;/li&gt;&lt;li&gt;Close then open the new mail folder and check for the color change. &lt;/li&gt;&lt;li&gt;If you don&#039;t see the color, something is wrong with the expression.&lt;/li&gt;&lt;li&gt;Once you see color, change the rule sequence as desired if you don&#039;t want this one at the top (keep the following &#039;always exit&#039; rule).&amp;nbsp; Change the color, then test again.&lt;/li&gt;&lt;li&gt;If still good, remove the &#039;always exit&#039; rule, change the color, test again.&lt;/li&gt;&lt;li&gt;If still good, change the action to Move, then test again.&amp;nbsp; &lt;/li&gt;&lt;li&gt;A failure here indicates a problem with the move not with the filter so create a new folder and set the move destination to it.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Based on your original post it appears that you know that only unread messages are processed through the new mail filter rules.&amp;nbsp; It occurs as they arrive and each time the new mail folder is opened.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;/div&gt;

It could help if you post the relevant line(s) from Winrules.pmc, or failing that compare with my example (note the“*” which are required)

If expression headers matches "Return-Path:*A_N_Other@SomeWhere.com*" Move "28TU9BFY:7A82:FOL09E46"

&lt;p&gt;It could help if you post the relevant line(s) from Winrules.pmc, or failing that compare with my example (note the&ldquo;*&rdquo; which are required) &lt;/p&gt;&lt;p&gt;If expression headers matches &quot;Return-Path:*A_N_Other@SomeWhere.com*&quot; Move &quot;28TU9BFY:7A82:FOL09E46&quot; &lt;/p&gt;

I would suggest you place a space character after the first colon, to be followed by the asterisk.  The asterisk is going to promote the blanks for all previous characters,

ie:  If expression headers matches "Return-Path: *A_N_Other@SomeWhere.com*"

Martin

&lt;p&gt;I would suggest you place a space character after the first colon, to be followed by the asterisk.&amp;nbsp; The asterisk is going to promote the blanks for all previous characters,&lt;/p&gt;&lt;p&gt;ie:&amp;nbsp; If expression headers matches &quot;Return-Path: *A_N_Other@SomeWhere.com*&quot;&lt;/p&gt;&lt;p&gt;Martin &lt;/p&gt;

Thanks to all three of you for your suggestions.

Brian -- you are right of course about decomposing the problem to find the error. Did what you said and clearly the match is not working.

Here's WINRULES.PMC, which has only the single rule in it:


NoDisplay:New mail filtering rules
If expression headers matches "Return-Path: *XXXXX@mit.edu*" Highlight "3"
 

I did what the second 2 suggestions indicated, the asterisks and the space after the colon. Still no joy (ie no header color change). I have the feeling I'm overlooking something obvious. Example: Is there any sort of global switch that affects whether these rules are run?

 

Many thanks.

 

&lt;p&gt;Thanks to all three of you for your suggestions.&lt;/p&gt;&lt;p&gt;Brian -- you are right of course about decomposing the problem to find the error. Did what you said and clearly the match is not working.&lt;/p&gt;&lt;p&gt;Here&#039;s WINRULES.PMC, which has only the single rule in it:&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;NoDisplay:New mail filtering rules If expression headers matches &quot;Return-Path: *XXXXX@mit.edu*&quot; Highlight &quot;3&quot; &amp;nbsp;&lt;/p&gt;&lt;p&gt;I did what the second 2 suggestions indicated, the asterisks and the space after the colon. Still no joy (ie no header color change). I have the feeling I&#039;m overlooking something obvious. Example: Is there any sort of global switch that affects whether these rules are run?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Many thanks.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

I just did a quick test that worked by creating a new expression filter and copying and pasting the Return-Path header from the raw view of an existing message.  No astersisks needed.

The only requirements that I can think of are that the filter be an on open new message filtering rule, that the target message be in the new mail folder and marked as unread, and that the new mail folder be closed then opened to trigger processing.

&lt;p&gt;I just did a quick test that worked by creating a new expression filter and copying and pasting the Return-Path header from the raw view of an existing message.&amp;nbsp; No astersisks needed.&lt;/p&gt;&lt;p&gt;The only requirements that I can think of are that the filter be an on open new message filtering rule, that the target message be in the new mail folder and marked as unread, and that the new mail folder be closed then opened to trigger processing. &lt;/p&gt;
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft