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

Multiple action on one rule in header_check pcre

Expand Messages
  • Lars Johansen
    Hi, I have the following rules in header check /^Subject: * * *SPAM * * *(.*)$/ PREPEND X-Spam-Flag: YES /^Subject: * * *SPAM * * *(.*)$/ REPLACE
    Message 1 of 3 , Apr 1, 2009
    • 0 Attachment
      Hi,

      I have the following rules in header check

      /^Subject: \*\*\*SPAM\*\*\*(.*)$/ PREPEND X-Spam-Flag: YES
      /^Subject: \*\*\*SPAM\*\*\*(.*)$/ REPLACE Subject: ${1}


      The problem is that only the first rule are run, are there some way to
      run multiple action on one rule?


      Greetings,

      Lars
    • Sahil Tandon
      ... If by rule you mean header , then no. The second paragraph, slightly editorialized, under DESCRIPTION from header_checks(5): Each message header or
      Message 2 of 3 , Apr 1, 2009
      • 0 Attachment
        On Wed, 01 Apr 2009, Lars Johansen wrote:

        > I have the following rules in header check
        >
        > /^Subject: \*\*\*SPAM\*\*\*(.*)$/ PREPEND X-Spam-Flag: YES
        > /^Subject: \*\*\*SPAM\*\*\*(.*)$/ REPLACE Subject: ${1}
        >
        > The problem is that only the first rule are run, are there some way to
        > run multiple action on one rule?

        If by "rule" you mean "header", then no. The second paragraph, slightly
        editorialized, under DESCRIPTION from header_checks(5):

        Each message header or message body line is compared against a list of
        patterns. When a match is found the corresponding action is executed, and
        the matching process is repeated for the *next* message header or message body
        line.

        --
        Sahil Tandon <sahil@...>
      • Wietse Venema
        ... As documented, only one rule can fire per line. http://www.postfix.org/header_checks.5.html As documented, use an external content filter for complex
        Message 3 of 3 , Apr 1, 2009
        • 0 Attachment
          Lars Johansen:
          > Hi,
          >
          > I have the following rules in header check
          >
          > /^Subject: \*\*\*SPAM\*\*\*(.*)$/ PREPEND X-Spam-Flag: YES
          > /^Subject: \*\*\*SPAM\*\*\*(.*)$/ REPLACE Subject: ${1}
          >
          >
          > The problem is that only the first rule are run, are there some way to
          > run multiple action on one rule?

          As documented, only one rule can fire per line.
          http://www.postfix.org/header_checks.5.html

          As documented, use an external content filter for complex actions.
          http://www.postfix.org/BUILTIN_FILTER_README.html#limitations

          Wietse
        Your message has been successfully submitted and would be delivered to recipients shortly.