01-07-2016 02:35 PM
Originally there was a problem with connecting to the mail server and the following error would generate as a result of testing the script:
*Oct 2 21:34:12.937: %HA_EM-3-FMPD_SMTP: Error occurred when sending mail to SMTP server: smtp.mydomain.com : error in connecting to SMTP server
*Oct 2 21:34:12.937: %HA_EM-3-FMPD_ERROR: Error executing applet Interface_Down statement 2.0
Afterwards, I asked our e-mail admin to add the device as a trusted mail relay, and sourced the script from a VRF reachable to the mail server, we then began to connect to the server but receive a separate error message:
*Oct 2 21:45:54.513: %HA_EM-3-FMPD_SMTP: Error occurred when sending mail to SMTP server: smtp.mydomain.com : error in reply from SMTP server
Can someone tell me if there's something wrong with my script, our should I be reaching out to the e-mail admin about something else here?
event manager environment _smtp smtp.mydomain.com
event manager environment _domain mydomain.com
event manager environment _rcpt admin@mydomain.com
event manager environment _send admin:password@mydomain.com
event manager applet Interface_Down
event syslog pattern "changed state to administratively down"
action 1.0 info type routername
action 2.0 mail server "$_smtp" to "$_rcpt" from "$_send" subject "Interface down" body "$_syslog_msg" source-interface Loopback1 vrf Inside
sho event manager history events
No. Job Id Proc Status Time of Event Event Type Name
1 2 Actv success Fri Oct 2 15:30:48 2015 syslog applet: Interface_Down
2 3 Actv success Fri Oct 2 16:58:51 2015 syslog applet: Interface_Down
3 4 Actv success Fri Oct 2 17:12:57 2015 syslog applet: Interface_Down
4 5 Actv success Fri Oct 2 17:24:03 2015 syslog applet: Interface_Down
5 6 Actv success Fri Oct 2 17:30:49 2015 syslog applet: Interface_Down
9 10 Actv success Thu Jan 7 16:51:43 2016 syslog applet: Interface_Down
10 11 Actv success Thu Jan 7 17:06:25 2016 syslog applet: Interface_Down
Solved! Go to Solution.
01-08-2016 08:36 AM
Likely the value of _send is not what you want. Have your password exposed in the from address will do nothing but let the recipients learn your password.
That may or may not be the root of the problem. Certainly if the mail server does from validation, it will fail. I would make that a valid email address, then enable "debug event manager action mail" to see what the mail server returns.
01-08-2016 08:36 AM
Likely the value of _send is not what you want. Have your password exposed in the from address will do nothing but let the recipients learn your password.
That may or may not be the root of the problem. Certainly if the mail server does from validation, it will fail. I would make that a valid email address, then enable "debug event manager action mail" to see what the mail server returns.
01-08-2016 09:12 AM
Thanks Clarke! It's working! I removed the password from the send field and now it's working!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide