[PLUG] A Postfix regex question

Paul Heinlein heinlein at attbi.com
Wed Jul 31 13:21:43 UTC 2002


On Wed, 31 Jul 2002, Rich Shepard wrote:

> > What about
> > 
> > /^Subject:$/    REJECT
> 
> Does this accommodate a variable length of white space that may be
> there? I do like it, though, and I think it's safe enough to try
> without risking the loss of all incoming messages.

I don't use Postfix, so I can't answer the question directly, but I 
suspect its regex engine would have some way of tokenizing whitespace. 
Two common ways of doing this would be

^Subject:\s*$             -- Perl
^Subject:[[:blank:]]*$    -- gawk/posix

It's likely just a matter of learning how Postfix does this.

--Paul Heinlein <heinlein at attbi.com>






More information about the PLUG mailing list