GithubHelp home page GithubHelp logo

kintyre / ta-postfix Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 3.0 52 KB

Postfix Add-on for Splunk (Compliant with the Mail CIM model)

Home Page: https://splunkbase.splunk.com/app/3347/

License: Apache License 2.0

Shell 100.00%
splunk-application splunk postfix splunk-addon

ta-postfix's People

Contributors

lowell80 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ta-postfix's Issues

Tweak required for EXTRACT-queue_id

The regex in this line, which is in /default/props.conf, needs to be adjusted.

From:

EXTRACT-queue_id = postfix/\w+\[\d+\]:\s+(?<queue_id>[A-Fa-f0-9]{6,20}):

To (or something similar):

EXTRACT-queue_id = postfix/[\w\\/]+\[\d+\]:\s+(?<queue_id>[A-Fa-f0-9]{6,20}):

The existing regex doesn't pick up cases where the process has more than one backslash - such as postfix/submission/smtpd

TA-postfix fails vetting and cannot be installed on Splunk Cloud

I've downloaded the .tgz as per our email yesterday, but Splunk Support still came back with "Review fails vetting and cannot be installed.". Would you consider the recommendations in the email below?

Thank you for your recent Splunk Cloud App request. Our Splunk Cloud operations and security teams have determined that the App you've requested is not compatible and/or secure within the Splunk Cloud service architecture. Please see their comments below:

#Custom 0.8.5 - TA-postfix
Review fails vetting and cannot be installed.

Props Configuration file standards Ensure that all props.conf files located in the default (or local) folder are well formed and valid. props.conf transforms.conf [failure] Check that pretrained sourctypes in props.conf have only "TRANSFORM-" or "SEDCMD" settings, and that those transforms only modify the host, source, or sourcetype.
Only TRANSFORMS- or SEDCMD options are allowed for pretrained sourcetypes. File: default/props.conf Line Number: 7

If you wish to make changes to the app, you can find documentation and utilities to assist you here: https://urldefense.com/v3/__http://dev.splunk.com/view/appinspect/SP-CAAAE9U__;!!NVzLfOphnbDXSw!XbGBHNAefhEhdcB_1AQ7C0yaD4OpwjXeIcOWxRR1cuVsKZxm5mAwg-YabOjkqtRyCw$

We look forward to working with you in the future to develop and install Apps that will further improve your Splunk Cloud experience.?If you have any immediate questions or concerns, please let me know. If there are no questions at this time, please let me know and I will close this case.

Best Regards,
Ashanjot
Splunk Support

EXTRACT-reject_reason triggers when it shouldn't and collects erroneous results

The EXTRACT for reject_reason triggers when it shouldn't (when status!=reject) and collects erroneous results

My suggestion would be to remove EXTRACT-reject_reason and to extract the reject_reason within EXTRACT-status_reject - that way, reject_reason is only extracted when status==reject

Current:

EXTRACT-status_reject = postfix/smtpd\[\d+\]: (?:NOQUEUE|[A-Fa-f0-9]{6,20}): (?\<status\>reject):
EXTRACT-reject_reason = : (?<reject_reason>[^;:]+);

Proposed:

EXTRACT-status_reject = postfix/smtpd\[\d+\]: (?:NOQUEUE|[A-Fa-f0-9]{6,20}): (?\<status\>reject):\s(?<status_code_short>\d+)\s(?\<dsn\>(\d+\\.)+\d+)\s(.+?:\s)?(?<reject_reason>[^;]+);

I've also incorporated extractions for the status_code_short and dsn because they weren't being picked up in these reject events.

The proposed regex works for the data that I have access to but please test against your data.

Re-release addon on Splunkbase

We'd like to release this app on Splunkbase as a direct download rather than as an "externally hosted" app. Splunk doesn't allow us to just convert an existing app between these types, therefore we need to upload a new app.

Additionally, Splunk now frowns upon reusing an existing sourcetype name that ships with Splunk enterprise, see #10. So we have to change the sourcetype postfix_syslog to something new. At the moment, I'm assuming that we also have to update the app id (folder name) to something new as well.

We would move the existing "master" branch to a new branch representing the "NEW" version of the app, the existing branch would be kept for some time for anyone still on the older version. Each branch would have some clear instructions in the README explaining the situation (and linking to the other), and there would be some "upgrade" notes on how to migrate from the legacy version to the updated and Splunkbase-available version.

Here's what I'm thinking in terms of renaming stuff. Please provide feedback with any recommendations or gotchas.

Name Current value New app (SplunkBase) Old app (git-only)
App id TA-postifx TA-postfix2 * TA-postfix
App version 0.8.x 2.x.x * 0.8.
Splunkbase id 3347 TBD * 3347
Label Postfix Add-on for Splunk Postfix Add-on for Splunk Postfix Add-on for Splunk (Legacy) *
Sourcetype postfix_syslog mail:postfix * postfix_syslog
Git branch master main * legacy *

Where * indicates a change.

eventtype search has wrong syntax

Invalid key in stanza [postfix_email] in /opt/splunk/etc/apps/TA-postfix/default/eventtypes.conf, line 2: sourcetype  (value:  postfix_syslog).
Did you mean 'search'?

correct is:
[postfix_email]
search = sourcetype = postfix_syslog

Thank you,
Meno

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.