Reporting

Send email from command

wys2010
New Member

Some customers ask questions about how to send email from web. And I did a test. I input command

"sourcetype="access_combined" |head 10 | sendemail to="michael_wu@ucom.net.cn" format=html subject="web access log" server=cnmail.systex.com.cn"

and received the results form "cnmail.systex.com.cn" which is our company's mail server. When I rewrite the command as follow

sourcetype="access_combined" |head 10 | sendemail to="wys23@sina.com" format=html subject="web access log" server=smtp.sina.com.cn"

which is a public server I registered. I find error messages "(501, "#5.1.3 Partial domain not allowed: 'Jordan-PC'", 'splunk@Jordan-PC') while sending mail to: wys23@sina.com

Is this a error which is arised from the server smtp.sina.com.cn deny spam mail?

Tags (1)
0 Karma

the_wolverine
Champion

Based on the error, its possible that updating the hostname in your alert_actions.conf file will resolve this. The mail is rejected due to "Partial domain not allowed: 'Jordan-PC'". What if you update your hostname to a fully qualified domain name?

ftk
Motivator

It appears that your splunk server is not allowed to relay via the smtp.sina.com.cn server. Splunk uses your $LOCALHOST variable to pass to the SMTP server. You might be able to adjust your hostname to be a fully qualified name, the SMTP server might accept it then. Alternatively you could also allow the Splunk server's IP to relay mail.

Any reason you can't just use the cnmail.systex.com.cn that already works to send your email?

Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...