OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Postfix Archives: Re: headers check seems to be not functioning

Re: headers check seems to be not functioning .. help !


Subject: Re: headers check seems to be not functioning .. help !
From: Jim Seymour (jseymourjimsun.LinxNet.com)
Date: Fri Jan 28 2000 - 13:14:55 CST


In message <20000128152357.D370stahlw06.stahl.bau.tu-bs.de>,
dated Fri, 28 Jan 2000 15:23:57 +0100,
Ralf Hildebrandt <R.Hildebrandttu-bs.de> wrote regarding the subject
"headers check seems to be not functioning .. help !":
>
> On Fri, Jan 28, 2000 at 03:18:17PM +0100, Thomas Andres wrote:
>
> > That depends on your restricitons (postconf | grep restriction)
>
> I thought the header_checks are applied AFTER ALL other checks always...
>
> > > /^Subject: * InterneInternet problem year 2000/ REJECT
> > > /^Subject: * Internet problem year 200*/ REJECT
> > > /^Message-ID: <Fix2001microsoft.com>/ REJECT
> >
> > None of these match with the line below!!! You should read man -s5 regexp.
>
> " *" doesn't match an arbitrary number of spaces?

More correctly: 0 or more :-). But look more closely at the subject
line in the incoming message vs. his regexp...

    Subject: Internet problem year 2000

A single space between "Subject:" and "Internet". His regexp has
space-*-space. In this case, the " *" will eat up the sole space in
the target string and there'll be none to match the second space in his
regexp. Regexp should be space-space-* instead. Or better yet:
[spacetab][spacetab]* (\s+ in PCRE - may be a shorter way in Posix
regexp also--I'm no expert there).

Also, the first of his Subject: tests is redundant. The second will
catch anything the first will. (2-0-followed-by-zero-or-more-zeros.)

Regards,
Jim

-- 
Jim Seymour                  | PGP Public Key available at:
jseymourjimsun.LinxNet.com  | http://www.cam.ac.uk.pgp.net/pgpnet/wwwkeys.html
http://home.msen.com/~jimsun | http://www.trustcenter.de/cgi-bin/SearchCert.cgi



This archive was generated by hypermail 2b27 : Fri Jan 28 2000 - 13:17:01 CST