Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Julien Cubizolles <j.cubizolles@free.fr>
To: info-gnus-english@gnu.org
Subject: Re: gnus-search since: not working for nnimap
Date: Mon, 30 Jan 2023 08:18:40 +0100	[thread overview]
Message-ID: <87ilgo1odr.fsf@free.fr> (raw)
In-Reply-To: <87a621w8hu.fsf@ericabrahamsen.net>

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> We'll have to get closer to the IMAP server, then. If you don't have TLS
> enabled on your local dovecot you can probably log in and test with:
>
> telnet localhost 143
>
> Then:
>
> a login <username> <password>
> b select "INBOX"
> c UID SEARCH SINCE 28-Jan-2022
>
> To confirm that messages are found.


--8<---------------cut here---------------start------------->8---
/usr/lib/dovecot/imap -o mail_location=maildir:$HOME/email/Maildir/Free:LAYOUT=fs
then
a SELECT "General"
b UID SEARCH SINCE 28-Jan-2022
--8<---------------cut here---------------end--------------->8---

It found many messages:

--8<---------------cut here---------------start------------->8---
b UID SEARCH SINCE 28-Jan-2022
* SEARCH 2870 2874 2977 2987 2988 2997 3069 3312 3347 3390 3455 3645 3651 3656 3677 3691 3707 3729 3730 3748 3749 3750 3767 3871 3954 3985 4038 4041 4045 4046 4048 4053 4054 4056 4058 4060 4065 4073 4074 4082 4085 4094 4108 4125 4134 4286 4294 4324 4326 4335 4337 4342 4371 4413 4414 4433 4455 4458 4473 4483 4521 4522 4560 4562 4593 4603 4611 4615 4617 4630 4633 4636 4638 4639 4651 4676 4678 4679 4681 4682 4685 4688 4691 4694 4695 4696 4709 4712 4713 4715 4716 4717 4718 4723 4737 4747 4765 4766 4772 4782 4790 4793 4806 4808 4810 4813 4814 4815 4818 4820 4821 4822 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4838 4839 4840 4841 4842 4843 4844 4846 4849 4850
b OK Search completed (0.002 + 0.000 + 0.001 secs)
--8<---------------cut here---------------end--------------->8---


> Then it's a matter of seeing that same conversation between Gnus and
> Dovecot, to find where things are going wrong. You can set
> `nnimap-record-commands' to t, then conduct a search, 

I found a "*imap log*" buffer. When conducting the "since:1y" search,
the only log is:
--8<---------------cut here---------------start------------->8---
07:56:57 [FreeOffline] 10993 SELECT "General"
07:56:57 [FreeOffline] 10994 UID SEARCH SINCE 30-janv.-2022
--8<---------------cut here---------------end--------------->8---


> and also find which of your " *nnimap localhost nil *nntpd**-373470"
> buffers corresponds to this server. 

there isn't any buffer with this name, only the *imap log*

> That should allow you to reconstruct the conversation.
>
> Another option would be to edebug the `gnus-search-imap-search-command'
> function, and see what we're getting back from Dovecot.
>
> Hopefully something in there will be revealing.

Indeed: the nnimap-command used is:

--8<---------------cut here---------------start------------->8---
nnimap-send-command("UID SEARCH %s" "SINCE 30-janv.-2022")
--8<---------------cut here---------------end--------------->8---

which seems to be invalid:
+ because of the french localized version of the date (janv instead of jan)
+ because of the dot

--8<---------------cut here---------------start------------->8---
UID SEARCH SINCE 28-Janv-2022
UID SEARCH SINCE 28-Jan.-2022
--8<---------------cut here---------------end--------------->8---

both return:
--8<---------------cut here---------------start------------->8---
UID BAD Error in IMAP command SEARCH: Invalid search date parameter (0.001 + 0.000 secs).
--8<---------------cut here---------------end--------------->8---

in a direct session with dovecot.


-- 
Julien Cubizolles



  reply	other threads:[~2023-01-30  7:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-29 17:33 Eric Abrahamsen
2023-01-30  7:18 ` Julien Cubizolles [this message]
2023-01-30  9:32   ` Julien Cubizolles
2023-01-30 10:36     ` Julien Cubizolles
2023-01-30 17:41       ` Eric Abrahamsen
2023-02-01 23:05         ` Björn Bidar
  -- strict thread matches above, loose matches on Subject: below --
2023-01-28 12:22 Julien Cubizolles
2023-01-28 18:20 ` Eric Abrahamsen
2023-01-29  8:59   ` Julien Cubizolles

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ilgo1odr.fsf@free.fr \
    --to=j.cubizolles@free.fr \
    --cc=info-gnus-english@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).