<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>www.ritlabs.com [Topic: %HEADER(&quot;Delivered-To&quot;)) is not working in filter]</title>
		<link>http://www.ritlabs.com</link>
		<description>New posts in %HEADER(&quot;Delivered-To&quot;)) is not working in filter of  forum at www.ritlabs.com [www.ritlabs.com]</description>
		<language>en</language>
		<docs>http://backend.userland.com/rss2</docs>
		<lastBuildDateTag>Wed, 21 Jan 2026 22:35:35 +0200</lastBuildDateTag>		<item>
			<title>%HEADER(&quot;Delivered-To&quot;)) is not working in filter</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum5/topic16699/message58399/">%HEADER(&quot;Delivered-To&quot;)) is not working in filter</a></b> in forum <a href="http://www.ritlabs.com/en/forums/forum5/">The Bat! - Filters</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_uJVUsEzN" href="/en/forums/" bx-tooltip-user-id="311">Daniel van Rooijen</a> wrote:<br />That&#39;s weird. Where did you find this?<br />=============<br />You are right, of course. Such syntax existed several years ago, as I remember. Now the names of the headers are the same as in original message. <br /><br />Regarding errors in <I>True Friend </I>macros, I think he should use %OHEADER instead of %HEADER macro. <br />
			<i>21 January 2026 22:35:35, <a href="http://www.ritlabs.com/en/forums/">Zygmunt Wereszczyński</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum5/topic16699/message58399/</link>
			<guid>http://www.ritlabs.com/en/forums/forum5/topic16699/message58399/</guid>
			<pubDate>Wed, 21 Jan 2026 22:35:35 +0200</pubDate>
			<category>The Bat! - Filters</category>
		</item>
		<item>
			<title>%HEADER(&quot;Delivered-To&quot;)) is not working in filter</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum5/topic16699/message58398/">%HEADER(&quot;Delivered-To&quot;)) is not working in filter</a></b> in forum <a href="http://www.ritlabs.com/en/forums/forum5/">The Bat! - Filters</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_Skes3CnQ" href="/en/forums/" bx-tooltip-user-id="132500">Zygmunt Wereszczyński</a> wrote:<br />You make mistake in %HEADER macro syntax. The argument in this macro should be written without minus sign, i.e. the correct use should be &nbsp; %HEADER("DeliveredTo") &nbsp;.<br />=============<br /><br />That's weird. Where did you find this?<br /><br />The online documentation (<noindex><a href="https://www.ritlabs.com/en/support/help/73/" target="_blank" rel="nofollow">link</a></noindex>) says:<br /><br /><B><I>%HEADER(header)</B><br />Inserts the text from the header field identified by the header parameter. The header parameter is the RFC-name of the header defined under "“Options -&gt; Preferences -&gt; Viewer/Editor -&gt; Message Headers”" </I><br /><br />Looking at the various header entities in “Options -&gt; Preferences -&gt; Viewer/Editor -&gt; Message Headers”, I find "Delivered-To", not "DeliveredTo". Is this different in your version of TB? <br />
			<i>21 January 2026 20:35:35, <a href="http://www.ritlabs.com/en/forums/">Daniel van Rooijen</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum5/topic16699/message58398/</link>
			<guid>http://www.ritlabs.com/en/forums/forum5/topic16699/message58398/</guid>
			<pubDate>Wed, 21 Jan 2026 20:35:35 +0200</pubDate>
			<category>The Bat! - Filters</category>
		</item>
		<item>
			<title>%HEADER(&quot;Delivered-To&quot;)) is not working in filter</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum5/topic16699/message58397/">%HEADER(&quot;Delivered-To&quot;)) is not working in filter</a></b> in forum <a href="http://www.ritlabs.com/en/forums/forum5/">The Bat! - Filters</a>. <br />
			<br />====quote====<br /><a class="blog-p-user-name" id="bp_hHNCTnUH" href="/en/forums/" bx-tooltip-user-id="97812">True Friend</a> wrote:<br />Where should I replace &quot;%HEADER(&quot;Delivered-To&quot;))&quot; with the real end recipient.But for some reason it doesn&#39;t work. Or rather it doesn&#39;t work only in filters, because when I enter the same filter in the templates to test it, it displays correctly.<br />=============<br />You make mistake in %HEADER macro syntax. The argument in this macro should be written without minus sign, i.e. the correct use should be <B><span class="bx-font" style="color:#ff0000">%HEADER(&quot;DeliveredTo&quot;)</span></B>. <br />
			<i>21 January 2026 18:31:16, <a href="http://www.ritlabs.com/en/forums/">Zygmunt Wereszczyński</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum5/topic16699/message58397/</link>
			<guid>http://www.ritlabs.com/en/forums/forum5/topic16699/message58397/</guid>
			<pubDate>Wed, 21 Jan 2026 18:31:16 +0200</pubDate>
			<category>The Bat! - Filters</category>
		</item>
		<item>
			<title>%HEADER(&quot;Delivered-To&quot;)) is not working in filter</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum5/topic16699/message58394/">%HEADER(&quot;Delivered-To&quot;)) is not working in filter</a></b> in forum <a href="http://www.ritlabs.com/en/forums/forum5/">The Bat! - Filters</a>. <br />
			I'm afraid that I can't read these one-line filters.. My older version (v8.3) of The Bat puts filters in a more human-readable format when you copy/paste them. <br /><br />Still, I can make a guess what they're doing. Apparently you want to archive messages as files in folders on a network drive, and the name of the folder must be the name of the recipient of the message. You said this goes wrong with 'forwarded' messages, but I think you meant 'redirected' (or 'auto-forwarded') &nbsp;messages that have been redirected by the mail server (not by a user).. I can see how that would cause a problem with archiving to the proper folder.<br /><br />When a message is saved in a wrongly named folder, and you view that message manually, is the 'Delivered-To:' line actually in it? I guess it's more likely that the line is there but your RegEx somehow doesn't catch it, but I am terrible with RegEx, so I can't tell you if you're doing anything wrong. I do have 2 thoughts, though:<br /><br />1) You're cleaning up the folder name using RegEx, but wouldn't you rather use the %VALIDFILECHARS macro? It may catch a few more bad characters and it would simplify the filters. Maybe that would make it easier to find the problem, too.<br /><br />2) Do you have a lot of mailboxes? If not, maybe you could make a filter for each one. It would test the recipient address and then export the message to a fixed folder name (so, the filter would not have to create a new folder that would possibly get the wrong name).<br /><br />Good luck! <br />
			<i>19 January 2026 06:31:05, <a href="http://www.ritlabs.com/en/forums/">Daniel van Rooijen</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum5/topic16699/message58394/</link>
			<guid>http://www.ritlabs.com/en/forums/forum5/topic16699/message58394/</guid>
			<pubDate>Mon, 19 Jan 2026 06:31:05 +0200</pubDate>
			<category>The Bat! - Filters</category>
		</item>
		<item>
			<title>%HEADER(&quot;Delivered-To&quot;)) is not working in filter</title>
			<description><![CDATA[<b><a href="http://www.ritlabs.com/en/forums/forum5/topic16699/message58393/">%HEADER(&quot;Delivered-To&quot;)) is not working in filter</a></b> in forum <a href="http://www.ritlabs.com/en/forums/forum5/">The Bat! - Filters</a>. <br />
			Hi. I need help with this problem.<br />I use the following filter to sort received emails:
====code====
<pre>&#92;&#92;lk-lk&#92;Data&#92;Archiv-Sorted&#92;acc_%ReplaceRegExp("&#91;&#92;.&#92;+&#92;-&#93;","_",%ReplaceRegExp("@","_",%OTOADDR))&#92;Incoming&#92;%ODATE="yyyy"&#92;%ReplaceRegExp("&#91;&#92;.&#92;+&#92;-&#93;","_",%ReplaceRegExp(".*@","",%FromAddr))&#92;%ReplaceRegExp("&#91;&#92;.&#92;+&#92;-&#93;","_",%ReplaceRegExp("@.*","",%FromAddr))</pre>
=============
<br />but it causes the problem that &quot;%OTOADDR&quot; takes the email fr om the original recipient of the message. So when the message is forwarded, the original recipient is displayed.<br /><br />Gradually I came to the point where I modified the filter like this:
====code====
<pre>&#92;&#92;lk-lk&#92;Data&#92;Archiv-Sorted&#92;acc_%ReplaceRegExp("&#91;&#92;.&#92;+&#92;-&#93;","_",%ReplaceRegExp("@","_",%HEADER("Delivered-To")))&#92;Incoming&#92;%ODATE="yyyy"&#92;%ReplaceRegExp("&#91;&#92;.&#92;+&#92;-&#93;","_",%ReplaceRegExp(".*@","",%FromAddr))&#92;%ReplaceRegExp("&#91;&#92;.&#92;+&#92;-&#93;","_",%ReplaceRegExp("@.*","",%FromAddr))</pre>
=============
<br />Where should I replace &quot;%HEADER(&quot;Delivered-To&quot;))&quot; with the real end recipient.<br /><br />But for some reason it doesn't work. Or rather it doesn't work only in filters, because when I enter the same filter in the templates to test it, it displays correctly.<br /><br />Wh ere am I making a mistake?<br /><br />Tested on version 12.<br /><br />I am attaching the header of the email I am trying to process (I have changed the delivery emails).<br />
====code====
<pre>Delivered-To: bbb@bbb.com
Received: by 2002:a05:651c:220e:b0:309:296f:4d77 with SMTP id y14csp1853758ljq;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mon, 24 Feb 2025 21:17:37 -0800 (PST)
X-Forwarded-Encrypted: i=2; AJvYcCWPci75EWUBAJrDy3i4GTGRZe0QdjIROf5XpaSYU8xqGhgknfvVz9v9Rk2Lv3k1yLydeR4X30uzIBjUuwzi@gmail.com
X-Google-Smtp-Source: AGHT+IHtqFyGewNARLkmbDmt5p7zNhMaZTVHlvuWHwH8lZlGI6QXHhrkxwjCr740pBMC7xO7uJSi
X-Received: by 2002:a17:902:ec81:b0:21f:7a9:48b2 with SMTP id d9443c01a7336-221a0001b5emr99181545ad.13.1740460656877;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mon, 24 Feb 2025 21:17:36 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1740460656; cv=none;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;d=google.com; s=arc-20240605;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b=dyn92QFW9285ZoKxmOCl8H4zRqTe8/C6AY8eq03JQHkWjDAvzmc1Lod/IGI5gn/BIG
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hAXOKmHHvqsKxDeS4QU/lZh3hKbougsg1NP7hXcli+VNWzS+8fFSDS9XFlmEQT372fVt
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mo/brRixXIWRkXVgFZ8Twj3P94ry6Krw4faGL7YUv8FNjDTJ8qucDf5CnWgcM/g9RwgD
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kNhUshvh4dCCg+EA7l4qfoBh88Jzl8X5MCg19gWxhxz/+RQmghonFuPa62g1ojO84II5
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zRrkC1HujmiviIIzwUxiyXmARzCLg5BBZ5sQSxYDHIaSgvgILyQXViqsORa9+pDPhMNT
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EOFg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;h=message-id:reply-to:date:from:to:subject:content-description
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :content-transfer-encoding:mime-version;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bh=UQ7cOzi/ad9EAdBlqUZ3wA9gj3u2LmyLIF3aL53mdBQ=;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fh=swcM5vBf+iWe9L5Xi1TXM4duvvZqXxJGdHXGIHq6FVA=;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b=hWU2ceQUQaWxd97XezGisDUKvYjjLwZMRvO680ydBUek393DEoMhbZzlr+CFO9nfb/
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; JsLCH2Kto5wr26RnAQHmr71Jr9+uHbJANff08TRdoLRBr442OB8UIH3xVfkWWNpVF4c+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; JoEYdGM27CLdb4WK7WV9z3uFFdlR1Mvz9Qmjvi7yCzH4pmZbk4pT8oCrw0IOsIn4AKZq
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pbBSLA1Ab2TnCW4is/WxNFUroNurshjZC5IbkJGDkfMVC9uzU4VYxyMygZYBSq0b+Jw/
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p5+ZDbmSy5UNN1dYBiQHfMulAOoCtKsc+1mphyVm8cIR2FYFxqwS6X23jISmON3KwE6j
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uJkA==;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; spf=pass (google.com: domain of chris@rackcorp.com designates 110.232.116.113 as permitted sender) smtp.mailfrom=chris@rackcorp.com;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=rackcorp.com
Return-Path: &#60;chris@rackcorp.com&#62;
Received: from au-gbl1-mail1.rackcorp.com (au-nsw-gbl1-mail2.rackcorp.com. &#91;110.232.116.113&#93;)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by mx.google.com with ESMTPS id d9443c01a7336-2230a09a4aesi13251065ad.424.2025.02.24.21.17.36
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for &#60;bbb@bbb.com&#62;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mon, 24 Feb 2025 21:17:36 -0800 (PST)
Received-SPF: pass (google.com: domain of chris@rackcorp.com designates 110.232.116.113 as permitted sender) client-ip=110.232.116.113;
Authentication-Results: mx.google.com;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; spf=pass (google.com: domain of chris@rackcorp.com designates 110.232.116.113 as permitted sender) smtp.mailfrom=chris@rackcorp.com;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=rackcorp.com
Received: by au-gbl1-mail1.rackcorp.com (Postfix, from userid 3000)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id BD4598F5E7; Sun, 26 Jan 2025 05:37:41 +0000 (UTC)
Received: from au-gbl1-mail1.rackcorp.com (localhost &#91;127.0.0.1&#93;)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by au-gbl1-mail1.rackcorp.com (Postfix) with ESMTP id A94601C428;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fri, 24 Jan 2025 23:59:04 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;au-nsw-gbl1-mail2.rackcorp.com
X-Spam-Level: *
X-Spam-Status: No, score=1.6 required=8.0 tests=ALL_TRUSTED,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FREEMAIL_FORGED_REPLYTO,LOTS_OF_MONEY,MISSING_MID autolearn=disabled
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version=3.4.1
Received: from &#91;10.0.7.59&#93; (unknown &#91;104.248.141.96&#93;)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(Authenticated sender: chris@rackcorp.com)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by au-gbl1-mail1.rackcorp.com (Postfix) with ESMTPA;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fri, 24 Jan 2025 23:59:04 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Description: Mail message body
Subject: Re:subject
To: Recipients &#60;chris@rackcorp.com&#62;
From: "Iris Foundation" &#60;chris@rackcorp.com&#62;
Date: Fri, 24 Jan 2025 15:58:54 -0800
Reply-To: irischarityfoundation@gmail.com
X-Filtered: By RackCorp Filter
Message-Id: &#60;20250126101316.BD4598F5E7@au-gbl1-mail1.rackcorp.com&#62;
X-MailStore-Message-ID: &#60;20250126101316.bd4598f5e7@au-gbl1-mail1.rackcorp.com&#62;
X-MailStore-Header-Hash: f11fdef72f228f23fbed238c05cc23a2c4edd88a
X-MailStore-Date: 20250225051736
X-MailStore-ArcDate: 20251103090255
X-MailStore-Flags: 0</pre>
============= <br />
			<i>19 January 2026 03:39:55, <a href="http://www.ritlabs.com/en/forums/">True Friend</a>.</i>]]></description>
			<link>http://www.ritlabs.com/en/forums/forum5/topic16699/message58393/</link>
			<guid>http://www.ritlabs.com/en/forums/forum5/topic16699/message58393/</guid>
			<pubDate>Mon, 19 Jan 2026 03:39:55 +0200</pubDate>
			<category>The Bat! - Filters</category>
		</item>
	</channel>
</rss>
