Community Discussions and Support
Correct header references for HEADER content control

Dave - Yes, I think the rules are working correctly for me.  

I am using:

if HEADER

"Received" CONTAINS ".ru ([" weight 51 tag "foreign"

... so no asterisk.  I don't think that * should be used in simple string tests, only in regular expressions (unless one is trying to match a * in a string).

Other rules that I am finding useful are of the form: 

if HEADER "Received" CONTAINS ".pt[" weight 51 tag "foreign"

if HEADER

"From" CONTAINS ".lv>" weight 51 tag "foreign"

if SENDER CONTAINS

"*.ro>" weight 51 tag "foreign"

if HEADER

"
Received" CONTAINS ".do (" weight 51 tag "foreign"

if HEADER

"
Received" CONTAINS ".kh)" weight 51 tag "foreign"

Gordon

 

<P>Dave - Yes, I think the rules are working correctly for me.  </P> <P>I am using:</P><FONT size=1> <P>if HEADER </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</FONT></FONT></SPAN><FONT size=1>Received</FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</FONT></FONT></SPAN><FONT size=1> CONTAINS </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>".</FONT></FONT></SPAN><FONT size=1>ru </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>(["</FONT></FONT></SPAN><FONT size=1> weight </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>51 </FONT></FONT></SPAN><FONT size=1>tag </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</FONT></FONT></SPAN><FONT size=1>foreign</FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</P> <P></FONT></FONT></SPAN>... so no asterisk.  I don't think that * should be used in simple string tests, only in regular expressions (unless one is trying to match a * in a string).</P> <P>Other rules that I am finding useful are of the form: <FONT size=1> </FONT></P> <BLOCKQUOTE> <P>if HEADER <FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</FONT></FONT></SPAN><FONT size=1>Received</FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</FONT></FONT></SPAN><FONT size=1> CONTAINS </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>".</FONT></FONT></SPAN><FONT size=1>pt</FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>["</FONT></FONT></SPAN><FONT size=1> weight </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>51 </FONT></FONT></SPAN><FONT size=1>tag </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</FONT></FONT></SPAN><FONT size=1>foreign</FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</P></FONT></FONT></SPAN><FONT size=1> <P>if HEADER </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</FONT></FONT></SPAN><FONT size=1>From</FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</FONT></FONT></SPAN><FONT size=1> CONTAINS </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>".</FONT></FONT></SPAN><FONT size=1>lv</FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>>"</FONT></FONT></SPAN><FONT size=1> weight </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>51 </FONT></FONT></SPAN><FONT size=1>tag </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</FONT></FONT></SPAN><FONT size=1>foreign</FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</P></FONT></FONT></SPAN><FONT size=1> <P>if SENDER CONTAINS </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"*.</FONT></FONT></SPAN><FONT size=1>ro</FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>>"</FONT></FONT></SPAN><FONT size=1> weight </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>51 tag "foreign"</SPAN></FONT></FONT></P><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA><FONT size=1> <P>if HEADER </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</FONT></FONT></SPAN><FONT size=1>Received</FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</FONT></FONT></SPAN><FONT size=1> CONTAINS </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>".</FONT></FONT></SPAN><FONT size=1>do </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>("</FONT></FONT></SPAN><FONT size=1> weight </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>51 </FONT></FONT></SPAN><FONT size=1>tag </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</FONT></FONT></SPAN><FONT size=1>foreign</FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</SPAN></FONT></FONT></P><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA><FONT size=1> <P>if HEADER </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</FONT></FONT></SPAN><FONT size=1>Received</FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</FONT></FONT></SPAN><FONT size=1> CONTAINS </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>".</FONT></FONT></SPAN><FONT size=1>kh</FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>)"</FONT></FONT></SPAN><FONT size=1> weight </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>51 </FONT></FONT></SPAN><FONT size=1>tag </FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</FONT></FONT></SPAN><FONT size=1>foreign</FONT><FONT face="Courier New" size=1><FONT face="Courier New" size=1><SPAN lang=EN-CA>"</P></BLOCKQUOTE> <P></FONT></FONT></SPAN></SPAN></FONT></FONT></FONT></FONT></SPAN>Gordon</P> <P><FONT size=1></FONT> </P>

I am trying to test "Received:" headers as a basis for filtering in Content Control.  So far, this doesn't seem to be working properly.

There are some countries from which I don't want to receive mail.  So one example of a line in my content control file is:

 if HEADER "Received" CONTAINS "*.ru ([*" weight 51

The trigger weighting is 50. 

However, mail from .ru is still being received. even though it contains the *.ru ([* sequence in one of the Received: lines of the header.

I have tried Received and Received: (with a colon) and this doesn't make any difference.

There is usually more than one Received: header in a typical message and I am wondering whether this may be an issue, given that a local "Received:" header usually shows first in the header and one containing the filtering characters is usually second.

I am using Mercury/32 v.4.52.

Any help muich appreciated.

Thank you

GordonM

<P>I am trying to test "Received:" headers as a basis for filtering in Content Control.  So far, this doesn't seem to be working properly.</P> <P>There are some countries from which I don't want to receive mail.  So one example of a line in my content control file is:</P> <P> <FONT size=1>if HEADER </FONT><FONT face="Courier New" size=1>"</FONT><FONT size=1>Received</FONT><FONT face="Courier New" size=1>"</FONT><FONT size=1> CONTAINS </FONT><FONT face="Courier New" size=1>"*.</FONT><FONT size=1>ru </FONT><FONT face="Courier New" size=1>([*"</FONT><FONT size=1> weight </FONT><FONT face="Courier New" size=1>51</FONT></P> <P>The trigger weighting is 50. </P> <P>However, mail from .ru is still being received. even though it contains the *.ru ([* sequence in one of the Received: lines of the header.</P> <P>I have tried Received and Received: (with a colon) and this doesn't make any difference.</P> <P>There is usually more than one Received: header in a typical message and I am wondering whether this may be an issue, given that a local "Received:" header usually shows first in the header and one containing the filtering characters is usually second.</P> <P>I am using Mercury/32 v.4.52.</P> <P>Any help muich appreciated.</P> <P>Thank you</P> <P>GordonM</P>

[quote user="GordonM"]

I am trying to test "Received:" headers as a basis for filtering in Content Control.  So far, this doesn't seem to be working properly.

There are some countries from which I don't want to receive mail.  So one example of a line in my content control file is:

 if HEADER "Received" CONTAINS "*.ru ([*" weight 51

The trigger weighting is 50. 

However, mail from .ru is still being received. even though it contains the *.ru ([* sequence in one of the Received: lines of the header.

I have tried Received and Received: (with a colon) and this doesn't make any difference.

There is usually more than one Received: header in a typical message and I am wondering whether this may be an issue, given that a local "Received:" header usually shows first in the header and one containing the filtering characters is usually second.

I am using Mercury/32 v.4.52.

Any help muich appreciated.

Thank you

GordonM

[/quote]

 

Does it actually contain "*.ru"  or does it contain <something>.ru?  If so try using ".ru" only.

 

[quote user=&quot;GordonM&quot;]&lt;p&gt;I am trying to test &quot;Received:&quot; headers as a basis for filtering in Content Control.&amp;nbsp; So far, this doesn&#039;t seem to be working properly.&lt;/p&gt; &lt;p&gt;There are some countries from which I don&#039;t want to receive mail.&amp;nbsp; So one example of a line in my content control file is:&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;font size=&quot;1&quot;&gt;if HEADER &lt;/font&gt;&lt;font face=&quot;Courier New&quot; size=&quot;1&quot;&gt;&quot;&lt;/font&gt;&lt;font size=&quot;1&quot;&gt;Received&lt;/font&gt;&lt;font face=&quot;Courier New&quot; size=&quot;1&quot;&gt;&quot;&lt;/font&gt;&lt;font size=&quot;1&quot;&gt; CONTAINS &lt;/font&gt;&lt;font face=&quot;Courier New&quot; size=&quot;1&quot;&gt;&quot;*.&lt;/font&gt;&lt;font size=&quot;1&quot;&gt;ru &lt;/font&gt;&lt;font face=&quot;Courier New&quot; size=&quot;1&quot;&gt;([*&quot;&lt;/font&gt;&lt;font size=&quot;1&quot;&gt; weight &lt;/font&gt;&lt;font face=&quot;Courier New&quot; size=&quot;1&quot;&gt;51&lt;/font&gt;&lt;/p&gt; &lt;p&gt;The trigger weighting is 50.&amp;nbsp;&lt;/p&gt; &lt;p&gt;However, mail from .ru is still being received. even though it contains the *.ru ([* sequence in one of the Received: lines of the header.&lt;/p&gt; &lt;p&gt;I have tried Received and Received: (with a colon) and this doesn&#039;t make any difference.&lt;/p&gt; &lt;p&gt;There is usually more than one Received: header in&amp;nbsp;a typical message and I am wondering whether this may be an issue, given that a local &quot;Received:&quot; header usually shows first in the header and one containing the filtering characters is usually second.&lt;/p&gt; &lt;p&gt;I am using Mercury/32 v.4.52.&lt;/p&gt; &lt;p&gt;Any help muich appreciated.&lt;/p&gt; &lt;p&gt;Thank you&lt;/p&gt; &lt;p&gt;GordonM&lt;/p&gt;&lt;p&gt;[/quote]&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Does it actually contain &quot;*.ru&quot;&amp;nbsp; or does it contain &amp;lt;something&amp;gt;.ru?&amp;nbsp; If so try using &quot;.ru&quot; only.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

Thomas - A recent header contained:

Received: from 83.239.45.189.modem-pool.kuban.ru ([83.239.45.189])
          by prserv.net (kcin01) with SMTP
          id <2008012416001010100o1oohe>; Thu, 24 Jan 2008 16:00:15 +0000

If I don't need the asterisks in the rule, I'll try the .ru alone.

Thank you for the quick reply.

GordonM

 

&lt;P&gt;Thomas - A recent header contained:&lt;/P&gt; &lt;P&gt;Received: from 83.239.45.189.modem-pool.kuban.ru ([83.239.45.189]) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by prserv.net (kcin01) with SMTP &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id &amp;lt;2008012416001010100o1oohe&amp;gt;; Thu, 24 Jan 2008 16:00:15 +0000 &lt;/P&gt; &lt;P&gt;If I don&#039;t need the&amp;nbsp;asterisks in the rule, I&#039;ll try the .ru alone.&lt;/P&gt; &lt;P&gt;Thank you for the quick reply.&lt;/P&gt; &lt;P&gt;GordonM&lt;/P&gt; &lt;P mce_keep=&quot;true&quot;&gt;&amp;nbsp;&lt;/P&gt;

I'd use ".ru " instead of ".ru" to ensure it only sees the .ru.  The ".ru" will match mail.rull.com where the ".ru " will not.

 

 

&lt;p&gt;I&#039;d use &quot;.ru &quot; instead of &quot;.ru&quot; to ensure it only sees the .ru.&amp;nbsp; The &quot;.ru&quot; will match mail.rull.com where the &quot;.ru &quot; will not.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

Thomas - Yes, I have done that.  It's now a question of waiting to see if I get any mail with these sort of headers.

Thank you

GordonM

&lt;P&gt;Thomas - Yes, I have done that.&amp;nbsp; It&#039;s now a question of waiting to see if I get any mail with these sort of headers.&lt;/P&gt; &lt;P&gt;Thank you&lt;/P&gt; &lt;P&gt;GordonM&lt;/P&gt;

Content control on unwanted national domains is now working very well.  Thank you, Thomas

Content control on unwanted national domains is now working very well.&amp;nbsp; Thank you, Thomas

Hi Gordon,

Did you manage to get this resolved as I'm having the same problem?

Regards

Dave.

&lt;p&gt;Hi Gordon,&lt;/p&gt;&lt;p&gt;Did you manage to get this resolved as I&#039;m having the same problem?&lt;/p&gt;&lt;p&gt;Regards&lt;/p&gt;&lt;p&gt;Dave. &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