Community Discussions and Support
Adding a header in the Global Filter

Headers added by daemons and content control survive a move action since they are written into the QDF RFC 2822 message file prior to passing the message back to core for processing.  Headers added by filtering are only added when the final headers are written by core when creating the CNM file. A move bypasses this final core action. Check out the first few headers in a message delivered normally and one delivered via a move.  The Last received line and the X-Envelope-To: is missing.  Here's two of mine.

Normal delivery 

Received: from spooler by tstephenson.com (Mercury/32 v4.60); 7 Jan 2008 05:35:50 -0800
X-Envelope-To: <support@tstephenson.com>

X-SPAMWALL: Passed through antiSPAM test by SpamHalter 4.3.0 on tstephenson.com (251)
X-SPAMWALL: probability - 0.0%
X-CLAMWALL: Passed through antiviral test by ClamWall 1.1.4 on tstephenson.com (952)
Return-path: <NoReply@praktit.se>
Received: from mail.praktit.se (62.20.118.73) by tstephenson.com (Mercury/32

Move delivery 

X-SPAMWALL: Passed through antiSPAM test by SpamHalter 4.3.0 on tstephenson.com (72)
X-SPAMWALL: probability - 99.4%
X-SPAMWALL: SPAM detected!
X-CLAMWALL: Passed through antiviral test by ClamWall 1.1.4 on tstephenson.com (959)
Return-path: <mogens@sinagirl.com>
Received: from smtpout1.bayarea.net (209.128.100.196) by tstephenson.com

You might try using content control and passing a message to your program or script to add the necessary headers. 

&lt;p&gt;Headers added by daemons and content control survive a move action since they are written into the QDF RFC 2822 message file prior to passing the message back to core for processing.&amp;nbsp; Headers added by filtering are only added when the final headers are written by core when creating the CNM file. A move bypasses this final core action. Check out the first few headers in a message delivered normally and one delivered via a move.&amp;nbsp; The Last received line and the X-Envelope-To: is missing.&amp;nbsp; Here&#039;s two of mine. &lt;/p&gt;&lt;p&gt;&lt;b&gt;Normal delivery&lt;/b&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;Received: from spooler by tstephenson.com (Mercury/32 v4.60); 7 Jan 2008 05:35:50 -0800 X-Envelope-To: &amp;lt;support@tstephenson.com&amp;gt;&lt;/b&gt;&lt;/i&gt; X-SPAMWALL: Passed through antiSPAM test by SpamHalter 4.3.0 on tstephenson.com (251) X-SPAMWALL: probability - 0.0% X-CLAMWALL: Passed through antiviral test by ClamWall 1.1.4 on tstephenson.com (952) Return-path: &amp;lt;NoReply@praktit.se&amp;gt; Received: from mail.praktit.se (62.20.118.73) by tstephenson.com (Mercury/32 &lt;/p&gt;&lt;p&gt;&lt;b&gt;Move delivery&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;X-SPAMWALL: Passed through antiSPAM test by SpamHalter 4.3.0 on tstephenson.com (72) X-SPAMWALL: probability - 99.4% X-SPAMWALL: SPAM detected! X-CLAMWALL: Passed through antiviral test by ClamWall 1.1.4 on tstephenson.com (959) Return-path: &amp;lt;mogens@sinagirl.com&amp;gt; Received: from smtpout1.bayarea.net (209.128.100.196) by tstephenson.com &lt;/p&gt;&lt;p&gt;You might try using content control and passing a message to your program or script to add the necessary headers.&amp;nbsp;&lt;/p&gt;

I am having a problem adding a header to messages, as one of the actions while processing with the global filter.

I am using commands in the following sequence:

........................ 

Scan list      @C:\MERCURY\UserList.txt      Goto GordonList

Always                                                        Goto GordonSPAM

Label          GordonList

Always                                                        Add Header

Always                                                        Send text file

Always                                                        Move to another user

Always                                                        Exit processing

Label          GordonSPAM

Always                                                       Move to another user

Always                                                       Exit processing

.............................

To a large extent, this does what I want.  Messages arriving from users on my member list are correctly sent to the desired single account.  A text file is sent to these message originators who are using an old address (all messages coming through this part of the script use the old address).  Messages from users who are not in the member list are moved to a spam account.  However, the messages that are not spam should have a header added (X-List: Yes), but this doesn't happen .... there is no sign of the added header, when reading messages (Message Source) with Outlook Express.

As a side-issue, which is not concerning me too much, the text file message is taking a long time to go.  Sometimes several hours.  It seems that the connection to the MX server and an alternate server fail most of the time.  I don't know the reason for this failure.  Maybe it's a problem with my ISP.

Any help, particularly regarding the missing header, would be much appreciated.

I am using Mercury/32 ver 4.52

Thank you

GordonM

&lt;P&gt;I am having a problem adding a header to messages, as one of the actions while processing with the global filter.&lt;/P&gt; &lt;P&gt;I am using commands in the following sequence:&lt;/P&gt; &lt;P&gt;........................&amp;nbsp;&lt;/P&gt; &lt;P&gt;Scan list&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @C:\MERCURY\UserList.txt&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Goto GordonList&lt;/P&gt; &lt;P&gt;Always&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Goto GordonSPAM&lt;/P&gt; &lt;P&gt;Label&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GordonList&lt;/P&gt; &lt;P&gt;Always&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add Header&lt;/P&gt; &lt;P&gt;Always&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Send text file&lt;/P&gt; &lt;P&gt;Always&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Move to another user&lt;/P&gt; &lt;P&gt;Always&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit processing&lt;/P&gt; &lt;P&gt;Label&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GordonSPAM&lt;/P&gt; &lt;P&gt;Always&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Move to another user&lt;/P&gt; &lt;P&gt;Always&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit processing&lt;/P&gt; &lt;P&gt;.............................&lt;/P&gt; &lt;P&gt;To a large extent, this does what I want.&amp;nbsp; Messages arriving from users on my member list are correctly sent to the desired single account.&amp;nbsp; A text file is sent to these message originators who are using an old address (all messages coming through this part of the script use the old address).&amp;nbsp; Messages from users who are not in the member list are moved to a spam account.&amp;nbsp; However, the messages that are not spam should have a header added (X-List: Yes), but this doesn&#039;t happen .... there is no sign of the added header, when reading messages (Message Source) with Outlook Express.&lt;/P&gt; &lt;P&gt;As a side-issue, which is not concerning me too much, the text file message is&amp;nbsp;taking a long time to go.&amp;nbsp; Sometimes several hours.&amp;nbsp; It seems that the connection to the MX server and an alternate server fail most of the time.&amp;nbsp; I don&#039;t know the reason for this failure.&amp;nbsp; Maybe it&#039;s a problem with my ISP.&lt;/P&gt; &lt;P&gt;Any help, particularly regarding the missing header, would be much appreciated.&lt;/P&gt; &lt;P&gt;I am using Mercury/32 ver 4.52&lt;/P&gt; &lt;P&gt;Thank you&lt;/P&gt; &lt;P&gt;GordonM&lt;/P&gt;

The alway move prevents the header from being added to the message.  If you let the message get delivered by core rather than taking it out of the normal process with the move then you'll see the added header.

 

&lt;p&gt;The alway move prevents the header from being added to the message.&amp;nbsp; If you let the message get delivered by core rather than taking it out of the normal process with the move then you&#039;ll see the added header.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;

Thomas - Thank you for the reply.  I used the header to facilitate testing, so it doesn't really matter.  However, I am curious.  I want to redirect the message to another user, hence the use of Always Move.  If I just let Core deliver the message, it seems that it will just go to the original recipient, which is not what I want.

 GordonM

&lt;P&gt;Thomas - Thank you for the reply.&amp;nbsp; I used the header to facilitate testing, so it doesn&#039;t really matter.&amp;nbsp; However, I am curious.&amp;nbsp; I want to redirect the message to another user, hence the use of Always Move.&amp;nbsp; If I just let Core deliver the message, it seems that it will just go to the original recipient, which is not what I want.&lt;/P&gt; &lt;P&gt;&amp;nbsp;GordonM&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