how to change default alert smtp port?


C:\Program Files\Splunk\Python-2.6\Lib\

Tags (1)


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:


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

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 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/ to
  • Around line 51, modify the default value of "server" like so:
  •     serverURL  = argvals.get("server", "")

  • Edit apps/search/local/commands.conf to activate your new script:
  • [sendemail]
    filename =
    Get Updates on the Splunk Community!

    Your Guide to SPL2 at .conf24!

    So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...

    Get ready to show some Splunk Certification swagger at .conf24!

    Dive into the deep end of data by earning a Splunk Certification at .conf24. We're enticing you again this ...

    Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

    Now On-Demand Join us to learn more about how you can leverage Service Level Objectives (SLOs) and the new ...