cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2611
Views
0
Helpful
1
Replies

Sending email with eem script

mialbert
Level 1
Level 1

I have an eem script that i want to alert on a syslog event and then send an email.  The script is:  

event manager applet syslog-alert
event syslog pattern “.*%IDS-6-.*”
action 1.0 mail server "192.168.1.2" to "xuser1@domain.com" from "xuser2@domain.com" subject "IDS Alert"
action 1.1 syslog msg "IDS alert has been sent to email server!"

I get the below error when ran:

*Apr 6 15:38:27.222 CST: %HA_EM-6-LOG: ids-alert : DEBUG(smtp_lib) : smtp_connect connect fail 260
*Apr 6 15:38:27.222 CST: %HA_EM-6-LOG: ids-alert : DEBUG(smtp_lib) : fh_smtp_connect callback timer is awake
*Apr 6 15:38:27.222 CST: %HA_EM-3-FMPD_SMTP: Error occurred when sending mail to SMTP server: 192.168.1.2 : timeout error
*Apr 6 15:38:27.694 CST: %HA_EM-6-LOG: ids-alert : DEBUG(smtp_lib) : smtp_connect connect fail 260
*Apr 6 15:38:27.694 CST: %HA_EM-6-LOG: ids-alert : DEBUG(smtp_lib) : fh_smtp_connect callback timer is awake
*Apr 6 15:38:27.694 CST: %HA_EM-3-FMPD_SMTP: Error occurred when sending mail to SMTP server: 192.168.1.2 : timeout error
*Apr 6 15:38:28.838 CST: %HA_EM-6-LOG: ids-alert : DEBUG(smtp_lib) : smtp_connect connect fail 260
*Apr 6 15:38:28.838 CST: %HA_EM-6-LOG: ids-alert : DEBUG(smtp_lib) : fh_smtp_connect callback timer is awake
*Apr 6 15:38:28.838 CST: %HA_EM-3-FMPD_SMTP: Error occurred when sending mail to SMTP server: 192.168.1.2 : timeout error
*Apr 6 15:38:29.142 CST: %HA_EM-6-LOG: ids-alert : DEBUG(smtp_lib) : smtp_connect connect fail 260
*Apr 6 15:38:29.142 CST: %HA_EM-6-LOG: ids-alert : DEBUG(smtp_lib) : fh_smtp_connect callback timer is awake
*Apr 6 15:38:29.142 CST: %HA_EM-3-FMPD_SMTP: Error occurred when sending mail to SMTP server: 192.168.1.2 : timeout error

Can this be done to a mail server that requires authentication?  Or do i have to have one that doesn't do authentication?  

1 Reply 1

aydinnmu1
Level 1
Level 1

Hi,

eem doesn't support authentication parameters. You should select no authentication on server side. 

or 

you can write TLC script like this answer.

https://supportforums.cisco.com/discussion/11070866/eem-cisco-877-trouble-mail-server-action-and-smtp-auth

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: