[neomutt-devel] limiting to attachments by kind

Richard Russon rich at flatcap.org
Fri Dec 9 23:57:43 CET 2016


> > ~X \.(doc|pdf|zip)$

> sure.. regexp and all. yay.  but what do these match on?
> i suppose you may be looking at the "filename=foobar.pdf".

That's a reasonable thing to match.

> however, some are "foo.pdf", some are "BAR.PDF".

You could make the regex case-insenstive.

> and some PDFs do not end in ".pdf" at all. :-/

Yep, those headers are set by the sender.
That means your examples wouldn't work either.

> i tried matching this with "~b 'filename=.*pdf'".
> but this unfortunately does not seem to work at all. :-(

Hmm... Clearly the mime wrappers aren't considered as part of the body.

So, now you just need a volunteer to write some code.

Rich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://mailman.neomutt.org/pipermail/neomutt-devel-neomutt.org/attachments/20161209/74e22d6c/attachment.sig>


More information about the neomutt-devel mailing list