I getting error in sendmail from cisco router - TechRepublic
Question
May 5, 2010 at 01:16 AM
sanjoyghosal2010

I getting error in sendmail from cisco router

by sanjoyghosal2010 . Updated 16 years, 2 months ago

%HA_EM-6-LOG: tmpsys:/eem_policy/sendmail.tcl: smtp_send_e
mail: can’t read “reply_code_str(530)”: no such element in array

this error coming my send mail conf as per below —-

if {![info exists _email_server 192.168.90.34]} {
set result “EEM Policy Error: variable $_email_server has not been set”
error $result $errorInfo
}

if {![info exists _email_to sanjayg@tulip.net]} {
set result “EEM Policy Error: variable $_email_to has not been set”
error $result $errorInfo
}

if {![info exists _email_from sanjayg@tulip.net]} {
set result “EEM Policy Error: variable $_email_from has not been set”
error $result $errorInfo
}

#—————— hostname ——————-
set routername [TEST_ROUTER]

#
#——————- ” cli open” ——————-
#
if [catch {cli_open} result] {
error $result $errorInfo
} else {
array set cli $result
}

#————— end of “cli open” ——————-

#———————– “show commands” —————-
#

if [catch {cli_exec $cli(fd) “show version”} result] {
error $result $errorInfo
}
set show_version $result

#———————- end of show commands ————

#
#———————– send mail ———————-
#
# create mail form
action_syslog msg “Creating mail header…”
set body [format “Mailservername: %s” “$_email_server 192.168.90.34”]
set body [format “%s\nFrom: %s” “$body” “$_email_from “sanjayg@tulip.net”]
set body [format “%s\nTo: %s” “$body” “$_email_to “sanjayg@tulip.net”]
set _email_cc “techsupport@tulip.net”
set body [format “%s\nCc: %s” “$body”Hi this is from your core router “”]
set body [format “%s\nSubject: %s\n” “$body” “Subject goes here for router $TEST_ROUTER…”]

set body [format “%s\n%s” “$body” “The body of your msg goes here…”]
set body [format “%s\n%s” “$body” “Report Summary:”]
set body [format “%s\n%s” “$body” ” – Show Version”]
set body [format “%s\n%s” “$body” ” – Syslog Message”]
set body [format “%s\n\n%s” “$body” “———- Show Version ———-“]
set body [format “%s\n%s” “$body” “$show_version”]
# set body [format “%s\n\n%s” “$body” “———- Syslog Message ———-“]
# set body [format “%s\n\n%s” “$body” “$syslog_msg”]

if [catch {smtp_send_email smtp.del.tulip.net $body} result] {
action_syslog msg “smtp_send_email: $result”
}

action_syslog msg “E-mail sent!”
#—————— end of send mail ——————–

#
#——————— cli close ————————
#
cli_close $cli(fd) $cli(tty_id)

This discussion is locked

All Comments