Package: mairix Version: 0.22-1 Severity: normal Tags: patch $ mairix -r "BANLkTikqitVGvC3-BFEGz-wjYJ2Doe2=p...@mail.gmail.com" Can't match patterns longer than 31 characters or empty
It's not the length that is problematic but the presence of the "=" character. If I replace it with another character, it doesn't give the error (but obviously doesn't find the message with the above message-id). That's because mairix interprets it as a substring search even if there's non-numeric data after the equal sign. Maybe there should be a way to escape those special characters too, I don't know. Given how popular gmail is, it's a major pain for me because I rely on mairix to find out where a given message-id is in my local mail spool is. I put those messages id in my TODO list to remembers mails that I need to get back to. I have attached a quick patch that works for me at least. Cheers, -- System Information: Debian Release: wheezy/sid APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (150, 'experimental') Architecture: i386 (x86_64) Kernel: Linux 2.6.39-2-amd64 (SMP w/2 CPU cores) Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages mairix depends on: ii libbz2-1.0 1.0.5-6 high-quality block-sorting file co ii libc6 2.13-10 Embedded GNU C Library: Shared lib ii zlib1g 1:1.2.3.4.dfsg-3 compression library - runtime mairix recommends no packages. mairix suggests no packages. -- no debconf information -- Raphaël Hertzog ◈ Debian Developer Follow my Debian News ▶ http://RaphaelHertzog.com (English) ▶ http://RaphaelHertzog.fr (Français)
diff -u mairix-0.22/debian/changelog mairix-0.22/debian/changelog --- mairix-0.22/debian/changelog +++ mairix-0.22/debian/changelog @@ -1,3 +1,11 @@ +mairix (0.22-1.1) UNRELEASED; urgency=low + + * Non-maintainer upload. + * Fix annoying behaviour with equal interpreted as a substring match when it + should not. + + -- Raphaël Hertzog <hert...@debian.org> Thu, 21 Jul 2011 09:39:14 +0200 + mairix (0.22-1) unstable; urgency=low * New upstream version. only in patch2: unchanged: --- mairix-0.22.orig/search.c +++ mairix-0.22/search.c @@ -936,11 +936,12 @@ } equal = strchr(word, '='); - if (equal) { + if (equal && (equal[1] == '\0' || isdigit(equal[1]))) { *equal = 0; max_errors = atoi(equal + 1); /* Extend this to do anchoring etc */ } else { + equal = NULL; max_errors = 0; /* keep GCC quiet */ }