On 2022-09-02 19:45, Sam Kuper wrote:
> On Fri, Sep 02, 2022 at 06:24:24PM +0000, Tim Chase wrote:
> > On 2022-09-02 20:07, Francesco Ariis wrote:
> >> Il 02 settembre 2022 alle 18:01 Tim Chase ha scritto:
> >>> However, often these messages don't have a To: or CC: header, so I
> >>> can't identify them with a ~C and I don't see an option for
> >>> identifying messages by the Delivered-To or Envelope-To headers.
> >>> 
> >>> Is there a good way to identify these messages?
> >> 
> >> Check ~h and =h, it those don???t do, consider filtering with your
> >> mail retriever (e.g getmail, that is what I use).
> > 
> > Hmm, that looks like it might work.  Is there further documentation
> > on the ~h beyond this:
> > 
> >   http://mutt.org/doc/manual/#tab-patterns
> > 
> > It seems to mostly do what I want, but I don't see a way to limit
> > it to just the Delivered-To/Envelope-To headers,
> 
> Could you not prepend your EXPR with something like this?
> 
>     `^(Delivered|Envelope)-To:\ `

Ah, so the pattern for matching ~h includes the header-name then
and the regex can match against that? That should work.

However, when I tried this

 color index reverse brightblack black "~h ^(delivered|envelope)-to:\ 
+[0-9a-f]{5,}[.][0-9a-f]{5,}@mydomain.com)$"

(tried with and without the backslash escaping the space)

Mutt complains

 Error in [my muttrc]: '^(delivered': parentheses not balanced

which looks like the "|" is getting higher precedence than the
parens.

Is this a more recent feature than my stock mutt-on-OpenBSD-RELEASE?
(version info below)

Thanks!

-tkc


$ mutt -v
Mutt 2.2.3 (2022-04-12)
Copyright (C) 1996-2022 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.

System: OpenBSD 7.1 (amd64)
ncurses: ncurses 5.7.20081102 (compiled with 5.7)
libiconv: 1.16
libidn2: 2.3.0 (compiled with 2.3.0)
hcache backend: qdbm 1.8.78

Compiler:
OpenBSD clang version 13.0.0
Target: amd64-unknown-openbsd7.1
Thread model: posix
InstalledDir: /usr/bin

Configure options: '--enable-compressed' '--enable-external_dotlock' 
'--disable-fcntl' '--enable-flock' '--enable-hcache' '--with-idn2' 
'--enable-imap' '--enable-pop' '--enable-sidebar' '--enable-smtp' 
'--without-gdbm' '--without-tokyocabinet' '--with-qdbm' 
'--with-docdir=/usr/local/share/doc/mutt' '--with-ssl' '--enable-autocrypt' 
'--enable-gpgme' '--with-sqlite3' '--with-curses' '--prefix=/usr/local' 
'--sysconfdir=/etc/mutt' '--mandir=/usr/local/man' '--infodir=/usr/local/info' 
'--localstatedir=/var' '--disable-silent-rules' '--disable-gtk-doc' 'CC=cc' 
'CFLAGS=-O2 -pipe -g' 'LDFLAGS=-L/usr/local/lib' 'CPPFLAGS=-I/usr/local/include'

Compilation CFLAGS: -Wall -pedantic -Wno-long-long -O2 -pipe -g

Compile options:
-DOMAIN
-DEBUG
-HOMESPOOL  -USE_SETGID  -USE_DOTLOCK  +DL_STANDALONE  -USE_FCNTL  +USE_FLOCK   
+USE_POP  +USE_IMAP  +USE_SMTP  
+USE_SSL_OPENSSL  -USE_SSL_GNUTLS  -USE_SASL  -USE_GSASL  -USE_GSS  
+HAVE_GETADDRINFO  
+HAVE_REGCOMP  -USE_GNU_REGEX  
+HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET  
+HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM  +HAVE_FUTIMENS  
+CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME  +CRYPT_BACKEND_GPGME  
-EXACT_ADDRESS  -SUN_ATTACHMENT  
+ENABLE_NLS  -LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET  
+HAVE_LANGINFO_YESEXPR  
+HAVE_ICONV  -ICONV_NONTRANS  -HAVE_LIBIDN  +HAVE_LIBIDN2  +HAVE_GETSID  
+USE_HCACHE  
+USE_SIDEBAR  +USE_COMPRESSED  -USE_INOTIFY  
ISPELL="/usr/local/bin/ispell"
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/usr/local/share/mutt"
SYSCONFDIR="/etc/mutt"
EXECSHELL="/bin/sh"
-MIXMASTER

Reply via email to