Re: [sieve] Sieve deleteheader and :count match type

Arnt Gulbrandsen <> Tue, 17 January 2017 18:21 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 845C4129530 for <>; Tue, 17 Jan 2017 10:21:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=unavailable autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id cqZtTCRsJBdd for <>; Tue, 17 Jan 2017 10:21:33 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id B194E127ABE for <>; Tue, 17 Jan 2017 10:11:25 -0800 (PST)
Received: from (localhost []) by (Postfix) with ESMTP id 46AD2FA0088; Tue, 17 Jan 2017 18:11:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;; s=mail; t=1484676683; bh=an+BJUhKTG9+7012Gn8dD2bjM8orSIeYAZuATtgfyg8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rxhMrBECMrn7u3t1yqfeSz8vcty/lgLPaJ0WyzclCIbyhuUFVlXtpJkybhvqZZqsd jowZqFCDQTon1EcOxAqi9+UXXJNpkn508Ux8pt0kJm6purHwvr0lq9vGp87/2Qc1UZ n/9u2YgNp3yYpXPZXSB0ycNY2PxvLD1lBB1xszgk=
Received: from by (Archiveopteryx 3.2.0) with esmtpsa id 1484676682-5232-5230/11/50; Tue, 17 Jan 2017 18:11:22 +0000
From: Arnt Gulbrandsen <>
Date: Tue, 17 Jan 2017 18:11:22 +0000
User-Agent: Trojita/v0.5-9-g8961725; Qt/4.8.6; X11; Linux; Devuan GNU/Linux 1.0 (jessie)
Mime-Version: 1.0
Message-Id: <>
In-Reply-To: <>
References: <> <> <> <>
Content-Type: text/plain; charset=utf-8; format=flowed
Archived-At: <>
Subject: Re: [sieve] Sieve deleteheader and :count match type
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: SIEVE Working Group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 17 Jan 2017 18:21:34 -0000

Ned Freed writes:
>> It's far-fetched, but deleting both subject fields if there are two or 
>> more? I think most people choose to use the first. Choosing to delete both 
>> isn't entirely unreasonable, though.
> I don't really see a case for deleting all of them.

FWIW, the messages I saw with two subject fields (back when I cared about 
such things) had two misleading/garbage/bad subject fields, not one with a 
bad value and one with an appropriate value.

My choice was to keep the shortest syntactically valid subject. But based 
on the data I saw I considered deleting both to be a defensible option.

>> The same applies to other header fields that may occur at most once.
> Again, all but one, sure, or maybe appending them to each other. But not 
> full deletion.

I see I also analysed messages with two content-type, 
content-transfer-encoding, message-id and date fields, but don't seem to 
have seen any where deleting both was appropriate.