On Sun, Mar 7, 2010 at 8:50 PM, M.G. Devour <mdevour@eskimo.com> wrote:
Here is a solution I've come up with which *SEEMS* to work:
:0 fhw * ^content-type:(.*\<)?multipart.*\<(boundary=\/[^"; ]+|boundary="\/[^"; ]+)
I don't believe there's any guarantee that using \/ twice in the same RE will do the right thing. If it seems to be working, though ... You might find http://www.well.com/user/barts/email/mimepart.txt to be useful.
Instead of this, it would make the most sense to match anything except double-quote, semi-colon, or whitespace, except that we don't seem to be allowed to use control characters, POSIX character classes or shortcuts ( e.g.: [:space:] or \s ) inside bracket expressions in procmail? This seems to be impossible to do:
[^";<something that stands for all whitespace characters>]
I wish I could understand why?
Because procmail's regex code is roughly 25 years old and complex character class shortcuts didn't exist when it was written.