Sendmail.tcl script does not work in EEM on XR3.9.0

Answered Question
Mar 20th, 2010

I have got a funny problem on an ASR9K :

I try to run the sendmail.tcl script to receive an email upon config changes.

I must say that the event is triggered properly and all is running ok except when EEM tries to reach my SMTP server :

RP/0/RSP0/CPU0:ASR1(config)#no int loo 65000                                


RP/0/RSP0/CPU0:Mar 20 16:47:31.725 : config[65808]: %MGBL-CONFIG-6-DB_COMMIT : Configuration committed by user 'cisco'. Use 'show configuration commit changes 1000000994' to view the changes.                                                                                                                                              


RP/0/RSP0/CPU0:Mar 20 16:47:34.212 : config[65808]: %MGBL-SYS-5-CONFIG_I : Configured from console by cisco on vty0 (                                                                                                                                                                            


RP/0/RSP0/CPU0:ASR1#RP/0/RSP0/CPU0:Mar 20 16:47:35.329 : sendmail.tcl[65821]: Creating mail header...                                              



RP/0/RSP0/CPU0:ASR1#sh tcp brie

Sat Mar 20 16:47:41.587 EDT   

   PCB     VRF-ID     Recv-Q Send-Q Local Address          Foreign Address        State


0x5013e0c4 0x60000000      0      0  wrong_src_addr    smtp_server:25         SYNSENT



RP/0/RSP0/CPU0:ASR1#RP/0/RSP0/CPU0:Mar 20 16:48:05.344 : sendmail.tcl[65821]: smtp_send_email: error connecting to mail server: cannot connect to all the candidate mail servers  


RP/0/RSP0/CPU0:ASR1#sh event manager environment _email_ipaddr

Sat Mar 20 17:29:41.287 EDT



As per the output above, the sendmail script opens a socket with the source ip address of the nearest itf to the smtp server, and does not take into account the _email_ipaddr environment variable.

Is there a way to correct this ?


I have this problem too.
0 votes
Correct Answer by Joe Clarke about 6 years 7 months ago

No, not with IOS-XR.  You need EEM 3.0 support in order to be able to specify an SMTP source address or interface.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Correct Answer
Joe Clarke Sat, 03/20/2010 - 14:51

No, not with IOS-XR.  You need EEM 3.0 support in order to be able to specify an SMTP source address or interface.

Joe Clarke Sat, 03/20/2010 - 17:48

I believe EEM 3.3 will be available in IOS-XR 4.0.  However, I do not have a release date.


This Discussion

Related Content