From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id EDD5E1F4C1 for ; Tue, 29 Oct 2024 06:53:53 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=VhGZwT17; dkim-atps=neutral Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a9a6b4ca29bso625041866b.3 for ; Mon, 28 Oct 2024 23:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730184832; x=1730789632; darn=public-inbox.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=U4ilp1pMLsWJ4w6X0GKBbP5TN2Cm0mCJpaL8yXXUewg=; b=VhGZwT17PKJtsQAabbKiNbeMCRiUAlFXT4ba/0uz5JOWbJc1hp3oPguZzGkIJ6O/8U rdicvnsq8dGOyQ/vu35tgqwAMMpA3vnQzgW1heHfWIXj4qBMKEeY0FAjS0ivGJJ7UpU0 Eq5LykDoLJBn7TOjXhss360PeZQuVm+paxPhLYSEU9P0cTH338eWETPzDg154SS6Lzx6 mzbApVM1OIZahBAdQr6VKEcFWx72mQhejeIwPPPq0dbSdqF/ULDC+G4TfqNRE46r0qea P5HNKR7JreoehPZbKboH3FMn+Bo56VibBBIcDYCBxQ2HcYyJ8rldKqf2iCnG+gV1g66L kakg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730184832; x=1730789632; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=U4ilp1pMLsWJ4w6X0GKBbP5TN2Cm0mCJpaL8yXXUewg=; b=d4gRDGp0vc4/x1VL8xNPa+9MHB1AMvdoNDqbU9cG0J842LgbljdoZS6ptKmQt8eMvs zKjrBLLCnt4HhriELcc24csGsLABBz9PAGbejaIMoyo1NeiASPKCQ0cDWV3iGH0dxAOj QDbTkXoQqedKayLk/Lkul8EApOv3l5d7XF1YCLat98RyYHZE0C+zStoq2KyeMWpxrBiQ Mvmc9dZVBz1Kk1MNLLPMCsPy8vppoNeaK2M29/i0r+lK5xqY/rokaGpCipzk2vbLdqbb jjZtfxf2QMeN22c/580JSqWJeiSWOa8Ak5gqmt8vInoQOoS02avZtNcDvpa1zniAQHft /I+g== X-Gm-Message-State: AOJu0Yy2/O3p+FwcIgYWskTHQsbtRyY7FZJQCAxaGn4I6nJZAM9o+XJ7 sKloWzqfao7mPrXWjCg/40K8KI6fKjGAandNNojO+Ra8VfecsrApKGHptYrg X-Google-Smtp-Source: AGHT+IGnvVhswZU7nA5m+Y4MDresLPnmMHjuhbcXe1wE5HAV7fWkjKsTpOn6y7g+VjzPXN8aiTVpJA== X-Received: by 2002:a17:907:2d93:b0:a9a:3f9d:62f8 with SMTP id a640c23a62f3a-a9de5ce1831mr1121985866b.19.1730184831349; Mon, 28 Oct 2024 23:53:51 -0700 (PDT) Received: from ars3 ([2a02:8109:8a87:ff00::d6f6]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f2994ddsm436141666b.110.2024.10.28.23.53.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 23:53:50 -0700 (PDT) From: Augusto Stoffel To: Eric Wong Cc: meta@public-inbox.org Subject: Re: [PATCH] imap: allow bare `*' in range In-Reply-To: <20241023093005.M99868@dcvr> (Eric Wong's message of "Wed, 23 Oct 2024 09:30:05 +0000") References: <87jzdzguml.fsf@gmail.com> <20241023093005.M99868@dcvr> Date: Tue, 29 Oct 2024 07:53:48 +0100 Message-ID: <87jzdrwgar.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain List-Id: On Wed, 23 Oct 2024 at 09:30, Eric Wong wrote: > Augusto Stoffel wrote: >> The following request querying the latest message id fails on >> public-inbox.org >> >> curl 'imaps://:@public-inbox.org/inbox.comp.mail.public-inbox.meta.0'\ >> -X 'FETCH * (UID)' >> >> It works on other IMAP servers and AFAICT is allowed by the protocol >> spec. >> >> Subject: Re: Bug in FETCH request? > > Yup, that's a bug, fix below (deployed to public-inbox.org) > Thanks for reporting it since I've been stuck on tougher > data design problems :x Thanks! >> This on the other hand works, but you need to choose a high enough >> number... >> >> curl 'imaps://:@public-inbox.org/inbox.comp.mail.public-inbox.meta.0'\ >> -X 'FETCH 999999:* (UID)' > > Right, IIRC that was explicitly in a RFC 3501 example, > whereas a bare `*' wasn't used as an example > (and I didn't check the BNF carefully enough). > > Curious, did you discover this on a certain real-world IMAP client? I'm writing an IMAP client and in my situation "FETCH *" seemed to be the easiest way to find out how many messages a mailbox contains. (For some specific reasons I didn't want to use the response of SELECT). I still find it funny that you can't say "please fetch the 50 most recent messages" with one single request...