Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2283

Line-filter on email sent by client

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.9.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      13

      Description

      It is possible to have cf-execd send email by setting mailto (and a few other attributes) in body executor control.
      However, this can sometimes lead to undesirable email and there can be quite a lot of them since each client sends one email.
      This issue is about designing a line-based email-filtering mechanism in cf-execd so it is possible to limit what gets emailed.

      Acceptance criteria

      • It is possible to use an anchored regex list of lines to include. If this is used then only lines matching any of the list entries this will be emailed
      • It is possible to use an anchored regex list of lines to exclude. If this is used then lines matching any of the list entries will not be emailed
      • If both the include list and exclude list is used, a line is only included if it matches include and does not match exclude
      • If all lines are filtered, no email is sent
      • The content in $WORKDIR/output is not filtered
      • If the settings are unused, then nothing is filtered and it behaves as 3.8
      • The include and exclude lists are able to take at minimum 100 list entries each
      • In the future, the model in CFE-1329 can be used to filter before it reaches the email filter (so both filters are in effect)

      Proposed syntax:

      body executor control
      {
          mailincludelines => { "error:.*" };
          mailexcludelines => { "read.*array", "readfile.*" };
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10040 Kristian Amlie
                Reporter:
                a10003 Eystein Maloy Stenberg
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel