Refine your search:

1
1

C:\Program Files\Splunk\Python-2.6\Lib\smtpd.py??

asked 03 Sep '10, 18:30

robmcq's gravatar image

robmcq
111
accept rate: 0%


One Answer:

You probably want to avoid tampering with default Python libraries. If you're only concerned with scheduled alerts, then I think you can just do the following in alert_actions.conf:

[email]
mailserver=mail.example.com:587

This doesn't appear to affect emails sent via the search pipeline (i.e., using | sendemail) -- for that you would still have to call your search like this:

search xxx | sendemail to=myaddress@example.com server=mail.example.com:587

But the big advantage is you don't have to do anything "unusual".


If you really want to change the overall default, you'll most likely have to modify the sendemail.py in the search app, which has a hard-coded default of "localhost". Overriding the sendemail script may break things, especially during version upgrades. For example, supporting PDF emails release in 4.1 required changes to that script. You have been warned....

  • Copy apps/search/bin/sendemail.py to sendemail-local.py
  • Around line 51, modify the default value of "server" like so:

        serverURL  = argvals.get("server", "mail.example.com:587")
    

  • Edit apps/search/local/commands.conf to activate your new script:

    [sendemail]
    filename = sendemail-local.py
    
  • link

    answered 03 Sep '10, 19:18

    southeringtonp's gravatar image

    southeringtonp ♦
    4.5k1215
    accept rate: 35%

    edited 04 Sep '10, 16:22

    Post your answer
    toggle preview

    Follow this question

    Log In to enable email subscriptions

    RSS:

    Answers

    Answers + Comments

    Markdown Basics

    • *italic* or _italic_
    • **bold** or __bold__
    • link:[text](http://url.com/ "Title")
    • image?![alt text](/path/img.jpg "Title")
    • numbered list: 1. Foo 2. Bar
    • to add a line break simply add two spaces to where you would like the new line to be.
    • basic HTML tags are also supported

    Tags:

    ×11

    Asked: 03 Sep '10, 18:30

    Seen: 697 times

    Last updated: 04 Sep '10, 16:22

    Copyright © 2005-2012 Splunk, Inc. All rights reserved.