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

Arnt Gulbrandsen <arnt@gulbrandsen.priv.no> Tue, 17 January 2017 12:20 UTC

Return-Path: <arnt@gulbrandsen.priv.no>
X-Original-To: sieve@ietfa.amsl.com
Delivered-To: sieve@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A0BEB129447 for <sieve@ietfa.amsl.com>; Tue, 17 Jan 2017 04:20:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
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=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=gulbrandsen.priv.no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qHO5sTGnSDG2 for <sieve@ietfa.amsl.com>; Tue, 17 Jan 2017 04:20:17 -0800 (PST)
Received: from strange.aox.org (strange.aox.org [80.244.248.170]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4BC471293E9 for <sieve@ietf.org>; Tue, 17 Jan 2017 04:20:17 -0800 (PST)
Received: from fri.gulbrandsen.priv.no (localhost [127.0.0.1]) by strange.aox.org (Postfix) with ESMTP id 55BF1FA0088; Tue, 17 Jan 2017 12:20:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gulbrandsen.priv.no; s=mail; t=1484655615; bh=qcmr+If0wVzVAHtWJHMV/IPFjfyHbuzeEoIDU6J1siA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=cFTlXyy4ysewFLrajdY3S/ltmfaspsgg4YRkJmTaVPI8+7OKPcqjAxD1JHHXwaPJG 25rzkRjvpA0SvW2RtDuHJqasa9Fk99whbRVENg4yvkRS0lUJR1eq6nQBnhL28RZFUm tPJ7t79WmvvgnMbBXRNOiSe6HnH32ITTASaV0hW0=
Received: from arnt@gulbrandsen.priv.no by fri.gulbrandsen.priv.no (Archiveopteryx 3.2.0) with esmtpsa id 1484655613-5233-5230/11/41; Tue, 17 Jan 2017 12:20:13 +0000
From: Arnt Gulbrandsen <arnt@gulbrandsen.priv.no>
To: sieve@ietf.org
Date: Tue, 17 Jan 2017 12:20:13 +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: <b5c375c0-6617-4cf1-8721-5f19d39ed3f1@gulbrandsen.priv.no>
In-Reply-To: <01Q9RHX13ZFM00004H@mauve.mrochek.com>
References: <82102421-fed0-13eb-f557-83c878618a04@andrew.cmu.edu> <01Q9RHX13ZFM00004H@mauve.mrochek.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/sieve/Uqgxz0_KLfbQT5Yqa-2qFzpC_Yk>
Subject: Re: [sieve] Sieve deleteheader and :count match type
X-BeenThere: sieve@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: SIEVE Working Group <sieve.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/sieve>, <mailto:sieve-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/sieve/>
List-Post: <mailto:sieve@ietf.org>
List-Help: <mailto:sieve-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sieve>, <mailto:sieve-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Jan 2017 12:20:19 -0000

NED+mta-filters@mauve.mrochek.com writes:
> I also don't think that saying that :count tests perform a preliminary count 
> like :index :last is especially useful - can you think of a case where you'd 
> want to delete all headers of a given type based on how many of them are 
> present? I can't.

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.

The same applies to other header fields that may occur at most once.

Arnt