1

I tried to use such rule:

:0 B
* Something[[:space:]]+whatever

but it doesn't work.

When I change [[:space:]] to literal space character:

:0 B
* Something +whatever

it works.

It also works in case of:

:0 B
* Something[ ]+whatever

I must be doing something wrong, but can't really find it. Any hints?

Otto Allmendinger
  • 27,448
  • 7
  • 68
  • 79
  • Well, it looks like procmail does not support the posix class `[[:space:]]`. How come you think it does? Does it say in the manual that it should support it? I'm not being a smart @ss, I am unfamiliar with procmail, so I rally don't know. But is sure looks like it isn't supported. – Bart Kiers Feb 27 '10 at 22:15
  • Manual says that procmail uses egrep for filtering - to be specific - flag "B" is: `B Egrep the body.`. and egrep does support it. –  Feb 27 '10 at 22:30

1 Answers1

2

What about just adding the white space characters in a class you want to match:

[ \t\r\n]

matches a space, tab, carriage return and line feed.

There are of course more white space chars, but these are the most commonly used.

Bart Kiers
  • 166,582
  • 36
  • 299
  • 288
  • While technically possible, I'd rather use standard class for readability reasons. –  Feb 27 '10 at 22:29