My system and email server both are in same network.
when I try to run the ElastAlert with smtp_ssl property disabled, results into "SMTP AUTH extension not supported by server."
When I run it with smtp_ssl = true/false , results into "Error connecting to SMTP host: [SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:590)"
Below is the content of my rule file.
alert:
email:
smtp_host: abc.xyz.com
smtp_port: 25
smtp_auth_file: /Users/elastalert/elastalert/example_rules/email_acct.txt
Have you tried not using smtp_auth_file? There are many smtp servers which let you send mail without any authentication, usually on internal setups like yours.
Hey Thank you for the quick reply. Yes that did solved the error. After running the ElastAlert even though I can see the log print that email sent,I didn't get any email on my email ID's mentioned in email list.
Below is the log print message of mail sent:
INFO:elastalert:Sent email to ['[email protected]']
You could try setting from_addr. By default it is set to "elastalert". Some smtp servers will automatically add their hostname, ie, [email protected], onto it. Some will complain that there is no domain and not send.
I would check smtp server logs, or maybe your spam folder.
I have already set the from_addr property and even checked spam folder. only option left is checking the smtp server logs. Lets see If I can find something there.
Thanks!
Most helpful comment
Have you tried not using smtp_auth_file? There are many smtp servers which let you send mail without any authentication, usually on internal setups like yours.