Hello!
We've been using Splunk here for quite some time (back since the 4.x days) but only recently have we had a need to use the "sendemail" command. The server can send email just fine when scheduling an alert and can do it just fine from the Linux command line. However, when we try to use the sendemail command by copying examples in the doc, we always get
command="sendemail", [('system library', 'fopen', 'No such file or directory'), ('BIO routines', 'BIO_new_file', 'no such file'), ('x509 certificate routines', 'X509_load_cert_crl_file', 'system lib')] while sending mail to: me@mycompany.com
when I look in python.log I see pretty much the same non-informative information:
2016-10-19 16:33:35,866 -0400 INFO sendemail:1067 - sendemail pdfgen_available = 1
2016-10-19 16:33:35,892 -0400 INFO sendemail:1195 - sendemail:mail effectiveTime=None
2016-10-19 16:33:40,594 -0400 INFO sendemail:1215 - Generated PDF for email
2016-10-19 16:33:40,658 -0400 ERROR sendemail:131 - Sending email. subject="Here is an email notification 2", results_link="None", recipients="[u'me@mycompany.com']", server="internalmailhub.com"
2016-10-19 16:33:40,659 -0400 ERROR sendemail:417 - [('system library', 'fopen', 'No such file or directory'), ('BIO routines', 'BIO_new_file', 'no such file'), ('x509 certificate routines', 'X509_load_cert_crl_file', 'system lib')] while sending mail to: me@mycompany.com
So this seems like some kind of a python error with sendemail.py but it's not informative enough to clue me in to what might be wrong. Note that I've tried both using the "server" argument to sendemail and without it as both email types would work from this server (i.e. sending directly to a mail hub or letting it trickle through the internal mail system which would also punt the message to our internal mail hub).
Other useful information
- all servers are SLES 11.x
- default Linux mail configuration on our servers is for postfix. I believe it includes its own flavor of the "sendmail" command that is a work-alike to commands that want to call sendmail (i.e. "sendmail -t ..."). Don't know if that's a factor here
- servers we've tested this on are all search heads and we get consistent responses on each
- search heads are running 6.5.0
It probably goes without saying that if I try to just run the sendemail.py python script just to see if there's something obvious it can't find, it fails
$ python sendemail.py
Traceback (most recent call last):
File "sendemail.py", line 1, in <module>
import re, time, splunk.Intersplunk, splunk.mining.dcutils as dcu
ImportError: No module named splunk.Intersplunk
but I assume that's expected as it's not expecting to be run from an external python and rather from inside Splunk.
Thanks for your help!
-Mark
... View more