Loading ...
Sorry, an error occurred while loading the content.
 

Re: limited syntax in regexp:header_checks ?

Expand Messages
  • Wietse Venema
    ... Are you concerned about buffer overflow problems? As documented in the Postfix regexp_table(5) manpage: The regular expression syntax is documented in
    Message 1 of 4 , May 16, 2013
      Patrick Proniewski:
      > Hello,
      >
      > I'm trying to create an header_check filter (regexp format) that
      > would issue a warning (or info) when the "References:" header is
      > longer than 800 characters. I've discovered that using this kind
      > of syntax won't work:
      >
      > /^References: .\{800,\}$/ INFO too long
      > /^References: .{800,}$/ INFO too long

      Are you concerned about buffer overflow problems?

      As documented in the Postfix regexp_table(5) manpage:

      The regular expression syntax is documented in re_format(7)
      with 4.4BSD, in regex(5) with Solaris, and in regex(7) with
      Linux. Other systems may use other document names.

      Limitations on repetition counts come from the regular expression
      library, not from Postfix. Don't blame the messenger.

      BTW the pcre library does not complain about 800 repetitions.

      Wietse
    • Patrick Proniewski
      ... yes I am. ... Was never my intention to blame postfix, I was just asking for help on a problem that I have. ... I ll look into it. thanks, Patrick
      Message 2 of 4 , May 16, 2013
        On 16 mai 2013, at 14:26, Wietse Venema wrote:

        > Patrick Proniewski:
        >> Hello,
        >>
        >> I'm trying to create an header_check filter (regexp format) that
        >> would issue a warning (or info) when the "References:" header is
        >> longer than 800 characters. I've discovered that using this kind
        >> of syntax won't work:
        >>
        >> /^References: .\{800,\}$/ INFO too long
        >> /^References: .{800,}$/ INFO too long
        >
        > Are you concerned about buffer overflow problems?

        yes I am.


        > As documented in the Postfix regexp_table(5) manpage:
        >
        > The regular expression syntax is documented in re_format(7)
        > with 4.4BSD, in regex(5) with Solaris, and in regex(7) with
        > Linux. Other systems may use other document names.
        >
        > Limitations on repetition counts come from the regular expression
        > library, not from Postfix. Don't blame the messenger.

        Was never my intention to blame postfix, I was just asking for help on a problem that I have.

        > BTW the pcre library does not complain about 800 repetitions.


        I'll look into it.

        thanks,

        Patrick PRONIEWSKI
        --
        Responsable pôle Opérations - DSI - Université Lumière Lyon 2
        Responsable Sécurité des Systèmes d'Information
      Your message has been successfully submitted and would be delivered to recipients shortly.