04-06-2016 11:11 AM
Hi Team,
Hope all is welll,
I have a customer with the below problem:
I've been trying to get the event manager to email through an external password protected mail server. Unfortunately I haven't been able to get that to work. The system works fine with an internal (no password) server. I used this format for the server address but I can't get it to send an email. username:password@host event manager environment _email_server mailuser:mailpassword@XX.XX.XX.XX event manager environment _email_to networkteam@company.com event manager environment _email_from Mailrouter@company.com
action 4.0 mail server "$_email_server" to "$_email_to" from "$_email_from" subject "Router is down" body "$_cli_result" source-interface GigabitEthernet0/0 Testing to the external mail server is fine but I'm still unable to email from this event manager.
Customer would like for you to please elaborate on the "action mail" command of EEM specifically the 'server' attribute:
http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/eem/command/eem-cr-book/eem-cr-a1.html#wp1625622655
Specifies the e-mail server to be used for forwarding the e-mail. The e-mail server address can be any one of the following template formats:
username:password@host
username@host
host
They would like to know if there are there any limitations to username or password length and complexity?
Your help on this matter is highly appreciated.
Emmanuel Hernandez
Cisco TAC
Phone: +1 919 9971535
Email: emmherna@cisco.com
Business day hours: Monday - Friday: 12:00pm to 9:00pm EST
To update your case (requires a support contract):
https://tools.cisco.com/ServiceRequestTool/scm/mgmt/case
Cisco Worldwide Contact:
http://www.cisco.com/c/en/us/support/web/tsd-cisco-worldwide-contacts.html
Direct Manager: Daniel Rodriguez
Email: danirod2@cisco.com
Phone: +1 919 9971075
Team Lead: Eduardo Aguilar
Email: eduaagui@cisco.com
Phone: +1 919 9971529
Team Lead: Jose Saborio:
04-06-2016 12:40 PM
I don't know the answer.
I couple of obvious things. The username and password wont be able to contains the delimiters, so these two characters can't be used:
:@
I'm also thinking this character would probably not work:
"
As for the length, generate a very large string and configure it on a test router. Do a packet capture using Wireshark, and see how much of it makes it into the packet.
This could be very version dependent as well.
04-07-2016 05:44 AM
Yep, '@' will not work in applets (within a username). You'll need to convert to a Tcl script to be able to use this. In terms of length, there isn't a hardcoded limit there.
04-07-2016 06:22 PM
Hi Joe,
As always your help is highly appreciated , I will get back to customer and let you know if they have any additional concerns.
Kind regards,
Emmanuel Hernandez
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