Community Discussions and Support
AW: General Rules not working

Hello,


I'm not sure if I'm doing something wrong... I tested this in Pegasus Mail and it does work, so not sure what's happening.

I have created the following rule set (following is rules.mer):


Mercury Global Rules

Always AddHeader "X-Always Rule Triggered"

If attachment ExtnPart contains "xml" AddHeader "X-Attachment Rule Triggered"

 
(The actions are temporary because I need to see if the rule works. What I really want is to extract attachments, but since that wasn't working, I tried this approach to see if it was a folder issue or the rule not really triggering...).
 
When I check the headers of the email, I see no new header added (it's as if the rule is not triggered). Same rule (with the actual attachment extraction) does work in Pegasus Mail, as noted above.
 
This is a specific need we have at work, just to extract this type of attachments, and though I have managed to make it work with Pegasus Mail, I'd rather use Mercury and purchase a licence (my history with Pegasus Mail and Mercury dates back to 2000!).
 
Any advise would be appreciated. 
<p>Hello,</p><p> </p><p>I'm not sure if I'm doing something wrong... I tested this in Pegasus Mail and it does work, so not sure what's happening.</p><p>I have created the following rule set (following is rules.mer):</p><p> </p><p><span style="font-size: 10pt;">Mercury Global Rules</span></p><p>Always AddHeader "X-Always Rule Triggered"</p><p>If attachment ExtnPart contains "xml" AddHeader "X-Attachment Rule Triggered"</p><div> </div><div>(The actions are temporary because I need to see if the rule works. What I really want is to extract attachments, but since that wasn't working, I tried this approach to see if it was a folder issue or the rule not really triggering...).</div><div> </div><div>When I check the headers of the email, I see no new header added (it's as if the rule is not triggered). Same rule (with the actual attachment extraction) does work in Pegasus Mail, as noted above.</div><div> </div><div>This is a specific need we have at work, just to extract this type of attachments, and though I have managed to make it work with Pegasus Mail, I'd rather use Mercury and purchase a licence (my history with Pegasus Mail and Mercury dates back to 2000!).</div><div> </div><div>Any advise would be appreciated. </div>

Are you shure, that such a header with blanks in headername is allowed? Checked several mails in my mailbox and none has any headername with blanks.

bye   Olaf

 

<p>Are you shure, that such a header with blanks in headername is allowed? Checked several mails in my mailbox and none has any headername with blanks.</p><p>bye   Olaf</p><p> </p>

Thanks for your reply.

Not sure what you mean exactly, but this is an attachment-based rule, so headers should be irrelevant.

 
Again, thanks.

<p>Thanks for your reply.</p><p><span style="font-size: 10pt;">Not sure what you mean exactly, but this is an attachment-based rule, so headers should be irrelevant.</span></p><p>  <span style="font-size: 10pt;">Again, thanks.</span></p>

Instructions for Add header to message are: "You must enter the header exactly as it is to appear in the message, including the keyword and ':' character."

I tested this with "X-TEST: xml found" and it works as expected.

 

 

<p>Instructions for Add header to message are: "You must enter the header exactly as it is to appear in the message, including the keyword and ':' character."</p><p>I tested this with "<span style="font-size: 10pt;">X-TEST: xml found" and it works as expected.</span></p><p> </p><p> </p>

Have a look at posting by Rolf. Headers have this syntax:

<headername>: <headervalue>

There must not be blanks in headername - you have due to missing colon. So your header should probably be:

X-Always: Rule Triggered

X-Attachment: Rule Triggered

Bye     Olaf

 

&lt;p&gt;Have a look at posting by Rolf. Headers have this syntax: &lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;lt;headername&amp;gt;: &amp;lt;headervalue&amp;gt; &lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;There must not be blanks in headername - you have due to missing colon. So your header should probably be:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;X-Always: Rule Triggered &lt;/p&gt;&lt;p&gt;X-Attachment: Rule Triggered &lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Bye &amp;nbsp; &amp;nbsp; Olaf&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

Thanks. Not sure how I missed that ":".

But that doesn't explain why the attachment is not extracted. I mean, I started to to play with the Custom Headers to see if the rule was triggered.

In any case, I made it work with a General Rule set, via an alias, but I would have preferred if it worked just by defining a global rule.

 

Thanks, everyone. I guess we can close this thread. 

&lt;p&gt;Thanks. Not sure how I missed that &quot;:&quot;.&lt;/p&gt;&lt;p&gt;But that doesn&#039;t explain why the attachment is not extracted. I mean, I started to to play with the Custom Headers to see if the rule was triggered.&lt;/p&gt;&lt;p&gt;In any case, I made it work with a General Rule set, via an alias, but I would have preferred if it worked just by defining a global rule.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;Thanks, everyone. I guess we can close this thread.&amp;nbsp;&lt;/span&gt;&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