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 the 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